From 3de6b469ccadfbaa0c16535c3f17049ffb96aef1 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 13 Sep 2006 16:15:38 +0000 Subject: r18479: start hiding libreplace configure tests behind macros AC_LIBREPLACE_CC_CHECKS AC_LIBREPLACE_BROKEN_CHECKS and AC_LIBREPLACE_ALL_CHECKS which calls the 2 others I'll add some more, so that samba3/samba4 can later call them in the wanted order and all standalone builds use AC_LIBREPLACE_ALL_CHECKS. metze (This used to be commit e7a30456c76f4bf9a79cdcff6b15c894bc20c954) --- source4/lib/replace/libreplace_cc.m4 | 99 ++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 source4/lib/replace/libreplace_cc.m4 (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 new file mode 100644 index 0000000000..4dfe32e7a7 --- /dev/null +++ b/source4/lib/replace/libreplace_cc.m4 @@ -0,0 +1,99 @@ + +AC_DEFUN_ONCE(AC__LIBREPLACE_ONLY_CC_CHECKS_START, +[ +echo "LIBREPLACE_CC_CHECKS: START" +]) + +AC_DEFUN_ONCE(AC__LIBREPLACE_ONLY_CC_CHECKS_END, +[ +echo "LIBREPLACE_CC_CHECKS: END" +]) + +dnl +dnl +dnl AC_LIBREPLACE_CC_CHECKS +dnl +dnl Note: we need to use m4_define instead of AC_DEFUN because +dnl of the ordering of tests +dnl +dnl +m4_define(AC_LIBREPLACE_CC_CHECKS, +[ +AC__LIBREPLACE_ONLY_CC_CHECKS_START + +dnl stop the C89 attempt by autoconf - if autoconf detects -Ae it will enable it +dnl which conflicts with C99 on HPUX +ac_cv_prog_cc_Ae=no + +savedCFLAGS=$CFLAGS +AC_PROG_CC +CFLAGS=$savedCFLAGS +dnl AC_PROG_CPP +dnl AC_PROG_EGREP +dnl AC_GNU_SOURCE +dnl AC_AIX +dnl AC_MINIX +dnl AC_GNU_SOURCE +dnl AC_INCLUDES_DEFAULT +dnl AC_USE_SYSTEM_EXTENSIONS +dnl AC_INCLUDES_DEFAULT +dnl AC_HEADER_STDC +AC_ISC_POSIX +AC_USE_SYSTEM_EXTENSIONS +AC_PROG_CC_C99 +AC_C_INLINE +AC_C_BIGENDIAN +AC_PROG_INSTALL + +AH_VERBATIM([_XOPEN_SOURCE_EXTENDED], +[/* Enable XOPEN extensions on systems that have them. */ +#ifndef _XOPEN_SOURCE_EXTENDED +# define _XOPEN_SOURCE_EXTENDED 1 +#endif]) + +AH_VERBATIM([_OSF_SOURCE], +[/* Enable OSF extensions on systems that have them. */ +#ifndef _OSF_SOURCE +# define _OSF_SOURCE 1 +#endif]) + +LIBREPLACE_C99_STRUCT_INIT([],[AC_MSG_WARN([c99 structure initializer are not supported])]) + +AC_SYS_LARGEFILE + +dnl Add #include for broken IRIX header files +case "$host_os" in + *irix6*) AC_ADD_INCLUDE() + ;; +esac + +AC_CHECK_HEADERS([standards.h]) + +AC_CHECK_TYPE(uint_t, unsigned int) +AC_CHECK_TYPE(int8_t, char) +AC_CHECK_TYPE(uint8_t, unsigned char) +AC_CHECK_TYPE(int16_t, short) +AC_CHECK_TYPE(uint16_t, unsigned short) +AC_CHECK_TYPE(int32_t, long) +AC_CHECK_TYPE(uint32_t, unsigned long) +AC_CHECK_TYPE(int64_t, long long) +AC_CHECK_TYPE(uint64_t, unsigned long long) + +AC_CHECK_TYPE(size_t, unsigned int) +AC_CHECK_TYPE(ssize_t, int) + +AC_CHECK_SIZEOF(int) +AC_CHECK_SIZEOF(char) +AC_CHECK_SIZEOF(short) +AC_CHECK_SIZEOF(long) +AC_CHECK_SIZEOF(long long) + +AC_CHECK_SIZEOF(off_t) +AC_CHECK_SIZEOF(size_t) +AC_CHECK_SIZEOF(ssize_t) + +AC_CHECK_TYPE(intptr_t, unsigned long long) +AC_CHECK_TYPE(ptrdiff_t, unsigned long long) + +AC__LIBREPLACE_ONLY_CC_CHECKS_END +]) dnl end AC_LIBREPLACE_CC_CHECKS -- cgit From f80d6bc100ed7b9c8bf83525c3e68c1272de84c3 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 13 Sep 2006 17:38:49 +0000 Subject: r18486: hopefully this fixes the panics on solaris metze (This used to be commit 22cfc3404ccb621dad194fe04c5f2885fb16f79c) --- source4/lib/replace/libreplace_cc.m4 | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index 4dfe32e7a7..dd06a6c0f7 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -69,6 +69,9 @@ esac AC_CHECK_HEADERS([standards.h]) +# Solaris needs HAVE_LONG_LONG defined +AC_CHECK_TYPES(long long) + AC_CHECK_TYPE(uint_t, unsigned int) AC_CHECK_TYPE(int8_t, char) AC_CHECK_TYPE(uint8_t, unsigned char) -- cgit From 6fa6c74d5959471a2b8d07a2e1e508d299bc2b8d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 13 Sep 2006 22:31:25 +0000 Subject: r18488: we have to make sure any extensions flags also make it into confdefs.h, otherwise the real build and the configure tests will not be significant this change fixes the build of libreplace on hpux with gcc (This used to be commit d37fc315325c93414ce0942d28f0f47b42873b95) --- source4/lib/replace/libreplace_cc.m4 | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index dd06a6c0f7..2c58933a65 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -45,17 +45,9 @@ AC_C_INLINE AC_C_BIGENDIAN AC_PROG_INSTALL -AH_VERBATIM([_XOPEN_SOURCE_EXTENDED], -[/* Enable XOPEN extensions on systems that have them. */ -#ifndef _XOPEN_SOURCE_EXTENDED -# define _XOPEN_SOURCE_EXTENDED 1 -#endif]) - -AH_VERBATIM([_OSF_SOURCE], -[/* Enable OSF extensions on systems that have them. */ -#ifndef _OSF_SOURCE -# define _OSF_SOURCE 1 -#endif]) + +AC_EXTENSION_FLAG(_XOPEN_SOURCE_EXTENDED) +AC_EXTENSION_FLAG(_OSF_SOURCE) LIBREPLACE_C99_STRUCT_INIT([],[AC_MSG_WARN([c99 structure initializer are not supported])]) -- cgit From 8ed1176a8d3ae80d27010243e389d449ab5a0148 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 14 Sep 2006 06:39:48 +0000 Subject: r18501: libreplace needs 'long long', bailout if not present or the size is not 8 bytes or more. samba4 doesn't need type checks anymore metze (This used to be commit d8fdd05482fc6b9bfb48d72db6b467e3e5c05e4d) --- source4/lib/replace/libreplace_cc.m4 | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index 2c58933a65..9f6912741e 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -90,5 +90,12 @@ AC_CHECK_SIZEOF(ssize_t) AC_CHECK_TYPE(intptr_t, unsigned long long) AC_CHECK_TYPE(ptrdiff_t, unsigned long long) +if test x"$ac_cv_type_long_long" != x"yes";then + AC_MSG_ERROR([LIBREPLACE needs type 'long long']) +fi +if test $ac_cv_sizeof_long_long -lt 8;then + AC_MSG_ERROR([LIBREPLACE needs sizeof(long long) >= 8]) +fi + AC__LIBREPLACE_ONLY_CC_CHECKS_END ]) dnl end AC_LIBREPLACE_CC_CHECKS -- cgit From d184a9cc329c900f98147423e3350cfeb22e1e88 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 14 Sep 2006 07:22:38 +0000 Subject: r18502: remove unused lines metze (This used to be commit 37f55c08c304feddf2ca5d0d20deeb9a6317e2c3) --- source4/lib/replace/libreplace_cc.m4 | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index 9f6912741e..5e44da73a3 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -28,16 +28,6 @@ ac_cv_prog_cc_Ae=no savedCFLAGS=$CFLAGS AC_PROG_CC CFLAGS=$savedCFLAGS -dnl AC_PROG_CPP -dnl AC_PROG_EGREP -dnl AC_GNU_SOURCE -dnl AC_AIX -dnl AC_MINIX -dnl AC_GNU_SOURCE -dnl AC_INCLUDES_DEFAULT -dnl AC_USE_SYSTEM_EXTENSIONS -dnl AC_INCLUDES_DEFAULT -dnl AC_HEADER_STDC AC_ISC_POSIX AC_USE_SYSTEM_EXTENSIONS AC_PROG_CC_C99 -- cgit From fafa8c3e47497a9f399e9ca52a7e6a904f1fb9f6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 14 Sep 2006 18:46:10 +0000 Subject: r18535: move the AC_CANONICAL_HOST and host specific flag tests into libreplace. This should fix the standalone build of tdb on HPUX, where we need to blacklist mmap. Unfortunately this requires that we have a copy of config.guess and config.sub in each of our project subdirectories. I tried to find a way to use something like AC_CONFIG_AUX_DIR($libreplacedir) and just put config.{guess,sub} in the lib/replace/ directory, but I couldn't figure out how to do that in a way that kept autoconf happy for each of our separate builds. Any autoconf guru out there see a way to do this? (This used to be commit 823cd3ab35456769dcefee17bdaca21f01ba0f63) --- source4/lib/replace/libreplace_cc.m4 | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index 5e44da73a3..4f2ce034bf 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -47,8 +47,39 @@ dnl Add #include for broken IRIX header files case "$host_os" in *irix6*) AC_ADD_INCLUDE() ;; + *hpux*) + # mmap on HPUX is completely broken... + AC_DEFINE(MMAP_BLACKLIST, 1, [Whether MMAP is broken]) + ;; + *aix*) + if test "${GCC}" != "yes"; then + ## for funky AIX compiler using strncpy() + CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000" + fi + ;; + # + # VOS may need to have POSIX support and System V compatibility enabled. + # + *vos*) + case "$CFLAGS" in + *-D_POSIX_C_SOURCE*);; + *) + CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112L" + AC_DEFINE(_POSIX_C_SOURCE, 200112L, [Whether to enable POSIX support]) + ;; + esac + case "$CFLAGS" in + *-D_SYSV*|*-D_SVID_SOURCE*);; + *) + CFLAGS="$CFLAGS -D_SYSV" + AC_DEFINE(_SYSV, 1, [Whether to enable System V compatibility]) + ;; + esac + ;; esac + + AC_CHECK_HEADERS([standards.h]) # Solaris needs HAVE_LONG_LONG defined -- cgit From a8fd66f91fcb16dd56890f918e47443f2aba3a98 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 15 Sep 2006 10:54:18 +0000 Subject: r18549: move gcc version check to libreplace and reorder the tests a bit for nicer output metze (This used to be commit 888a769af557d050d99df703ce5f651688c837c5) --- source4/lib/replace/libreplace_cc.m4 | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index 4f2ce034bf..aa0465983a 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -28,19 +28,23 @@ ac_cv_prog_cc_Ae=no savedCFLAGS=$CFLAGS AC_PROG_CC CFLAGS=$savedCFLAGS -AC_ISC_POSIX -AC_USE_SYSTEM_EXTENSIONS AC_PROG_CC_C99 -AC_C_INLINE +if test x"$GCC" = x"yes" ; then + AC_MSG_CHECKING([for version of gcc]) + GCC_VERSION=`$CC -dumpversion` + AC_MSG_RESULT(${GCC_VERSION}) +fi +AC_USE_SYSTEM_EXTENSIONS AC_C_BIGENDIAN -AC_PROG_INSTALL +AC_C_INLINE +LIBREPLACE_C99_STRUCT_INIT([],[AC_MSG_WARN([c99 structure initializer are not supported])]) +AC_PROG_INSTALL +AC_ISC_POSIX AC_EXTENSION_FLAG(_XOPEN_SOURCE_EXTENDED) AC_EXTENSION_FLAG(_OSF_SOURCE) -LIBREPLACE_C99_STRUCT_INIT([],[AC_MSG_WARN([c99 structure initializer are not supported])]) - AC_SYS_LARGEFILE dnl Add #include for broken IRIX header files -- cgit From a90eba6316b89c3e387e0c52af22b5344a5de2f2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 24 Sep 2006 01:52:20 +0000 Subject: r18859: finally worked out what is going wrong with immediate structures. The problem is that the AC_PROG_CC_C99 macro ends up selecting either -std=std99 or -std=gnu99 for gcc. Ironically enough, that breaks constant structure initialisers! So, simplest solution is to not try that configure test if we know we are using gcc (This used to be commit 331435daf3275acaf282c1032c6e9f7dc3e685bb) --- source4/lib/replace/libreplace_cc.m4 | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index aa0465983a..352d115547 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -28,7 +28,13 @@ ac_cv_prog_cc_Ae=no savedCFLAGS=$CFLAGS AC_PROG_CC CFLAGS=$savedCFLAGS + +dnl don't try for C99 if we are using gcc, as otherwise we +dnl lose immediate structure constants +if test x"$GCC" = x"no" ; then AC_PROG_CC_C99 +fi + if test x"$GCC" = x"yes" ; then AC_MSG_CHECKING([for version of gcc]) GCC_VERSION=`$CC -dumpversion` @@ -122,5 +128,26 @@ if test $ac_cv_sizeof_long_long -lt 8;then AC_MSG_ERROR([LIBREPLACE needs sizeof(long long) >= 8]) fi +############################################ +# check if the compiler can do immediate structures +AC_CACHE_CHECK([for immediate structures],samba_cv_immediate_structures, [ + AC_TRY_COMPILE([ +#include ], +[ + typedef struct {unsigned x;} FOOBAR; + #define X_FOOBAR(x) ((FOOBAR) { x }) + #define FOO_ONE X_FOOBAR(1) + FOOBAR f = FOO_ONE; + static const struct { + FOOBAR y; + } f2[] = { + {FOO_ONE} + }; +], + samba_cv_immediate_structures=yes,samba_cv_immediate_structures=no)]) +if test x"$samba_cv_immediate_structures" = x"yes"; then + AC_DEFINE(HAVE_IMMEDIATE_STRUCTURES,1,[Whether the compiler supports immediate structures]) +fi + AC__LIBREPLACE_ONLY_CC_CHECKS_END ]) dnl end AC_LIBREPLACE_CC_CHECKS -- cgit From ed7639a3042c902bbab8633ef45fd30de85d214c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 26 Sep 2006 03:11:31 +0000 Subject: r18913: an attempt to get tdb/ldb working on the HPUX box 'gwen'. This idea come from Don McCall. Don may well be able to provide us with a configure test in the future which does this in a nicer way, I just want to see if it works now. (This used to be commit f7f548a1c79a78a1b15e96732994135cba94aa3d) --- source4/lib/replace/libreplace_cc.m4 | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index 352d115547..37c1551351 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -60,6 +60,7 @@ case "$host_os" in *hpux*) # mmap on HPUX is completely broken... AC_DEFINE(MMAP_BLACKLIST, 1, [Whether MMAP is broken]) + CFLAGS="$CFLAGS -D_LARGEFILE64_SUPPORT -D__LP64__ -DO_LARGEFILE=04000" ;; *aix*) if test "${GCC}" != "yes"; then -- cgit From 410256e75aa720b4d88822ae415b44556bb79464 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 26 Sep 2006 05:40:57 +0000 Subject: r18914: this bug fix needs to be for just hpux 11.11 (This used to be commit 2cccede13d34011767159c3345bb6da24ed09bd3) --- source4/lib/replace/libreplace_cc.m4 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index 37c1551351..b3b2b0d2bb 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -60,7 +60,10 @@ case "$host_os" in *hpux*) # mmap on HPUX is completely broken... AC_DEFINE(MMAP_BLACKLIST, 1, [Whether MMAP is broken]) - CFLAGS="$CFLAGS -D_LARGEFILE64_SUPPORT -D__LP64__ -DO_LARGEFILE=04000" + if test "`uname -r`" = "B.11.11"; then + AC_MSG_WARN([Enabling HPUX 11.11 header bug workaround]) + CFLAGS="$CFLAGS -D_LARGEFILE64_SUPPORT -D__LP64__ -DO_LARGEFILE=04000" + fi ;; *aix*) if test "${GCC}" != "yes"; then -- cgit From 2550f5ae126bf33148dabf30ae97b6d6d82e30a0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 28 Sep 2006 06:43:27 +0000 Subject: r18970: avoid strndup and strnlen on AIX. They are quite broken. See http://lists.samba.org/archive/samba-technical/2004-August/036915.html (This used to be commit c178c84f01166609e6bd3393d39fb0034130167b) --- source4/lib/replace/libreplace_cc.m4 | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index b3b2b0d2bb..73ce01700e 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -66,6 +66,8 @@ case "$host_os" in fi ;; *aix*) + AC_DEFINE(BROKEN_STRNDUP, 1, [Whether strndup is broken]) + AC_DEFINE(BROKEN_STRNLEN, 1, [Whether strnlen is broken]) if test "${GCC}" != "yes"; then ## for funky AIX compiler using strncpy() CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000" -- cgit From ff4e8321303c4ffbd47b762730c3b5f591554654 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 6 Oct 2006 14:04:05 +0000 Subject: r19131: merge from samba3: fix the logic for the AC_PROG_CC_C99 test metze (This used to be commit 5ccc020639b72a75edfc7f29775b298acf27216e) --- source4/lib/replace/libreplace_cc.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index 73ce01700e..77bb5a0598 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -31,7 +31,7 @@ CFLAGS=$savedCFLAGS dnl don't try for C99 if we are using gcc, as otherwise we dnl lose immediate structure constants -if test x"$GCC" = x"no" ; then +if test x"$GCC" != x"yes" ; then AC_PROG_CC_C99 fi -- cgit From 2e059dec541e580df3cb9c62f47c275051bae899 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 8 Oct 2006 21:09:21 +0000 Subject: r19173: see if HPUX 11.23 needs the same workaround as 11.11 metze (This used to be commit 896326d5081da6a20babacf4c28c556fa44216c5) --- source4/lib/replace/libreplace_cc.m4 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index 77bb5a0598..6bbea2977b 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -64,6 +64,10 @@ case "$host_os" in AC_MSG_WARN([Enabling HPUX 11.11 header bug workaround]) CFLAGS="$CFLAGS -D_LARGEFILE64_SUPPORT -D__LP64__ -DO_LARGEFILE=04000" fi + if test "`uname -r`" = "B.11.23"; then + AC_MSG_WARN([Enabling HPUX 11.23 header bug workaround]) + CFLAGS="$CFLAGS -D_LARGEFILE64_SUPPORT -D__LP64__ -DO_LARGEFILE=04000" + fi ;; *aix*) AC_DEFINE(BROKEN_STRNDUP, 1, [Whether strndup is broken]) -- cgit From fd2e67dadff656314b0de72116a97dd1d8080c68 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 9 Oct 2006 07:33:41 +0000 Subject: r19186: that doesn't help... metze (This used to be commit 59c6d51ab31d9d686de35024509f08f5de41c788) --- source4/lib/replace/libreplace_cc.m4 | 4 ---- 1 file changed, 4 deletions(-) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index 6bbea2977b..77bb5a0598 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -64,10 +64,6 @@ case "$host_os" in AC_MSG_WARN([Enabling HPUX 11.11 header bug workaround]) CFLAGS="$CFLAGS -D_LARGEFILE64_SUPPORT -D__LP64__ -DO_LARGEFILE=04000" fi - if test "`uname -r`" = "B.11.23"; then - AC_MSG_WARN([Enabling HPUX 11.23 header bug workaround]) - CFLAGS="$CFLAGS -D_LARGEFILE64_SUPPORT -D__LP64__ -DO_LARGEFILE=04000" - fi ;; *aix*) AC_DEFINE(BROKEN_STRNDUP, 1, [Whether strndup is broken]) -- cgit From d66e80c650ac16c9553223aac0cce7989831569b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 9 Oct 2006 09:12:57 +0000 Subject: r19195: this should fix should workaround the broken HPUX 11.23 on host hpisgr8 in the build-farm. metze (This used to be commit 88adbd744355284df223f5618bd76e3d327055d8) --- source4/lib/replace/libreplace_cc.m4 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index 77bb5a0598..c86f3d3014 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -64,6 +64,10 @@ case "$host_os" in AC_MSG_WARN([Enabling HPUX 11.11 header bug workaround]) CFLAGS="$CFLAGS -D_LARGEFILE64_SUPPORT -D__LP64__ -DO_LARGEFILE=04000" fi + if test "`uname -r`" = "B.11.11"; then + AC_MSG_WARN([Enabling HPUX 11.23 machine/sys/getppdp.h bug workaround]) + CFLAGS="$CFLAGS -D_MACHINE_SYS_GETPPDP_INCLUDED" + fi ;; *aix*) AC_DEFINE(BROKEN_STRNDUP, 1, [Whether strndup is broken]) -- cgit From 0019163d85fce2e83cd3e6193479b59e88d37d98 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 9 Oct 2006 10:44:14 +0000 Subject: r19198: fix typo... metze (This used to be commit 70bab6edfc1c8e52dfa3ff0f02059a2af6086589) --- source4/lib/replace/libreplace_cc.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index c86f3d3014..b8b74036e5 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -64,7 +64,7 @@ case "$host_os" in AC_MSG_WARN([Enabling HPUX 11.11 header bug workaround]) CFLAGS="$CFLAGS -D_LARGEFILE64_SUPPORT -D__LP64__ -DO_LARGEFILE=04000" fi - if test "`uname -r`" = "B.11.11"; then + if test "`uname -r`" = "B.11.23"; then AC_MSG_WARN([Enabling HPUX 11.23 machine/sys/getppdp.h bug workaround]) CFLAGS="$CFLAGS -D_MACHINE_SYS_GETPPDP_INCLUDED" fi -- cgit From 22a155af0568d136a3162fbe45e36993b23d83a3 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 7 Nov 2006 10:44:17 +0000 Subject: r19609: fix uninitialized perl variabel, we need AC_SUBST() for all configure vars we want to use in perl... metze (This used to be commit 2b021e2d8cff1a097068810d379fc0dca6869654) --- source4/lib/replace/libreplace_cc.m4 | 38 ++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 17 deletions(-) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index b8b74036e5..74c53cad99 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -140,23 +140,27 @@ fi ############################################ # check if the compiler can do immediate structures -AC_CACHE_CHECK([for immediate structures],samba_cv_immediate_structures, [ - AC_TRY_COMPILE([ -#include ], -[ - typedef struct {unsigned x;} FOOBAR; - #define X_FOOBAR(x) ((FOOBAR) { x }) - #define FOO_ONE X_FOOBAR(1) - FOOBAR f = FOO_ONE; - static const struct { - FOOBAR y; - } f2[] = { - {FOO_ONE} - }; -], - samba_cv_immediate_structures=yes,samba_cv_immediate_structures=no)]) -if test x"$samba_cv_immediate_structures" = x"yes"; then - AC_DEFINE(HAVE_IMMEDIATE_STRUCTURES,1,[Whether the compiler supports immediate structures]) +AC_SUBST(libreplace_cv_immediate_structures) +AC_CACHE_CHECK([for immediate structures],libreplace_cv_immediate_structures,[ + AC_TRY_COMPILE([ + #include + ],[ + typedef struct {unsigned x;} FOOBAR; + #define X_FOOBAR(x) ((FOOBAR) { x }) + #define FOO_ONE X_FOOBAR(1) + FOOBAR f = FOO_ONE; + static const struct { + FOOBAR y; + } f2[] = { + {FOO_ONE} + }; + ], + libreplace_cv_immediate_structures=yes, + libreplace_cv_immediate_structures=no, + libreplace_cv_immediate_structures=cross) +]) +if test x"$libreplace_cv_immediate_structures" = x"yes"; then + AC_DEFINE(HAVE_IMMEDIATE_STRUCTURES,1,[Whether the compiler supports immediate structures]) fi AC__LIBREPLACE_ONLY_CC_CHECKS_END -- cgit From 1e3a49478ed4dcd58d290f708d995ce4eba8d3ea Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 31 May 2007 12:23:52 +0000 Subject: r23265: HP-UX 11.00 also needs this, try to see if 11.23 is also happy with it... metze (This used to be commit 71eac88f7e666e6cd0dfe113d02861cdfecbee9b) --- source4/lib/replace/libreplace_cc.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index 74c53cad99..3acd0eda8e 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -60,10 +60,10 @@ case "$host_os" in *hpux*) # mmap on HPUX is completely broken... AC_DEFINE(MMAP_BLACKLIST, 1, [Whether MMAP is broken]) - if test "`uname -r`" = "B.11.11"; then +# if test "`uname -r`" = "B.11.11"; then AC_MSG_WARN([Enabling HPUX 11.11 header bug workaround]) CFLAGS="$CFLAGS -D_LARGEFILE64_SUPPORT -D__LP64__ -DO_LARGEFILE=04000" - fi +# fi if test "`uname -r`" = "B.11.23"; then AC_MSG_WARN([Enabling HPUX 11.23 machine/sys/getppdp.h bug workaround]) CFLAGS="$CFLAGS -D_MACHINE_SYS_GETPPDP_INCLUDED" -- cgit From f0daf9602d71ac0938fe982c77c6bcf9720305ca Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 31 May 2007 13:59:08 +0000 Subject: r23266: HP-UX 11.23 doesn't like this, but HP-UX 11.00 and 11.11 need it metze (This used to be commit 6dff6c93fc9073f29b0ae50e4b4abd695918a115) --- source4/lib/replace/libreplace_cc.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index 3acd0eda8e..d4b7cfcdff 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -60,10 +60,10 @@ case "$host_os" in *hpux*) # mmap on HPUX is completely broken... AC_DEFINE(MMAP_BLACKLIST, 1, [Whether MMAP is broken]) -# if test "`uname -r`" = "B.11.11"; then + if test "`uname -r`" = "B.11.00" -o "`uname -r`" = "B.11.11"; then AC_MSG_WARN([Enabling HPUX 11.11 header bug workaround]) CFLAGS="$CFLAGS -D_LARGEFILE64_SUPPORT -D__LP64__ -DO_LARGEFILE=04000" -# fi + fi if test "`uname -r`" = "B.11.23"; then AC_MSG_WARN([Enabling HPUX 11.23 machine/sys/getppdp.h bug workaround]) CFLAGS="$CFLAGS -D_MACHINE_SYS_GETPPDP_INCLUDED" -- cgit From d3807e3f5c2d663b60c3739fb9066c66494eb638 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 1 Jun 2007 13:04:56 +0000 Subject: r23293: the fix for HP-UX 11.11 doesn't work on HP-UX 11.00 we end up with sozeof(uint64_t) == 4 :-( the _APP32_64BIT_OFF_T section in missed to redirect pread, pwrite to pread64, pwrite64 in HP-UX 11.00 so try it manually as a workarround metze (This used to be commit bb2da636be57e44d80b2bb52b3bba5c145f4bc68) --- source4/lib/replace/libreplace_cc.m4 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index d4b7cfcdff..24dab3c7f8 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -60,7 +60,11 @@ case "$host_os" in *hpux*) # mmap on HPUX is completely broken... AC_DEFINE(MMAP_BLACKLIST, 1, [Whether MMAP is broken]) - if test "`uname -r`" = "B.11.00" -o "`uname -r`" = "B.11.11"; then + if test "`uname -r`" = "B.11.00"; then + AC_MSG_WARN([Enabling HPUX 11.00 header bug workaround]) + CFLAGS="$CFLAGS -Dpread=pread64 -Dpwrite=pwrite64" + fi + if test "`uname -r`" = "B.11.11"; then AC_MSG_WARN([Enabling HPUX 11.11 header bug workaround]) CFLAGS="$CFLAGS -D_LARGEFILE64_SUPPORT -D__LP64__ -DO_LARGEFILE=04000" fi -- cgit From 547f27daa2c6281c112031925e9d94f08723d58c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 1 Jun 2007 18:36:55 +0000 Subject: r23296: HP-UX 11.11 also gets sizeof(uint64_t) == 4 so try the same fix as for 11.00 metze (This used to be commit d89088128af89122ef7e0be22697db8dda60ef58) --- source4/lib/replace/libreplace_cc.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index 24dab3c7f8..fe19995db2 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -66,7 +66,8 @@ case "$host_os" in fi if test "`uname -r`" = "B.11.11"; then AC_MSG_WARN([Enabling HPUX 11.11 header bug workaround]) - CFLAGS="$CFLAGS -D_LARGEFILE64_SUPPORT -D__LP64__ -DO_LARGEFILE=04000" + #CFLAGS="$CFLAGS -D_LARGEFILE64_SUPPORT -D__LP64__ -DO_LARGEFILE=04000" + CFLAGS="$CFLAGS -Dpread=pread64 -Dpwrite=pwrite64" fi if test "`uname -r`" = "B.11.23"; then AC_MSG_WARN([Enabling HPUX 11.23 machine/sys/getppdp.h bug workaround]) -- cgit From d596200dde861f42cb989158d17abb9b693aae99 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 2 Jun 2007 08:00:45 +0000 Subject: r23303: so HP-UX 11.11 also likes the 11.00 workarround for broken pread/pwrite when using large file support. metze (This used to be commit d890a2dabf309f15b0b0c87bb3888d0776bd094b) --- source4/lib/replace/libreplace_cc.m4 | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index fe19995db2..a01bf1b290 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -60,13 +60,8 @@ case "$host_os" in *hpux*) # mmap on HPUX is completely broken... AC_DEFINE(MMAP_BLACKLIST, 1, [Whether MMAP is broken]) - if test "`uname -r`" = "B.11.00"; then - AC_MSG_WARN([Enabling HPUX 11.00 header bug workaround]) - CFLAGS="$CFLAGS -Dpread=pread64 -Dpwrite=pwrite64" - fi - if test "`uname -r`" = "B.11.11"; then - AC_MSG_WARN([Enabling HPUX 11.11 header bug workaround]) - #CFLAGS="$CFLAGS -D_LARGEFILE64_SUPPORT -D__LP64__ -DO_LARGEFILE=04000" + if test "`uname -r`" = "B.11.00" -o "`uname -r`" = "B.11.11"; then + AC_MSG_WARN([Enabling HPUX 11.00/11.11 header bug workaround]) CFLAGS="$CFLAGS -Dpread=pread64 -Dpwrite=pwrite64" fi if test "`uname -r`" = "B.11.23"; then -- cgit From a8f264eb2f5b3310d721e79f9ca7e8c47064267e Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 1 Oct 2007 19:30:27 +0000 Subject: r25448: Remove IMMEDIATE_STRUCTURES define, which was used for splint. Newer versions of splint support immediate structures just fine. (This used to be commit d54a47ecdc418ee07c9479f519bd1a207e6ba3eb) --- source4/lib/replace/libreplace_cc.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index a01bf1b290..bd92867d6d 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -159,8 +159,8 @@ AC_CACHE_CHECK([for immediate structures],libreplace_cv_immediate_structures,[ libreplace_cv_immediate_structures=no, libreplace_cv_immediate_structures=cross) ]) -if test x"$libreplace_cv_immediate_structures" = x"yes"; then - AC_DEFINE(HAVE_IMMEDIATE_STRUCTURES,1,[Whether the compiler supports immediate structures]) +if test x"$libreplace_cv_immediate_structures" = x"no"; then + AC_MSG_ERROR([compiler does not support immediate structures]) fi AC__LIBREPLACE_ONLY_CC_CHECKS_END -- cgit From 3b07f6aeb1a060efcf8218e76b8b84fb8850f337 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 5 Oct 2007 12:05:40 +0000 Subject: r25515: Revert r25448: Immediate structures are *not* supportet by the native C compiler at least on Solaris, Tru64 and HP-UX. Michael (This used to be commit 6d07e29de2a7e535139622fa688b407da232c816) --- source4/lib/replace/libreplace_cc.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index bd92867d6d..a01bf1b290 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -159,8 +159,8 @@ AC_CACHE_CHECK([for immediate structures],libreplace_cv_immediate_structures,[ libreplace_cv_immediate_structures=no, libreplace_cv_immediate_structures=cross) ]) -if test x"$libreplace_cv_immediate_structures" = x"no"; then - AC_MSG_ERROR([compiler does not support immediate structures]) +if test x"$libreplace_cv_immediate_structures" = x"yes"; then + AC_DEFINE(HAVE_IMMEDIATE_STRUCTURES,1,[Whether the compiler supports immediate structures]) fi AC__LIBREPLACE_ONLY_CC_CHECKS_END -- cgit From ae75b115787994540ccf1aa1b384331955384fd9 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 15 Nov 2007 14:55:48 +0100 Subject: r25971: libreplace: remove AC_EXTENSION_FLAG as it's the same as AC_N_DEFINE metze (This used to be commit 05b4619c5beff474488d1abe5e647acd94a3e20c) --- source4/lib/replace/libreplace_cc.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index a01bf1b290..a0722b2fcf 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -48,8 +48,8 @@ LIBREPLACE_C99_STRUCT_INIT([],[AC_MSG_WARN([c99 structure initializer are not su AC_PROG_INSTALL AC_ISC_POSIX -AC_EXTENSION_FLAG(_XOPEN_SOURCE_EXTENDED) -AC_EXTENSION_FLAG(_OSF_SOURCE) +AC_N_DEFINE(_XOPEN_SOURCE_EXTENDED) +AC_N_DEFINE(_OSF_SOURCE) AC_SYS_LARGEFILE -- cgit From fc2df89cd7aa702a03bf1a2c47c19af8b0bfa55a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 15 Nov 2007 15:43:14 +0100 Subject: r25974: libreplace: see what the build-farm says if we use _XOPEN_SOURCE=600 On Tru64 this brings in socklen_t and some other socket stuff metze (This used to be commit d42f2e5759332f1f0c6c1269bd29ac62ddb11016) --- source4/lib/replace/libreplace_cc.m4 | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index a0722b2fcf..3f0a337083 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -49,6 +49,7 @@ AC_PROG_INSTALL AC_ISC_POSIX AC_N_DEFINE(_XOPEN_SOURCE_EXTENDED) +AC_N_DEFINE(_XOPEN_SOURCE,600) AC_N_DEFINE(_OSF_SOURCE) AC_SYS_LARGEFILE -- cgit From f744d3bc9fb98491c0b7105eac867b1d3a355d47 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 15 Nov 2007 16:40:32 +0100 Subject: r25976: libreplace: not all platforms like _XOPEN_SOURCE=600 - Only use _XOPEN_SOURCE=600 on Tru64 - _OSF_SOURCE is also Tru64 specific metze (This used to be commit d19ab62081ce4ee4273ff752ad0443782a994826) --- source4/lib/replace/libreplace_cc.m4 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index 3f0a337083..bf5056838d 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -49,8 +49,6 @@ AC_PROG_INSTALL AC_ISC_POSIX AC_N_DEFINE(_XOPEN_SOURCE_EXTENDED) -AC_N_DEFINE(_XOPEN_SOURCE,600) -AC_N_DEFINE(_OSF_SOURCE) AC_SYS_LARGEFILE @@ -78,6 +76,11 @@ case "$host_os" in CFLAGS="$CFLAGS -D_LINUX_SOURCE_COMPAT -qmaxmem=32000" fi ;; + *osf*) + # this brings in socklen_t + AC_N_DEFINE(_XOPEN_SOURCE,600) + AC_N_DEFINE(_OSF_SOURCE) + ;; # # VOS may need to have POSIX support and System V compatibility enabled. # -- cgit From 107ab090e23dfc517bc74bb553315cd3528e1f7d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 17 Apr 2008 14:47:07 +0200 Subject: use uintptr_t instead of intptr_t where appropriate (This used to be commit d62f2bcc85c13605c133db250e0a86d2d6ccc481) --- source4/lib/replace/libreplace_cc.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index bf5056838d..0ce0958a96 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -132,7 +132,8 @@ AC_CHECK_SIZEOF(off_t) AC_CHECK_SIZEOF(size_t) AC_CHECK_SIZEOF(ssize_t) -AC_CHECK_TYPE(intptr_t, unsigned long long) +AC_CHECK_TYPE(intptr_t, long long) +AC_CHECK_TYPE(uintptr_t, unsigned long long) AC_CHECK_TYPE(ptrdiff_t, unsigned long long) if test x"$ac_cv_type_long_long" != x"yes";then -- cgit From 277e095f78ec4d222a6a71ee92d1d83efd08a5e0 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 10 Jun 2008 16:14:30 +0200 Subject: Correctly find a [u]int32_t replacement (cherry picked from commit 346375cda557a675f8f882ca2ae8edffec725a72) (cherry picked from commit 15a53945c9563b4517bd8b69a9bb0554eef5edff) (This used to be commit 46c3fc67e91bbdb820e4bddd085933a8570e504c) --- source4/lib/replace/libreplace_cc.m4 | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index 0ce0958a96..bed05582d8 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -109,25 +109,34 @@ AC_CHECK_HEADERS([standards.h]) # Solaris needs HAVE_LONG_LONG defined AC_CHECK_TYPES(long long) +AC_CHECK_SIZEOF(int) +AC_CHECK_SIZEOF(char) +AC_CHECK_SIZEOF(short) +AC_CHECK_SIZEOF(long) +AC_CHECK_SIZEOF(long long) + AC_CHECK_TYPE(uint_t, unsigned int) AC_CHECK_TYPE(int8_t, char) AC_CHECK_TYPE(uint8_t, unsigned char) AC_CHECK_TYPE(int16_t, short) AC_CHECK_TYPE(uint16_t, unsigned short) + +if test $ac_cv_sizeof_int -eq 4 ; then +AC_CHECK_TYPE(int32_t, int) +AC_CHECK_TYPE(uint32_t, unsigned int) +elif test $ac_cv_size_long -eq 4 ; then AC_CHECK_TYPE(int32_t, long) AC_CHECK_TYPE(uint32_t, unsigned long) +else +AC_MSG_ERROR([LIBREPLACE no 32-bit type found]) +fi + AC_CHECK_TYPE(int64_t, long long) AC_CHECK_TYPE(uint64_t, unsigned long long) AC_CHECK_TYPE(size_t, unsigned int) AC_CHECK_TYPE(ssize_t, int) -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(char) -AC_CHECK_SIZEOF(short) -AC_CHECK_SIZEOF(long) -AC_CHECK_SIZEOF(long long) - AC_CHECK_SIZEOF(off_t) AC_CHECK_SIZEOF(size_t) AC_CHECK_SIZEOF(ssize_t) -- cgit From b3b28162b66117421996008dce29ca25b342e20a Mon Sep 17 00:00:00 2001 From: Yannick Bergeron Date: Wed, 6 Aug 2008 13:23:00 -0400 Subject: Solve an IBM XL C/C++ compiler error encountered in get_exit_code() auth_errors array initialization in client/smbspool.c (cherry picked from commit b45e7fabc64e699e4fa013ef15f98a004dae3f32) (This used to be commit 661f8e166118d257ab32a30392cd616db097bc4c) --- source4/lib/replace/libreplace_cc.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/lib/replace/libreplace_cc.m4') diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index bed05582d8..30c63f2f05 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -167,7 +167,8 @@ AC_CACHE_CHECK([for immediate structures],libreplace_cv_immediate_structures,[ FOOBAR y; } f2[] = { {FOO_ONE} - }; + }; + static const FOOBAR f3[] = {FOO_ONE}; ], libreplace_cv_immediate_structures=yes, libreplace_cv_immediate_structures=no, -- cgit