diff options
-rw-r--r-- | lib/replace/README | 4 | ||||
-rw-r--r-- | lib/replace/libreplace.m4 | 5 | ||||
-rw-r--r-- | lib/replace/replace.h | 9 | ||||
-rw-r--r-- | source3/configure.in | 15 | ||||
-rw-r--r-- | source3/samba4.m4 | 1 |
5 files changed, 20 insertions, 14 deletions
diff --git a/lib/replace/README b/lib/replace/README index 4d94317c4b..2f3b37340f 100644 --- a/lib/replace/README +++ b/lib/replace/README @@ -72,6 +72,7 @@ uint_t uint{8,16,32,64}_t int{8,16,32,64}_t intptr_t +sig_atomic_t Constants: PATH_NAME_MAX @@ -107,6 +108,9 @@ Headers: stdint.h stdbool.h +Optional C keywords: +volatile + Prerequisites: memset (for bzero) syslog (for vsyslog) diff --git a/lib/replace/libreplace.m4 b/lib/replace/libreplace.m4 index 05e73fb569..6f1543863a 100644 --- a/lib/replace/libreplace.m4 +++ b/lib/replace/libreplace.m4 @@ -64,10 +64,10 @@ AC_CHECK_TYPE(offset_t,loff_t) AC_FUNC_MEMCMP -AC_CHECK_FUNCS(pipe strftime srandom random srand rand usleep setbuffer lstat getpgrp) +AC_CHECK_FUNCS([pipe strftime srandom random srand rand usleep setbuffer lstat getpgrp utime utimes]) AC_CHECK_HEADERS(stdbool.h stdint.h sys/select.h) -AC_CHECK_HEADERS(setjmp.h) +AC_CHECK_HEADERS(setjmp.h utime.h) LIBREPLACE_PROVIDE_HEADER([stdint.h]) LIBREPLACE_PROVIDE_HEADER([stdbool.h]) @@ -222,6 +222,7 @@ AC_CHECK_TYPE(comparison_fn_t, AC_HAVE_DECL(setenv, [#include <stdlib.h>]) AC_CHECK_FUNCS(setenv unsetenv) +AC_HAVE_DECL(environ, [#include <unistd.h>]) AC_CHECK_FUNCS(strnlen) AC_CHECK_FUNCS(strtoull __strtoull strtouq strtoll __strtoll strtoq) diff --git a/lib/replace/replace.h b/lib/replace/replace.h index af1208a8fc..a8164b642b 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -182,6 +182,15 @@ char *rep_strndup(const char *s, size_t n); size_t rep_strnlen(const char *s, size_t n); #endif +#if !HAVE_DECL_ENVIRON +#ifdef __APPLE__ +#include <crt_externs.h> +#define environ (*_NSGetEnviron()) +#else +extern char **environ; +#endif +#endif + #ifndef HAVE_SETENV #define setenv rep_setenv int rep_setenv(const char *name, const char *value, int overwrite); diff --git a/source3/configure.in b/source3/configure.in index cd849349c0..a37e97c9da 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -314,14 +314,6 @@ fi fi fi -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], - samba_cv_volatile=yes,samba_cv_volatile=no)]) -if test x"$samba_cv_volatile" = x"yes"; then - AC_DEFINE(HAVE_VOLATILE, 1, [Whether the C compiler understands volatile]) -fi - ############################################ # check if the compiler can handle negative enum values # and don't truncate the values to INT_MAX @@ -661,7 +653,7 @@ AUTH_LIBS="${AUTH_LIBS} ${CRYPT_LIBS}" AC_CHECK_HEADERS(aio.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h rpc/nettype.h) -AC_CHECK_HEADERS(unistd.h utime.h grp.h sys/id.h memory.h alloca.h) +AC_CHECK_HEADERS(unistd.h grp.h sys/id.h memory.h alloca.h) AC_CHECK_HEADERS(limits.h float.h pthread.h) AC_CHECK_HEADERS(rpc/rpc.h rpcsvc/nis.h rpcsvc/ypclnt.h) AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/prctl.h) @@ -1035,7 +1027,7 @@ fi AC_CHECK_FUNCS(waitpid getcwd strdup strndup strnlen strerror chown fchown lchown chmod fchmod chroot link mknod mknod64) AC_CHECK_FUNCS(strtol strtoll strtoul strtoull strtouq __strtoull) -AC_CHECK_FUNCS(fstat strchr utime utimes chflags) +AC_CHECK_FUNCS(fstat strchr chflags) AC_CHECK_FUNCS(getrlimit fsync fdatasync memset strlcpy strlcat setpgid) AC_CHECK_FUNCS(memmove setsid glob strpbrk pipe crypt16 getauthuid) AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent) @@ -6218,6 +6210,8 @@ AC_ARG_ENABLE(merged-build, [AS_HELP_STRING([--enable-merged-build], [Build Samba 4 as well])], [ enable_merged_build=$enableval ], [ enable_merged_build=auto ]) +m4_include(../lib/zlib/zlib.m4) + if test x$enable_merged_build = xauto; then merged_build_possible=yes @@ -6247,7 +6241,6 @@ if test x$enable_merged_build = xyes; then m4_include(samba4.m4) fi -m4_include(../lib/zlib/zlib.m4) AC_SUBST(ZLIB_LIBS) AC_SUBST(ZLIB_OBJS) AC_ZLIB([ZLIB_OBJS=""], [ diff --git a/source3/samba4.m4 b/source3/samba4.m4 index c68057fd35..b99deb8870 100644 --- a/source3/samba4.m4 +++ b/source3/samba4.m4 @@ -37,7 +37,6 @@ m4_include(../lib/util/charset/config.m4) m4_include(lib/socket/config.m4) m4_include(nsswitch/nsstest.m4) m4_include(../pidl/config.m4) -m4_include(../lib/zlib/zlib.m4) AC_ZLIB([ SMB_EXT_LIB(ZLIB, [${ZLIB_LIBS}]) ],[ |