aboutsummaryrefslogtreecommitdiff
path: root/posix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-08-10 15:54:54 +0000
committerUlrich Drepper <drepper@redhat.com>1998-08-10 15:54:54 +0000
commita5f4e34a264b7cd296f8ca890ca4eaa1d0f99317 (patch)
treeba02529e747024948875e5f6eb93c1676a9d2144 /posix
parent0e94359046d83b56f1b15ff00c4b2f75499bf8c3 (diff)
downloadglibc-a5f4e34a264b7cd296f8ca890ca4eaa1d0f99317.zip
glibc-a5f4e34a264b7cd296f8ca890ca4eaa1d0f99317.tar.gz
glibc-a5f4e34a264b7cd296f8ca890ca4eaa1d0f99317.tar.bz2
Update.
1998-08-10 15:49 Ulrich Drepper <drepper@cygnus.com> * include/dirent.h: Protect from double inclusion. 1998-08-09 Mark Kettenis <kettenis@phys.uva.nl> * posix/glob.h: Add LFS support for glob and globfree. * posix/Versions [GLIBC_2.1]: Add glob64 and globfree64. * posix/Makefile (routines): Add glob64. * sysdeps/generic/glob64.c: New file. * sysdeps/unix/sysv/linux/glob64.c: New file. * sysdeps/unix/sysv/linux/alpha/glob64.c: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/glob64.c: New file. * sysdeps/generic/glob.c [_LIBC && glob] (__glob_pattern_p): Elide function. * sysdeps/unix/sysv/linux/alpha/glob.c: Add glob64 as a weak alias for __new_glob. Likewise for globfree64. * sysdeps/unix/sysv/linux/sparc/sparc64/glob.c: New file. 1998-08-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/Makefile ($(common-objpfx)s-proto.d): Remove -include flag from command.
Diffstat (limited to 'posix')
-rw-r--r--posix/Makefile2
-rw-r--r--posix/Versions2
-rw-r--r--posix/glob.h50
3 files changed, 43 insertions, 11 deletions
diff --git a/posix/Makefile b/posix/Makefile
index 201cb78..77471c8 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -44,7 +44,7 @@ routines := \
getpgid setpgid getpgrp bsd-getpgrp setpgrp getsid setsid \
getlogin getlogin_r setlogin \
pathconf sysconf fpathconf \
- glob fnmatch regex \
+ glob glob64 fnmatch regex \
confstr \
getopt getopt1 getopt_init \
sched_setp sched_getp sched_sets sched_gets sched_yield sched_primax \
diff --git a/posix/Versions b/posix/Versions
index afb7242..985281d 100644
--- a/posix/Versions
+++ b/posix/Versions
@@ -73,7 +73,7 @@ libc {
__pread64; __pwrite64;
# g*
- gai_strerror; getnameinfo;
+ gai_strerror; getnameinfo; glob64; globfree64;
# p*
pread; pread64; pwrite; pwrite64;
diff --git a/posix/glob.h b/posix/glob.h
index da719c2..609f217 100644
--- a/posix/glob.h
+++ b/posix/glob.h
@@ -77,21 +77,13 @@ extern "C" {
#define GLOB_NOSPACE 1 /* Ran out of memory. */
#define GLOB_ABORTED 2 /* Read error. */
#define GLOB_NOMATCH 3 /* No matches found. */
-
+#define GLOB_NOSYS 4 /* Not implemented. */
#ifdef _GNU_SOURCE
/* Previous versions of this file defined GLOB_ABEND instead of
GLOB_ABORTED. Provide a compatibility definition here. */
# define GLOB_ABEND GLOB_ABORTED
#endif
-/* This value is returned if the implementation does not support
- `glob'. Since this is not the case here it will never be
- returned but the conformance test suites still require the symbol
- to be defined. */
-#ifdef _XOPEN_SOURCE
-# define GLOB_NOSYS (-1)
-#endif
-
/* Structure describing a globbing run. */
#if !defined _AMIGA && !defined VMS /* Buggy compiler. */
struct stat;
@@ -112,6 +104,25 @@ typedef struct
int (*gl_stat) __PMT ((__const char *, struct stat *));
} glob_t;
+#ifdef _LARGEFILE64_SOURCE
+struct stat64;
+typedef struct
+ {
+ size_t gl_pathc;
+ char **gl_pathv;
+ size_t gl_offs;
+ int gl_flags;
+
+ /* If the GLOB_ALTDIRFUNC flag is set, the following functions
+ are used instead of the normal file access functions. */
+ void (*gl_closedir) __PMT ((void *));
+ struct dirent64 *(*gl_readdir) __PMT ((void *));
+ __ptr_t (*gl_opendir) __PMT ((__const char *));
+ int (*gl_lstat) __PMT ((__const char *, struct stat64 *));
+ int (*gl_stat) __PMT ((__const char *, struct stat64 *));
+ } glob64_t;
+#endif
+
/* Do glob searching for PATTERN, placing results in PGLOB.
The bits defined above may be set in FLAGS.
If a directory cannot be opened or read and ERRFUNC is not nil,
@@ -120,12 +131,33 @@ typedef struct
`glob' returns GLOB_ABEND; if it returns zero, the error is ignored.
If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
Otherwise, `glob' returns zero. */
+#if _FILE_OFFSET_BITS != 64
extern int glob __P ((__const char *__pattern, int __flags,
int (*__errfunc) __P ((__const char *, int)),
glob_t *__pglob));
/* Free storage allocated in PGLOB by a previous `glob' call. */
extern void globfree __P ((glob_t *__pglob));
+#else
+# if __GNUC__ >= 2
+extern int glob __P ((__const char *__pattern, int __flags,
+ int (*__errfunc) __P ((__const char *, int)),
+ glob_t *__pglob)) __asm__ ("glob64");
+
+extern void globfree __P ((glob_t *__pglob)) __asm__ ("globfree64");
+# else
+# define glob glob64
+# define globfree globfree64
+# endif
+#endif
+
+#ifdef _LARGEFILE64_SOURCE
+extern int glob64 __P ((__const char *__pattern, int __flags,
+ int (*__errfunc) __P ((__const char *, int)),
+ glob64_t *__pglob));
+
+extern void globfree64 __P ((glob64_t *__pglob));
+#endif
#ifdef _GNU_SOURCE