diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-09-14 08:26:41 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:18:40 -0500 |
commit | a0e87e5dc79bc631cb2362ebbf4d91913a342273 (patch) | |
tree | 7b7dfd24fcbf6f634a1d5dde4d5ffdca95d326ac /source4/lib/replace/repdir.m4 | |
parent | 595c141a69ea0744fccba477717a71fa4abeb825 (diff) | |
download | samba-a0e87e5dc79bc631cb2362ebbf4d91913a342273.tar.gz samba-a0e87e5dc79bc631cb2362ebbf4d91913a342273.tar.bz2 samba-a0e87e5dc79bc631cb2362ebbf4d91913a342273.zip |
r18505: add configure checks for telldir() and seekdir()
telldir() is different on older OpenBSD versions
seekdir() is different Tru64
tridge: OpenBSD seems to like this replacement:-)
while MAC OS 10 gets 134 runtime error:-(
lets wait what Tru64 will give
metze
(This used to be commit 1f4e602ff239b7feabb2dd1d6938dedf91bde5cd)
Diffstat (limited to 'source4/lib/replace/repdir.m4')
-rw-r--r-- | source4/lib/replace/repdir.m4 | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/source4/lib/replace/repdir.m4 b/source4/lib/replace/repdir.m4 index 06a01964a8..93bf4ec911 100644 --- a/source4/lib/replace/repdir.m4 +++ b/source4/lib/replace/repdir.m4 @@ -14,7 +14,7 @@ if test x"$libreplace_READDIR_NEEDED" = x"yes"; then AC_CHECK_FUNCS(getdents) AC_CACHE_CHECK([for replacing readdir using getdents()],libreplace_READDIR_GETDENTS,[ AC_TRY_RUN([ -#include "confdefs.h" +#define _LIBREPLACE_REPLACE_H #include "$libreplacedir/repdir_getdents.c" #define test_readdir_os2_delete main #include "$libreplacedir/test/os2_delete.c"], @@ -34,9 +34,26 @@ fi # if test x"$libreplace_READDIR_NEEDED" = x"yes"; then AC_CHECK_FUNCS(getdirentries) +AC_VERIFY_C_PROTOTYPE([long telldir(const DIR *dir)], + [ + return 0; + ],[ + AC_DEFINE(TELLDIR_TAKES_CONST_DIR, 1, [Whether telldir takes a const pointer]) + ],[],[ + #include <dirent.h> + ]) + +AC_VERIFY_C_PROTOTYPE([int seekdir(DIR *dir, long ofs)], + [ + return 0; + ],[ + AC_DEFINE(SEEKDIR_RETURNS_INT, 1, [Whether seekdir returns an int]) + ],[],[ + #include <dirent.h> + ]) AC_CACHE_CHECK([for replacing readdir using getdirentries()],libreplace_READDIR_GETDIRENTRIES,[ AC_TRY_RUN([ -#include "confdefs.h" +#define _LIBREPLACE_REPLACE_H #include "$libreplacedir/repdir_getdirentries.c" #define test_readdir_os2_delete main #include "$libreplacedir/test/os2_delete.c"], |