changeset 5877:aafd5b8ee85f

* fts.c (fd_safer) [_LGPL_PACKAGE]: New static function, so that unistd-safer.h (GPL'ed code) need not be included.
author Paul Eggert <eggert@cs.ucla.edu>
date Sun, 22 May 2005 17:29:16 +0000
parents 02bbd0c8a50a
children 2b44331388e9
files lib/ChangeLog lib/fts.c
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -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.
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -66,7 +66,6 @@
 #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 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