diff options
author | Robert Mustacchi <rm@joyent.com> | 2015-10-29 15:19:25 +0000 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2015-11-02 17:39:43 -0800 |
commit | 33e8313d921ed710d7c5957cea98e220a663a1d5 (patch) | |
tree | d99322e78c6ea80791d376bcd10e36f68874bfbe /usr/src/lib/libc/port/regex/glob.c | |
parent | eb5bb58421f46cee79155a55688e6c675e7dd361 (diff) | |
download | illumos-gate-33e8313d921ed710d7c5957cea98e220a663a1d5.tar.gz |
6409 glob(3C) missed the memo on LF64
Reviewed by: Albert Lee <trisk@omniti.com>
Reviewed by: Gary Mills <gary_mills@fastmail.fm>
Reviewed by: Alex Wilson <alex.wilson@joyent.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Diffstat (limited to 'usr/src/lib/libc/port/regex/glob.c')
-rw-r--r-- | usr/src/lib/libc/port/regex/glob.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/usr/src/lib/libc/port/regex/glob.c b/usr/src/lib/libc/port/regex/glob.c index 425f9c8724..642d4f67d2 100644 --- a/usr/src/lib/libc/port/regex/glob.c +++ b/usr/src/lib/libc/port/regex/glob.c @@ -106,6 +106,19 @@ extern int old_glob(const char *, int, int (*)(const char *, int), old_glob_t *); extern void old_globfree(old_glob_t *); +/* + * The various extensions to glob(3C) allow for stat and dirent structures to + * show up whose size may change in a largefile environment. If libc defines + * _FILE_OFFSET_BITS to be 64 that is the key to indicate that we're building + * the LFS version of this file. As such, we rename the public functions here, + * _glob_ext() and _globfree_ext() to have a 64 suffix. When building the LFS + * version, we do not include the old versions. + */ +#if !defined(_LP64) && _FILE_OFFSET_BITS == 64 +#define _glob_ext _glob_ext64 +#define _globfree_ext _globfree_ext64 +#endif /* !_LP64 && _FILE_OFFSET_BITS == 64 */ + #define DOLLAR '$' #define DOT '.' #define EOS '\0' @@ -1261,6 +1274,8 @@ g_Ctoc(const wcat_t *str, char *buf, uint_t len) return (1); } +#if defined(_LP64) || _FILE_OFFSET_BITS != 64 + /* glob() function with legacy glob structure */ int old_glob(const char *pattern, int flags, int (*errfunc)(const char *, int), @@ -1333,4 +1348,4 @@ old_globfree(old_glob_t *pglob) } -/* End */ +#endif /* _LP64 || _FILE_OFFSET_BITS != 64 */ |