[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: namespace conflict for des
From: |
Simon Josefsson |
Subject: |
Re: namespace conflict for des |
Date: |
Mon, 24 Oct 2005 20:48:42 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
Paul Eggert <address@hidden> writes:
> Simon Josefsson <address@hidden> writes:
>
>> I get this on freebsd 4.11:
>>
>> In file included from smbutil.c:34:
>> lib/des.h:62: conflicting types for `des_setkey'
>> /usr/include/unistd.h:128: previous declaration of `des_setkey'
>> *** Error code 1
>>
>> Should I rename the des_* functions to gl_des_* or is there some
>> cleaner approach?
>
> Are the functions intended to have the same semantics?
I dunno. If I type 'man des_setkey' on that system, I get a man page
for libcrypt. 'des_setkey' isn't mention on the page. However,
considering the prototype in unistd.h:
int des_setkey __P((const char *key));
I would suspect the function somehow sets a global DES key schedule
struct somewhere.
Oh. There is a POSIX "setkey" function. It is not thread safe, so I
can't use it. But GNU has setkey_r and encrypt_r in crypt.h. I think
gnulib should duplicate that API instead. There may even be some
opportunity to share code with glibc here. We would save code size on
glibc systems, at least. Nice. I'll work on this...
Thanks,
Simon