#endif
#ifndef ELIDE_CODE
+#if !defined _LIBC || !defined GLOB_ONLY_P
#if defined STDC_HEADERS || defined __GNU_LIBRARY__
# include <stddef.h>
inline
#endif
const char *next_brace_sub __P ((const char *begin));
+
+#endif /* GLOB_ONLY_P */
+
static int glob_in_dir __P ((const char *pattern, const char *directory,
int flags,
int (*errfunc) (const char *, int),
glob_t *pglob));
+
+#if !defined _LIBC || !defined GLOB_ONLY_P
static int prefix_array __P ((const char *prefix, char **array, size_t n));
static int collated_compare __P ((const __ptr_t, const __ptr_t));
return cp;
}
+#endif /* !GLOB_ONLY_P */
+
/* 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,
}
+#if !defined _LIBC || !defined GLOB_ONLY_P
+
/* Free storage allocated in PGLOB by a previous `glob' call. */
void
globfree (pglob)
# endif
#endif
+#endif /* !GLOB_ONLY_P */
+
/* Like `glob', but PATTERN is a final pathname component,
and matches are searched for in DIRECTORY.
{
const char *name;
size_t len;
- struct dirent *d = ((flags & GLOB_ALTDIRFUNC)
- ? (*pglob->gl_readdir) (stream)
- : readdir ((DIR *) stream));
+ struct dirent *d =
+ ((flags & GLOB_ALTDIRFUNC)
+ ? (struct dirent *)((*pglob->gl_readdir) (stream))
+ : readdir ((DIR *) stream));
if (d == NULL)
break;
if (! REAL_DIR_ENTRY (d))