more portable dirent handling (Hermann Lauer).

CVS patchset: 2401
CVS date: 1998/10/06 15:26:55
This commit is contained in:
jbj 1998-10-06 15:26:55 +00:00
parent a48ab753ee
commit 7a9831a86c
3 changed files with 4 additions and 39 deletions

View File

@ -1,4 +1,5 @@
2.5.5 -> 2.9
- more portable dirent handling (Hermann Lauer).
- add Slovak translation (Stanislav Meduna <stano@trillian.eunet.sk>)
- gettextify rpmMessage/rpmError/fprintf messages.
- update po files; add cz to catalogs.

View File

@ -351,7 +351,8 @@ dnl Checks for header files we can live without.
AC_HEADER_STDC
AC_HEADER_MAJOR
AC_CHECK_HEADERS(netinet/in_systm.h limits.h)
AC_CHECK_HEADERS(alloca.h dirent.h sys/socket.h sys/select.h)
AC_CHECK_HEADERS(alloca.h sys/socket.h sys/select.h)
AC_HEADER_DIRENT
AC_CHECK_HEADERS(machine/types.h string.h)
AC_CHECK_HEADERS(sys/types.h sys/stdtypes.h unistd.h)
AC_CHECK_HEADERS(mntent.h sys/mnttab.h sys/systemcfg.h)

View File

@ -1,15 +1,3 @@
#ifdef __sgi
#define SYSDIR
#endif
#ifdef __hpux
#define SYSDIR
#endif
#if defined(sun) && !defined(__svr4__)
#define SYSDIR
#endif
/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
@ -66,27 +54,6 @@ extern int errno;
#define NULL 0
#endif
#if defined (POSIX) || defined (DIRENT) || defined (__GNU_LIBRARY__) || defined(HAVE_DIRENT_H)
#include <dirent.h>
#ifndef __GNU_LIBRARY__
#define D_NAMLEN(d) strlen((d)->d_name)
#else /* GNU C library. */
#define D_NAMLEN(d) ((d)->d_namlen)
#endif /* Not GNU C library. */
#else /* Not POSIX or DIRENT. */
#define direct dirent
#define D_NAMLEN(d) ((d)->d_namlen)
#ifdef SYSNDIR
#include <sys/ndir.h>
#endif /* SYSNDIR */
#ifdef SYSDIR
#include <sys/dir.h>
#endif /* SYSDIR */
#ifdef NDIR
#include <ndir.h>
#endif /* NDIR */
#endif /* POSIX or DIRENT or __GNU_LIBRARY__. */
#if defined (POSIX) && !defined (__GNU_LIBRARY__)
/* Posix does not require that the d_ino field be present, and some
systems do not provide it. */
@ -578,11 +545,7 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
if (! REAL_DIR_ENTRY (d))
continue;
name = d->d_name;
#ifdef HAVE_D_NAMLEN
len = d->d_namlen;
#else
len = 0;
#endif
len = NLENGTH(d);
}
if (fnmatch (pattern, name,