svn commit: samba r18452 - in branches/SAMBA_4_0/source/lib/replace: .

metze at samba.org metze at samba.org
Wed Sep 13 10:00:45 GMT 2006


Author: metze
Date: 2006-09-13 10:00:45 +0000 (Wed, 13 Sep 2006)
New Revision: 18452

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18452

Log:
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
Added:
   branches/SAMBA_4_0/source/lib/replace/repdir_getdirentries.c
Modified:
   branches/SAMBA_4_0/source/lib/replace/repdir.m4


Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/repdir.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/repdir.m4	2006-09-13 09:56:21 UTC (rev 18451)
+++ branches/SAMBA_4_0/source/lib/replace/repdir.m4	2006-09-13 10:00:45 UTC (rev 18452)
@@ -28,3 +28,28 @@
 	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

Added: branches/SAMBA_4_0/source/lib/replace/repdir_getdirentries.c
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/repdir_getdirentries.c	2006-09-13 09:56:21 UTC (rev 18451)
+++ branches/SAMBA_4_0/source/lib/replace/repdir_getdirentries.c	2006-09-13 10:00:45 UTC (rev 18452)
@@ -0,0 +1 @@
+#error "the readdir() replacement using getdirentried() isn't implemented yet"



More information about the samba-cvs mailing list