bug-gnulib
[Top][All Lists]
Advanced

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

Re: glob_.h & glibc


From: Paul Eggert
Subject: Re: glob_.h & glibc
Date: Thu, 08 Sep 2005 13:42:27 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Derek Price <address@hidden> writes:

> Re: <http://sourceware.org/bugzilla/show_bug.cgi?id=1060>, glibc
> objected to the extent of our changes to an installed header (glob.h) to
> bring the file into sync with GNULIB. (They did accept the glob.c
> changes, though they have yet to apply them.)

Hmm, actually they provisionally accepted the bug-1060 changes except
for the part about using prototypes when defining external functions.
I wonder why they don't like that?  Anyway, I just submitted a revised
patch in bug 1060 that does that.

> It is true, as Roland says, that we could put most of our changes into a
> second header included before glob_.h, but I am wondering if this is
> desireable?  This would be a new structure for GNULIB.  Should I work on
> writing a header that defines the necessary macros and then includes a
> sync'd glob_.h, or would it be easier just to fork such a small file?

I'd rather not fork.  I think the former solution would be fine.  As I
understand it, you'd write a glob_.h file that does this:

...define our own stuff...
#include "glob-libc.h"

where glob-libc.h is an unmodified copy of the glibc glob.h.

Or perhaps the "...define our own stuff..." could all be in config.h,
which would mean we wouldn't need two files.

Could you please follow up on this in bug-gnulib first?  I'd rather
not burden Roland with gnulib issues more than I can help it.  Thanks.

I installed the following patch into gnulib to sync it with the
newly-proposed glibc patches.

2005-09-08  Paul Eggert  <address@hidden>

        * glob.c (glob, globfree, __glob_pattern_p): Use old-style function
        definitions, since that's the preferred style in glibc.
        Fix a minor spacing issue, and update copyright notice to match glibc's.
        * config/srclist.txt: Remove glibc bug 1061; it's been fixed.

--- lib/glob.c  1 Sep 2005 22:36:04 -0000       1.2
+++ lib/glob.c  8 Sep 2005 20:18:48 -0000       1.3
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2002,2003,2004,2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -240,9 +240,11 @@ int
 #ifdef GLOB_ATTRIBUTE
 GLOB_ATTRIBUTE
 #endif
-glob (const char *pattern, int flags,
-      int (*errfunc) (const char *, int),
-      glob_t *pglob)
+glob (pattern, flags, errfunc, pglob)
+     const char *pattern;
+     int flags;
+     int (*errfunc) (const char *, int);
+     glob_t *pglob;
 {
   const char *filename;
   const char *dirname;
@@ -531,7 +533,7 @@ glob (const char *pattern, int flags,
            {
              int success;
              char *name;
-             size_t buflen = GET_LOGIN_NAME_MAX() + 1;
+             size_t buflen = GET_LOGIN_NAME_MAX () + 1;
 
              if (buflen == 0)
                /* `sysconf' does not support _SC_LOGIN_NAME_MAX.  Try
@@ -888,7 +890,8 @@ libc_hidden_def (glob)
 
 /* Free storage allocated in PGLOB by a previous `glob' call.  */
 void
-globfree (register glob_t *pglob)
+globfree (pglob)
+     register glob_t *pglob;
 {
   if (pglob->gl_pathv != NULL)
     {
@@ -986,7 +989,9 @@ prefix_array (const char *dirname, char 
 /* Return nonzero if PATTERN contains any metacharacters.
    Metacharacters can be quoted with backslashes if QUOTE is nonzero.  */
 int
-__glob_pattern_p (const char *pattern, int quote)
+__glob_pattern_p (pattern, quote)
+     const char *pattern;
+     int quote;
 {
   register const char *p;
   int open = 0;
--- config/srclist.txt  6 Sep 2005 07:36:48 -0000       1.103
+++ config/srclist.txt  8 Sep 2005 20:18:48 -0000       1.104
@@ -1,4 +1,4 @@
-# $Id: srclist.txt,v 1.103 2005/09/06 07:36:48 eggert Exp $
+# $Id: srclist.txt,v 1.104 2005/09/08 20:18:48 eggert Exp $
 # Files for which we are not the source.  See ./srclistvars.sh for the
 # variable definitions.
 
@@ -212,7 +212,6 @@ $LIBCSRC/sysdeps/generic/memmem.c   lib gp
 #$LIBCSRC/string/strverscmp.c          lib gpl
 #
 # http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060
-# http://sources.redhat.com/bugzilla/show_bug.cgi?id=1061
 # http://sources.redhat.com/bugzilla/show_bug.cgi?id=1062
 #$LIBCSRC/sysdeps/generic/glob.c       lib gpl
 #




reply via email to

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