r25232: sync lib/replace with SAMBA_4_0
authorStefan Metzmacher <metze@samba.org>
Wed, 19 Sep 2007 14:57:20 +0000 (14:57 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:30:52 +0000 (12:30 -0500)
metze

source/lib/replace/README
source/lib/replace/dlfcn.m4
source/lib/replace/libreplace.m4
source/lib/replace/libreplace_cc.m4
source/lib/replace/replace.h
source/lib/replace/system/network.h
source/lib/replace/test/testsuite.c

index e7b89936c0f6520ed707e93958c00230b1399e61..77558b2ca96718f95c3e58a950b0697f1c685e70 100644 (file)
@@ -92,7 +92,6 @@ ZERO_STRUCTPN
 ZERO_ARRAY
 ARRAY_SIZE
 PTR_DIFF
-offsetof
 
 Headers:
 stdint.h
index a1b57d10ec473d17298a32c00191a5f3a9ef09b0..c5b7597d7a3c41bbf47d1f550e8386cb45ef813d 100644 (file)
@@ -12,7 +12,7 @@ AC_VERIFY_C_PROTOTYPE([void *dlopen(const char* filename, unsigned int flags)],
        [
        return 0;
        ],[
-       AC_DEFINE(DLOPEN_TAKES_UNSIGNED_FLAGS, 1, [Whether dlopen takes unsinged int flags])
+       AC_DEFINE(DLOPEN_TAKES_UNSIGNED_FLAGS, 1, [Whether dlopen takes unsigned int flags])
        ],[],[
        #include <dlfcn.h>
        ])
index f06d7f83dc3564cc30135818fce7dc6ee3103be6..a6b1c4f5e68e609a463dd935260cfa6184ad37a4 100644 (file)
@@ -152,6 +152,7 @@ AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror)
 AC_CHECK_FUNCS(vsyslog setlinebuf mktime ftruncate chsize rename)
 AC_CHECK_FUNCS(waitpid strlcpy strlcat initgroups memmove strdup)
 AC_CHECK_FUNCS(pread pwrite strndup strcasestr strtok_r mkdtemp socketpair)
+AC_CHECK_FUNCS(isatty)
 AC_HAVE_DECL(setresuid, [#include <unistd.h>])
 AC_HAVE_DECL(setresgid, [#include <unistd.h>])
 AC_HAVE_DECL(errno, [#include <errno.h>])
@@ -306,17 +307,6 @@ if test x"$samba_cv_HAVE_OPEN_O_DIRECT" = x"yes"; then
 fi 
 
 
-AC_CACHE_CHECK([that the C compiler can precompile header files],samba_cv_precompiled_headers, [
-       dnl Check whether the compiler can generate precompiled headers
-       touch conftest.h
-       if ${CC-cc} conftest.h 2> /dev/null && test -f conftest.h.gch; then
-               precompiled_headers=yes
-       else
-               precompiled_headers=no
-       fi])
-AC_SUBST(precompiled_headers)
-
-
 dnl Check if the C compiler understands volatile (it should, being ANSI).
 AC_CACHE_CHECK([that the C compiler understands volatile],samba_cv_volatile, [
        AC_TRY_COMPILE([#include <sys/types.h>],[volatile int i = 0],
index 780cf62dec8b7c6d60b130b3000a1241e1b4a2c6..a01bf1b2904df87b2a5365bb10b8d2a462365b8c 100644 (file)
@@ -62,7 +62,7 @@ case "$host_os" in
                AC_DEFINE(MMAP_BLACKLIST, 1, [Whether MMAP is broken])
                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 -D_FILE_OFFSET_BITS=64 -Dpread=pread64 -Dpwrite=pwrite64"
+                       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])
index 06173bd84b963e68fd9b980ff2bd7bd88c7987f1..90d65931e7f70e7a1a63781940baea3c7e7ce238 100644 (file)
@@ -375,6 +375,14 @@ ssize_t rep_pwrite(int __fd, const void *__buf, size_t __nbytes, off_t __offset)
 #define HOST_NAME_MAX 64
 #endif
 
+/*
+ * Some older systems seem not to have MAXHOSTNAMELEN
+ * defined.
+ */
+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN HOST_NAME_MAX
+#endif
+
 #ifndef UINT16_MAX
 #define UINT16_MAX 65535
 #endif
@@ -466,7 +474,7 @@ typedef int bool;
 #define __STRING(x)    #x
 #endif
 
-#ifndef _STRINGSTRING
+#ifndef __STRINGSTRING
 #define __STRINGSTRING(x) __STRING(x)
 #endif
 
index 13d95a8ba7b0609e238559c1df11e01a0b5dfdc2..7469040b283fe3633b52e39b46c2e83d70a95782 100644 (file)
@@ -98,14 +98,6 @@ char *rep_inet_ntoa(struct in_addr ip);
 #define MSG_WAITALL 0
 #endif
 
-/*
- * Some older systems seem not to have MAXHOSTNAMELEN
- * defined.
- */
-#ifndef MAXHOSTNAMELEN
-#define MAXHOSTNAMELEN 254
-#endif
-
 #ifndef INADDR_LOOPBACK
 #define INADDR_LOOPBACK 0x7f000001
 #endif
index 8584bcaa667d9b70de3981654469261452bb9758..269a2ff5d625cd26c7daf720efb90edf9c97fb2f 100644 (file)
@@ -743,7 +743,7 @@ static int test_strtoull(void)
        TEST_STRTOULL("-02000000000000000000000",8,     18446744073709551615LLU,        24, ERANGE);
        TEST_STRTOULL("-2000000000000000000000",8,      18446744073709551615LLU,        23, ERANGE);
 
-       printf("success: strtuoll\n");
+       printf("success: strtoull\n");
        return true;
 }