From 24f4b6eff2ed9216be93674310ffcc44b7893895 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 7 Sep 2006 12:10:06 +0000 Subject: r18219: move some more portability checks out of samba4 and info lib/replace (This used to be commit 50318dc55ed5eb70adb02a5680498fad3c3e590d) --- source4/lib/replace/libreplace.m4 | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'source4/lib') diff --git a/source4/lib/replace/libreplace.m4 b/source4/lib/replace/libreplace.m4 index 1b3258e184..c72de29b1e 100644 --- a/source4/lib/replace/libreplace.m4 +++ b/source4/lib/replace/libreplace.m4 @@ -14,6 +14,8 @@ done LIBREPLACEOBJ="dlfcn.o getpass.o replace.o snprintf.o timegm.o" AC_SUBST(LIBREPLACEOBJ) +AC_SYS_LARGEFILE + AC_CHECK_HEADERS([stdint.h inttypes.h]) AC_CHECK_TYPE(uint_t, unsigned int) AC_CHECK_TYPE(uint8_t, unsigned char) @@ -25,6 +27,22 @@ AC_CHECK_TYPE(intptr_t, unsigned long long) AC_CHECK_TYPE(uint32_t, unsigned long) AC_CHECK_TYPE(ssize_t, int) +AC_TYPE_SIGNAL +AC_TYPE_UID_T +AC_TYPE_MODE_T +AC_TYPE_OFF_T +AC_TYPE_SIZE_T +AC_TYPE_PID_T +AC_STRUCT_ST_RDEV +AC_CHECK_TYPE(ino_t,unsigned) +AC_CHECK_TYPE(loff_t,off_t) +AC_CHECK_TYPE(offset_t,loff_t) +AC_CHECK_TYPES(long long) + +AC_FUNC_MEMCMP + +AC_CHECK_FUNCS(pipe strftime srandom random srand rand usleep setbuffer) + AC_CHECK_HEADERS(stdbool.h) AC_CHECK_TYPE(bool, @@ -229,3 +247,16 @@ if test x"$samba_cv_sig_atomic_t" = x"yes"; then fi +AC_CACHE_CHECK([for O_DIRECT flag to open(2)],samba_cv_HAVE_OPEN_O_DIRECT,[ +AC_TRY_COMPILE([ +#include +#ifdef HAVE_FCNTL_H +#include +#endif], +[int fd = open("/dev/null", O_DIRECT);], +samba_cv_HAVE_OPEN_O_DIRECT=yes,samba_cv_HAVE_OPEN_O_DIRECT=no)]) +if test x"$samba_cv_HAVE_OPEN_O_DIRECT" = x"yes"; then + AC_DEFINE(HAVE_OPEN_O_DIRECT,1,[Whether the open(2) accepts O_DIRECT]) +fi + + -- cgit