[Top][All Lists]

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

global 4.5.3 compilation error on FreeBSD and possible patch

From: Rui Lopes
Subject: global 4.5.3 compilation error on FreeBSD and possible patch
Date: 15 Jun 2003 17:14:42 +0100

Hi all,

global 4.5.3 does not build on FreeBSD.  The error is:

Making all in libutil
. . .
source='vfind.c' object='vfind.o' libtool=no  depfile='.deps/vfind.Po'
tmpdepfile='.deps/vfind.TPo'  depmode=gcc3 /bin/sh ../depcomp  cc
-DHAVE_CONFIG_H -I. -I. -I.. -I../libutil -I../libdb -I../libglibc   
-DBINDIR='"/usr/local/bin"' -O -pipe -march=athlon-xp -c `test -f
'vfind.c' || echo './'`vfind.c
In file included from strbuf.h:27,
                 from dbop.h:31,
                 from gpathop.h:27,
                 from vfind.c:29:
/usr/include/string.h:67: conflicting types for `bcopy'
/usr/include/strings.h:42: previous declaration of `bcopy'
*** Error code 1
. . .

libdb/compat.h has

#if defined(BSD) || defined(BSD4_3)
#define strchr(a, b)            index(a, b)
#define strrchr(a, b)           rindex(a, b)
#define memcmp(a, b, n)         bcmp(a, b, n)
#define memmove(a, b, n)        bcopy(b, a, n)

/usr/include/string.h:67 has
    void    *memmove(void *, const void *, size_t);

/usr/include/strings.h:42 has
    void     bcopy(const void *, void *, size_t);           /* LEGACY */

(Free|Net|Open)BSD all have that functions in string.h.  A possible
patch is attached.

Maybe it's better to add autoconf HAVE_XXX macros.

Rui Lopes

Attachment: compat.h.patch
Description: Text document

reply via email to

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