[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: global 4.5.3 compilation error on FreeBSD and possible patch
From: |
Shigio Yamaguchi |
Subject: |
Re: global 4.5.3 compilation error on FreeBSD and possible patch |
Date: |
Mon, 16 Jun 2003 11:01:06 +0900 |
Hi,
> global 4.5.3 does not build on FreeBSD. The error is:
...
> Maybe it's better to add autoconf HAVE_XXX macros.
According to your advice, I rewrote these definitions using HAVE_XXX macros.
Since FreeBSD has all the functions, these definitions will be ignored.
Thank you!
Index: configure.ac
===================================================================
RCS file: /cvsroot/global/global/configure.ac,v
retrieving revision 1.12
diff -c -r1.12 configure.ac
*** configure.ac 14 Jun 2003 06:17:03 -0000 1.12
--- configure.ac 16 Jun 2003 01:45:32 -0000
***************
*** 96,101 ****
--- 96,102 ----
AC_TYPE_SIGNAL
AC_FUNC_STRFTIME
AC_CHECK_FUNCS(getcwd putenv strdup lstat snprintf utimes)
+ AC_CHECK_FUNCS(index rindex bzero bcmp bcopy strchr strrchr memset memcmp
memmove)
AG_DJGPP
INCLUDES='-I$(top_srcdir)/libutil -I$(top_srcdir)/libdb
-I$(top_srcdir)/libglibc'
Index: libdb/compat.h
===================================================================
RCS file: /cvsroot/global/global/libdb/compat.h,v
retrieving revision 1.2
diff -c -r1.2 compat.h
*** libdb/compat.h 30 Nov 2001 04:09:41 -0000 1.2
--- libdb/compat.h 16 Jun 2003 01:45:32 -0000
***************
*** 83,100 ****
#endif
#endif
! #if defined(SYSV) || defined(SYSTEM5)
#define index(a, b) strchr(a, b)
#define rindex(a, b) strrchr(a, b)
#define bzero(a, b) memset(a, 0, b)
#define bcmp(a, b, n) memcmp(a, b, n)
#define bcopy(a, b, n) memmove(b, a, n)
#endif
! #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)
#endif
--- 83,132 ----
#endif
#endif
! /*
! * Old definitions were rewritten using 'HAVE_XXX' macros.
! *
! * #if defined(SYSV) || defined(SYSTEM5)
! * #define index(a, b) strchr(a, b)
! * #define rindex(a, b) strrchr(a, b)
! * #define bzero(a, b) memset(a, 0, b)
! * #define bcmp(a, b, n) memcmp(a, b, n)
! * #define bcopy(a, b, n) memmove(b, a, n)
! * #endif
! *
! * #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)
! * #endif
! */
! #if !defined (HAVE_INDEX) && defined (HAVE_STRCHR)
#define index(a, b) strchr(a, b)
+ #endif
+ #if !defined (HAVE_RINDEX) && defined (HAVE_STRRCHR)
#define rindex(a, b) strrchr(a, b)
+ #endif
+ #if !defined (HAVE_BZERO) && defined (HAVE_MEMSET)
#define bzero(a, b) memset(a, 0, b)
+ #endif
+ #if !defined (HAVE_BCMP) && defined (HAVE_MEMCMP)
#define bcmp(a, b, n) memcmp(a, b, n)
+ #endif
+ #if !defined (HAVE_BCOPY) && defined (HAVE_MEMMOVE)
#define bcopy(a, b, n) memmove(b, a, n)
#endif
! #if !defined (HAVE_STRCHR) && defined (HAVE_INDEX)
#define strchr(a, b) index(a, b)
+ #endif
+ #if !defined (HAVE_STRRCHR) && defined (HAVE_RINDEX)
#define strrchr(a, b) rindex(a, b)
+ #endif
+ #if !defined (HAVE_MEMCMP) && defined (HAVE_BCMP)
#define memcmp(a, b, n) bcmp(a, b, n)
+ #endif
+ #if !defined (HAVE_MEMMOVE) && defined (HAVE_BCOPY)
#define memmove(a, b, n) bcopy(b, a, n)
#endif
--
Shigio Yamaguchi <address@hidden> - Tama Communications Corporation
Spare mail address: <address@hidden>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663 C4B6 3CA5 BBB3 57BE DDA3