summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rpmio/Makefile.am4
-rw-r--r--rpmio/fts.c23
-rw-r--r--rpmio/fts.h10
3 files changed, 25 insertions, 12 deletions
diff --git a/rpmio/Makefile.am b/rpmio/Makefile.am
index 394ad7079..5f67038be 100644
--- a/rpmio/Makefile.am
+++ b/rpmio/Makefile.am
@@ -19,14 +19,14 @@ pkgincdir = $(pkgincludedir)
pkginc_HEADERS = \
rpmio.h rpmurl.h rpmmacro.h rpmlog.h rpmmessages.h rpmerr.h \
ugid.h
-noinst_HEADERS = rpmio_internal.h rpmpgp.h
+noinst_HEADERS = fts.h rpmio_internal.h rpmpgp.h
LIBS += @WITH_ZLIB_LIB@ -lrt -lpthread
BEECRYPTLOBJS = $(shell cat $(top_builddir)/beecrypt/listobjs)
lib_LTLIBRARIES = librpmio.la
-librpmio_la_SOURCES = digest.c macro.c rpmio.c rpmlog.c rpmmalloc.c \
+librpmio_la_SOURCES = digest.c fts.c macro.c rpmio.c rpmlog.c rpmmalloc.c \
rpmpgp.c rpmrpc.c strcasecmp.c stubs.c url.c ugid.c
librpmio_la_LDFLAGS = -release @VERSION@
librpmio_la_LIBADD = $(BEECRYPTLOBJS)
diff --git a/rpmio/fts.c b/rpmio/fts.c
index 35374a094..a55b37bb7 100644
--- a/rpmio/fts.c
+++ b/rpmio/fts.c
@@ -31,6 +31,7 @@
static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
#endif /* LIBC_SCCS and not lint */
+#if defined(_LIBC)
#include <sys/param.h>
#include <include/sys/stat.h>
#include <fcntl.h>
@@ -40,6 +41,18 @@ static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#else
+#include "system.h"
+#include "fts.h"
+# define internal_function
+# define __set_errno(val) (*__errno_location ()) = (val)
+# define __open open
+# define __close close
+# define __fchdir fchdir
+# define __opendir opendir
+# define __closedir closedir
+# define __readdir readdir
+#endif
/* Largest alignment size needed, minus one.
@@ -85,7 +98,7 @@ static int fts_safe_changedir __P((FTS *, FTSENT *, int, const char *))
#define BREAD 3 /* fts_read */
FTS *
-fts_open(argv, options, compar)
+Fts_open(argv, options, compar)
char * const *argv;
register int options;
int (*compar) __P((const FTSENT **, const FTSENT **));
@@ -224,7 +237,7 @@ fts_load(sp, p)
}
int
-fts_close(sp)
+Fts_close(sp)
FTS *sp;
{
register FTSENT *freep, *p;
@@ -279,7 +292,7 @@ fts_close(sp)
? p->fts_pathlen - 1 : p->fts_pathlen)
FTSENT *
-fts_read(sp)
+Fts_read(sp)
register FTS *sp;
{
register FTSENT *p, *tmp;
@@ -473,7 +486,7 @@ name: t = sp->fts_path + NAPPEND(p->fts_parent);
*/
/* ARGSUSED */
int
-fts_set(sp, p, instr)
+Fts_set(sp, p, instr)
FTS *sp;
FTSENT *p;
int instr;
@@ -488,7 +501,7 @@ fts_set(sp, p, instr)
}
FTSENT *
-fts_children(sp, instr)
+Fts_children(sp, instr)
register FTS *sp;
int instr;
{
diff --git a/rpmio/fts.h b/rpmio/fts.h
index a22c7bb9c..aca829cc5 100644
--- a/rpmio/fts.h
+++ b/rpmio/fts.h
@@ -120,12 +120,12 @@ typedef struct _ftsent {
} FTSENT;
__BEGIN_DECLS
-FTSENT *fts_children (FTS *, int) __THROW;
-int fts_close (FTS *) __THROW;
-FTS *fts_open (char * const *, int,
+FTSENT *Fts_children (FTS *, int) __THROW;
+int Fts_close (FTS *) __THROW;
+FTS *Fts_open (char * const *, int,
int (*)(const FTSENT **, const FTSENT **)) __THROW;
-FTSENT *fts_read (FTS *) __THROW;
-int fts_set (FTS *, FTSENT *, int) __THROW;
+FTSENT *Fts_read (FTS *) __THROW;
+int Fts_set (FTS *, FTSENT *, int) __THROW;
__END_DECLS
#endif /* fts.h */