bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: namespace conflict for des


From: Paul Eggert
Subject: Re: namespace conflict for des
Date: Sun, 23 Oct 2005 22:25:48 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

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?  If so, perhaps
you should arrange to use the FreeBSD versions while on FreeBSD.  If
not, perhaps the gnulib versions should be renamed.

If they are supposed to have the same semantics but the FreeBSD
versions are buggy, you could rename the functions in unistd.h
instead, by using #define before #include <unistd.h>.  It's a bit of a
hack, as it requires that client code to include your .h file before
it includes unistd.h.  I suppose another possibility is to use linker
magic but this is a bit less portable in practice.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]