bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnulib] New GNULIB glob module?


From: Paul Eggert
Subject: Re: [bug-gnulib] New GNULIB glob module?
Date: Sat, 14 May 2005 15:51:47 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

Now for commentary on glob.h.

Derek Price <address@hidden> writes:

> --- ../glibc-2.3.5/posix/glob.h       2004-09-16 20:55:15.000000000 -0400
> +++ lib/glob_.h       2005-05-13 12:21:39.000000000 -0400
> @@ -19,29 +19,48 @@
>  #ifndef      _GLOB_H
>  #define      _GLOB_H 1
>  
> -#include <sys/cdefs.h>
> +#ifdef _LIBC
> +# include <sys/cdefs.h>
> +#else
> +# include <sys/types.h>
> +# include <stddef.h>
> +# undef __size_t
> +# define __size_t size_t
> +#endif

Why do we need to include <sys/types.h> here?  All we need is size_t,
right?  And stddef.h gives us that.

> +/* Some system libraries erroneously define these.  */
> +#undef       GLOB_ERR
> ...

Which system libraries are these?  Perhaps a comment?

> +# define getopt __GLOB_ID (getopt)

Surely this line is spurious and can be removed.

> -#if !defined __USE_FILE_OFFSET64 || __GNUC__ < 2
> +#if !defined _LIBC || !defined __USE_FILE_OFFSET64 || __GNUC__ < 2

Can't we remove at least the "|| __GNUC__ < 2" here?  glibc assumes
recent versions of GCC.

>  extern void __REDIRECT_NTH (globfree, (glob_t *__pglob), globfree64);
>  #endif
> -
>  #ifdef __USE_LARGEFILE64
>  extern int glob64 (__const char *__restrict __pattern, int __flags,
>                  int (*__errfunc) (__const char *, int),

Let's omit this change; it's a different matter.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]