diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-10-06 12:00:23 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:15:14 -0500 |
commit | 803d33a3266497f89edd9bfae92875a9afdd0df2 (patch) | |
tree | 63ada311ef942a943c663d9df047b893395338a8 | |
parent | a0a47d8149207fcfb9aa937d8d6a7c1ff2c8f417 (diff) | |
download | samba-803d33a3266497f89edd9bfae92875a9afdd0df2.tar.gz samba-803d33a3266497f89edd9bfae92875a9afdd0df2.tar.bz2 samba-803d33a3266497f89edd9bfae92875a9afdd0df2.zip |
r19125: merge from samba4
(This used to be commit 65e1500ae6b5ca6334a63f4a18272568202bc048)
-rw-r--r-- | source3/lib/replace/repdir.m4 | 45 | ||||
-rw-r--r-- | source3/lib/replace/test/testsuite.c | 6 | ||||
-rw-r--r-- | source3/lib/talloc/testsuite.c | 38 |
3 files changed, 44 insertions, 45 deletions
diff --git a/source3/lib/replace/repdir.m4 b/source3/lib/replace/repdir.m4 index 81025d618a..f53a4c2974 100644 --- a/source3/lib/replace/repdir.m4 +++ b/source3/lib/replace/repdir.m4 @@ -8,28 +8,6 @@ AC_CACHE_CHECK([for broken readdir],libreplace_cv_READDIR_NEEDED,[ ]) # -# 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 -#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 - -# # try to replace with getdirentries() if needed # if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then @@ -68,6 +46,29 @@ if test x"$libreplace_cv_READDIR_GETDIRENTRIES" = x"yes"; then 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) diff --git a/source3/lib/replace/test/testsuite.c b/source3/lib/replace/test/testsuite.c index fa5265f66f..d45304103f 100644 --- a/source3/lib/replace/test/testsuite.c +++ b/source3/lib/replace/test/testsuite.c @@ -231,14 +231,12 @@ static int test_opendir(void) extern int test_readdir_os2_delete(void); -static bool test_readdir(void) +static int test_readdir(void) { printf("testing readdir\n"); if (test_readdir_os2_delete() != 0) { return false; } - - /* FIXME */ return true; } @@ -400,7 +398,7 @@ bool torture_local_replace(struct torture_context *torture) ret &= test_vasprintf(); ret &= test_vsnprintf(); ret &= test_opendir(); - ret &= test_readdir() ; + ret &= test_readdir(); ret &= test_telldir(); ret &= test_seekdir(); ret &= test_dlopen(); diff --git a/source3/lib/talloc/testsuite.c b/source3/lib/talloc/testsuite.c index 70ee35cbef..1a2a60a3a3 100644 --- a/source3/lib/talloc/testsuite.c +++ b/source3/lib/talloc/testsuite.c @@ -1065,27 +1065,27 @@ bool torture_local_talloc(struct torture_context *torture) talloc_disable_null_tracking(); talloc_enable_null_tracking(); - ret &= test_ref1(); - ret &= test_ref2(); - ret &= test_ref3(); - ret &= test_ref4(); - ret &= test_unlink1(); - ret &= test_misc(); - ret &= test_realloc(); - ret &= test_realloc_child(); - ret &= test_steal(); - ret &= test_move(); - ret &= test_unref_reparent(); - ret &= test_realloc_fn(); - ret &= test_type(); - ret &= test_lifeless(); - ret &= test_loop(); - ret &= test_free_parent_deny_child(); - ret &= test_talloc_ptrtype(); + ret = ret && test_ref1(); + ret = ret && test_ref2(); + ret = ret && test_ref3(); + ret = ret && test_ref4(); + ret = ret && test_unlink1(); + ret = ret && test_misc(); + ret = ret && test_realloc(); + ret = ret && test_realloc_child(); + ret = ret && test_steal(); + ret = ret && test_move(); + ret = ret && test_unref_reparent(); + ret = ret && test_realloc_fn(); + ret = ret && test_type(); + ret = ret && test_lifeless(); + ret = ret && test_loop(); + ret = ret && test_free_parent_deny_child(); + ret = ret && test_talloc_ptrtype(); if (ret) { - ret &= test_speed(); + ret = ret && test_speed(); } - ret &= test_autofree(); + ret = ret && test_autofree(); return ret; } |