summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-05-22 17:29:46 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-05-22 17:29:46 +0000
commita7102ac4302f20a80e431ccb8f9c88ad05b268ff (patch)
treeb456d0e492b8ccc0214fad8b2d73ebc924b4cece /lib
parentb72d60e7a4c0d07e1b6d12e87a314ffc183b16ea (diff)
downloadcoreutils-a7102ac4302f20a80e431ccb8f9c88ad05b268ff.tar.xz
(fd_safer) [_LGPL_PACKAGE]: New static function,
so that unistd-safer.h (GPL'ed code) need not be included.
Diffstat (limited to 'lib')
-rw-r--r--lib/ChangeLog5
-rw-r--r--lib/fts.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 16bacaa1d..3c8ab513d 100644
--- 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>
Split the fts code into GPL'ed and LGPL'ed parts, and fix some
diff --git a/lib/fts.c b/lib/fts.c
index b2bec1992..418e75b27 100644
--- 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