* fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 22 May 2005 17:29:16 +0000 (17:29 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 22 May 2005 17:29:16 +0000 (17:29 +0000)
so that unistd-safer.h (GPL'ed code) need not be included.

lib/ChangeLog
lib/fts.c

index 8f9b1ccd554d2ff19bf02b31bd1537959f487489..4e7b22a7148de8187b0c0b42d3887c0f3265ecf3 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
+       so that unistd-safer.h (GPL'ed code) need not be included.
+
 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
 
        New fts module.
index b2bec1992f5da7c3c1dc2eff2bbcfb2f6bee1ca9..418e75b2788396069ad7c1bf03f12efdc1da2db3 100644 (file)
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -66,7 +66,6 @@ static char sccsid[] = "@(#)fts.c     8.6 (Berkeley) 8/14/94";
 #include <fcntl.h>
 #include <errno.h>
 #include "dirfd.h"
-#include "unistd-safer.h"
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
@@ -170,8 +169,10 @@ static bool enter_dir (FTS *fts, FTSENT *ent) { return true; }
 static void leave_dir (FTS *fts, FTSENT *ent) {}
 static bool setup_dir (FTS *fts) { return true; }
 static void free_dir (FTS *fts) {}
+static int fd_safer (int fd) { return fd; }
 #else
 # include "fts-cycle.c"
+# include "unistd-safer.h"
 #endif
 
 #ifndef MAX