summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-09-19 14:57:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:30:52 -0500
commit68edc3a5c5a3cfeed222a95bbe75dadd41dbb5ea (patch)
tree704b256ceb18ccfb5fdd85d8831af3e039029803 /source3/lib
parent10cb1b87ed44540454fd99b817c0a7a9d74afea2 (diff)
downloadsamba-68edc3a5c5a3cfeed222a95bbe75dadd41dbb5ea.tar.gz
samba-68edc3a5c5a3cfeed222a95bbe75dadd41dbb5ea.tar.bz2
samba-68edc3a5c5a3cfeed222a95bbe75dadd41dbb5ea.zip
r25232: sync lib/replace with SAMBA_4_0
metze (This used to be commit 828d2ca0610ab5ee3b96d187b3432b9b4fea72f8)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/replace/README1
-rw-r--r--source3/lib/replace/dlfcn.m42
-rw-r--r--source3/lib/replace/libreplace.m412
-rw-r--r--source3/lib/replace/libreplace_cc.m42
-rw-r--r--source3/lib/replace/replace.h10
-rw-r--r--source3/lib/replace/system/network.h8
-rw-r--r--source3/lib/replace/test/testsuite.c2
7 files changed, 13 insertions, 24 deletions
diff --git a/source3/lib/replace/README b/source3/lib/replace/README
index e7b89936c0..77558b2ca9 100644
--- a/source3/lib/replace/README
+++ b/source3/lib/replace/README
@@ -92,7 +92,6 @@ ZERO_STRUCTPN
ZERO_ARRAY
ARRAY_SIZE
PTR_DIFF
-offsetof
Headers:
stdint.h
diff --git a/source3/lib/replace/dlfcn.m4 b/source3/lib/replace/dlfcn.m4
index a1b57d10ec..c5b7597d7a 100644
--- a/source3/lib/replace/dlfcn.m4
+++ b/source3/lib/replace/dlfcn.m4
@@ -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>
])
diff --git a/source3/lib/replace/libreplace.m4 b/source3/lib/replace/libreplace.m4
index f06d7f83dc..a6b1c4f5e6 100644
--- a/source3/lib/replace/libreplace.m4
+++ b/source3/lib/replace/libreplace.m4
@@ -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],
diff --git a/source3/lib/replace/libreplace_cc.m4 b/source3/lib/replace/libreplace_cc.m4
index 780cf62dec..a01bf1b290 100644
--- a/source3/lib/replace/libreplace_cc.m4
+++ b/source3/lib/replace/libreplace_cc.m4
@@ -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])
diff --git a/source3/lib/replace/replace.h b/source3/lib/replace/replace.h
index 06173bd84b..90d65931e7 100644
--- a/source3/lib/replace/replace.h
+++ b/source3/lib/replace/replace.h
@@ -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
diff --git a/source3/lib/replace/system/network.h b/source3/lib/replace/system/network.h
index 13d95a8ba7..7469040b28 100644
--- a/source3/lib/replace/system/network.h
+++ b/source3/lib/replace/system/network.h
@@ -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
diff --git a/source3/lib/replace/test/testsuite.c b/source3/lib/replace/test/testsuite.c
index 8584bcaa66..269a2ff5d6 100644
--- a/source3/lib/replace/test/testsuite.c
+++ b/source3/lib/replace/test/testsuite.c
@@ -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;
}