diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-09-16 16:30:14 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-09-16 16:30:14 +0200 |
commit | 0888ffa2b7382a1c4781ae54bad53eac3b229365 (patch) | |
tree | 5a0fb9930c68f307954f87a9aa97e83740d3ab59 /source4/lib/replace/repdir.m4 | |
parent | ec1c854f2175823bd1ad39c2e272d1b3fab80bf1 (diff) | |
download | samba-0888ffa2b7382a1c4781ae54bad53eac3b229365.tar.gz samba-0888ffa2b7382a1c4781ae54bad53eac3b229365.tar.bz2 samba-0888ffa2b7382a1c4781ae54bad53eac3b229365.zip |
Make Samba 3 and Samba 4 both use the same single copy of libreplace.
Diffstat (limited to 'source4/lib/replace/repdir.m4')
-rw-r--r-- | source4/lib/replace/repdir.m4 | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/source4/lib/replace/repdir.m4 b/source4/lib/replace/repdir.m4 deleted file mode 100644 index f53a4c2974..0000000000 --- a/source4/lib/replace/repdir.m4 +++ /dev/null @@ -1,78 +0,0 @@ -AC_CACHE_CHECK([for broken readdir],libreplace_cv_READDIR_NEEDED,[ - AC_TRY_RUN([ -#define test_readdir_os2_delete main -#include "$libreplacedir/test/os2_delete.c"], - [libreplace_cv_READDIR_NEEDED=no], - [libreplace_cv_READDIR_NEEDED=yes], - [libreplace_cv_READDIR_NEEDED="assuming not"]) -]) - -# -# try to replace with getdirentries() if needed -# -if test x"$libreplace_cv_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_cv_READDIR_GETDIRENTRIES,[ - AC_TRY_RUN([ -#define _LIBREPLACE_REPLACE_H -#include "$libreplacedir/repdir_getdirentries.c" -#define test_readdir_os2_delete main -#include "$libreplacedir/test/os2_delete.c"], - [libreplace_cv_READDIR_GETDIRENTRIES=yes], - [libreplace_cv_READDIR_GETDIRENTRIES=no]) -]) -fi -if test x"$libreplace_cv_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_cv_READDIR_NEEDED=no -fi - -# -# try to replace with getdents() if needed -# -if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then -AC_CHECK_FUNCS(getdents) -AC_CACHE_CHECK([for replacing readdir using getdents()],libreplace_cv_READDIR_GETDENTS,[ - AC_TRY_RUN([ -#define _LIBREPLACE_REPLACE_H -#error _donot_use_getdents_replacement_anymore -#include "$libreplacedir/repdir_getdents.c" -#define test_readdir_os2_delete main -#include "$libreplacedir/test/os2_delete.c"], - [libreplace_cv_READDIR_GETDENTS=yes], - [libreplace_cv_READDIR_GETDENTS=no]) -]) -fi -if test x"$libreplace_cv_READDIR_GETDENTS" = x"yes"; then - AC_DEFINE(REPLACE_READDIR,1,[replace readdir]) - AC_DEFINE(REPLACE_READDIR_GETDENTS,1,[replace readdir using getdents()]) - LIBREPLACEOBJ="${LIBREPLACEOBJ} repdir_getdents.o" - libreplace_cv_READDIR_NEEDED=no -fi - -AC_MSG_CHECKING([a usable readdir()]) -if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then - AC_MSG_RESULT(no) - AC_MSG_WARN([the provided readdir() is broken]) -else - AC_MSG_RESULT(yes) -fi |