diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-09-13 10:00:45 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:18:32 -0500 |
commit | dfef2dc22fd8188b5ac577c7c87ab6f58ebb6440 (patch) | |
tree | 81c14f62ecafdc9d014092185f2ece474fe69fc1 | |
parent | c564344766c1e888c0ab3f866ea4b3318135d0e5 (diff) | |
download | samba-dfef2dc22fd8188b5ac577c7c87ab6f58ebb6440.tar.gz samba-dfef2dc22fd8188b5ac577c7c87ab6f58ebb6440.tar.bz2 samba-dfef2dc22fd8188b5ac577c7c87ab6f58ebb6440.zip |
r18452: add configure test for a getdirentries() based replacement for broken readdir()
Tru64 need this, linux also has getdirentries() but the native readdir() works
but it means we can write the code on linux and when it works it may work on Tru64
too.
tridge: can you try to implement this?
metze
(This used to be commit dd791d255ca61159b38a59b89f954a61fc5e9cf6)
-rw-r--r-- | source4/lib/replace/repdir.m4 | 25 | ||||
-rw-r--r-- | source4/lib/replace/repdir_getdirentries.c | 1 |
2 files changed, 26 insertions, 0 deletions
diff --git a/source4/lib/replace/repdir.m4 b/source4/lib/replace/repdir.m4 index d15e4cb7af..a2f7bfa009 100644 --- a/source4/lib/replace/repdir.m4 +++ b/source4/lib/replace/repdir.m4 @@ -28,3 +28,28 @@ if test x"$libreplace_READDIR_GETDENTS" = x"yes"; then LIBREPLACEOBJ="${LIBREPLACEOBJ} repdir_getdents.o" libreplace_READDIR_NEEDED=no fi + +# +# try to replace with getdirentries() if needed +# +if test x"$libreplace_READDIR_NEEDED" = x"yes"; then +AC_CACHE_CHECK([for replacing readdir using getdirentries()],libreplace_READDIR_GETDIRENTRIES,[ + AC_TRY_RUN([ +#include "confdefs.h" +#include "$libreplacedir/repdir_getdirentries.c" +#define test_readdir_os2_delete main +#include "$libreplacedir/test/os2_delete.c"], + [libreplace_READDIR_GETDIRENTRIES=yes], + [libreplace_READDIR_GETDIRENTRIES=no]) +]) +fi +if test x"$libreplace_READDIR_GETDIRENTRIES" = x"yes"; then + AC_DEFINE(REPLACE_READDIR,1,[replace readdir]) + AC_DEFINE(REPLACE_READDIR_GETDIRENTRIES,1,[replace readdir using getdirentries()]) + LIBREPLACEOBJ="${LIBREPLACEOBJ} repdir_getdirentries.o" + libreplace_READDIR_NEEDED=no +fi + +if test x"$libreplace_READDIR_NEEDED" = x"yes"; then + AC_MSG_WARN([the provides readdir() is broken]) +fi diff --git a/source4/lib/replace/repdir_getdirentries.c b/source4/lib/replace/repdir_getdirentries.c new file mode 100644 index 0000000000..ff93ed4ea3 --- /dev/null +++ b/source4/lib/replace/repdir_getdirentries.c @@ -0,0 +1 @@ +#error "the readdir() replacement using getdirentried() isn't implemented yet" |