1999-09-11  Paul Eggert  <eggert@twinsun.com>

	* posix/glob.h (glob): If #defining to glob64, do this before
	declaring it, so that all declarations and uses match, and do not
	declare glob64, to avoid a declaration clash.
	(globfree): Likewise with globfree64.

1999-09-08  Eli Zaretskii  <eliz@is.elta.co.il>

	* sysdeps/generic/glob.c (prefix_array) [__MSDOS__,WINDOWS32]:
	Keep the trailing slash unless DIRNAME is just "x:/".
This commit is contained in:
Ulrich Drepper 1999-11-01 03:04:49 +00:00
parent 56bd58554f
commit ea1bfb072c
3 changed files with 19 additions and 7 deletions

View File

@ -1,3 +1,15 @@
1999-09-11 Paul Eggert <eggert@twinsun.com>
* posix/glob.h (glob): If #defining to glob64, do this before
declaring it, so that all declarations and uses match, and do not
declare glob64, to avoid a declaration clash.
(globfree): Likewise with globfree64.
1999-09-08 Eli Zaretskii <eliz@is.elta.co.il>
* sysdeps/generic/glob.c (prefix_array) [__MSDOS__,WINDOWS32]:
Keep the trailing slash unless DIRNAME is just "x:/".
1999-10-11 Andreas Jaeger <aj@suse.de> 1999-10-11 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/bits/siginfo.h (SI_KERNEL): Added. * sysdeps/unix/sysv/linux/bits/siginfo.h (SI_KERNEL): Added.

View File

@ -140,6 +140,11 @@ typedef struct
} glob64_t; } glob64_t;
#endif #endif
#if _FILE_OFFSET_BITS == 64 && __GNUC__ < 2
# define glob glob64
# define globfree globfree64
#endif
/* Do glob searching for PATTERN, placing results in PGLOB. /* Do glob searching for PATTERN, placing results in PGLOB.
The bits defined above may be set in FLAGS. The bits defined above may be set in FLAGS.
If a directory cannot be opened or read and ERRFUNC is not nil, If a directory cannot be opened or read and ERRFUNC is not nil,
@ -148,7 +153,7 @@ typedef struct
`glob' returns GLOB_ABEND; if it returns zero, the error is ignored. `glob' returns GLOB_ABEND; if it returns zero, the error is ignored.
If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned. If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
Otherwise, `glob' returns zero. */ Otherwise, `glob' returns zero. */
#if _FILE_OFFSET_BITS != 64 #if _FILE_OFFSET_BITS != 64 || __GNUC__ < 2
extern int glob __P ((__const char *__pattern, int __flags, extern int glob __P ((__const char *__pattern, int __flags,
int (*__errfunc) (__const char *, int), int (*__errfunc) (__const char *, int),
glob_t *__pglob)); glob_t *__pglob));
@ -156,16 +161,11 @@ extern int glob __P ((__const char *__pattern, int __flags,
/* Free storage allocated in PGLOB by a previous `glob' call. */ /* Free storage allocated in PGLOB by a previous `glob' call. */
extern void globfree __P ((glob_t *__pglob)); extern void globfree __P ((glob_t *__pglob));
#else #else
# if __GNUC__ >= 2
extern int glob __P ((__const char *__pattern, int __flags, extern int glob __P ((__const char *__pattern, int __flags,
int (*__errfunc) (__const char *, int), int (*__errfunc) (__const char *, int),
glob_t *__pglob)) __asm__ ("glob64"); glob_t *__pglob)) __asm__ ("glob64");
extern void globfree __P ((glob_t *__pglob)) __asm__ ("globfree64"); extern void globfree __P ((glob_t *__pglob)) __asm__ ("globfree64");
# else
# define glob glob64
# define globfree globfree64
# endif
#endif #endif
#ifdef _LARGEFILE64_SOURCE #ifdef _LARGEFILE64_SOURCE

View File

@ -1105,7 +1105,7 @@ prefix_array (dirname, array, n)
#if defined __MSDOS__ || defined WINDOWS32 #if defined __MSDOS__ || defined WINDOWS32
else if (dirlen > 1) else if (dirlen > 1)
{ {
if (dirname[dirlen - 1] == '/') if (dirname[dirlen - 1] == '/' && dirname[dirlen - 2] == ':')
/* DIRNAME is "d:/". Don't prepend the slash from DIRNAME. */ /* DIRNAME is "d:/". Don't prepend the slash from DIRNAME. */
--dirlen; --dirlen;
else if (dirname[dirlen - 1] == ':') else if (dirname[dirlen - 1] == ':')