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

2005-06-02 Thread Paul Eggert
Derek Price <[EMAIL PROTECTED]> writes: > It may be. It looks like the change was intentional > (http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/generic/glob.c?rev=1.52&content-type=text/x-cvsweb-markup&cvsroot=glibc), > but I still disagree. I agree with you. Historically, the "*" pa

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

2005-06-01 Thread Derek Price
Paul Eggert wrote: >Derek Price <[EMAIL PROTECTED]> writes: > > > >> 1. Corrects an incorrect check for a successful return from >> getlogin_r to assume only 0 means success, per the POSIX2 spec: >> >> . >> 2

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

2005-05-31 Thread Paul Eggert
Derek Price <[EMAIL PROTECTED]> writes: >1. Corrects an incorrect check for a successful return from > getlogin_r to assume only 0 means success, per the POSIX2 spec: > > . >2. Moves the check for GLOB_MA

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

2005-05-31 Thread Derek Price
Paul Eggert wrote: >Derek Price <[EMAIL PROTECTED]> writes: > > >>submission part. Perhaps it would be smoother if someone already known >>to the glibc team introduced me and this patch? >> >> > >Yes, probably. I'm willing to have a go at it. > >I suggest submitting two patches. > >(1) the

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

2005-05-28 Thread Paul Eggert
Derek Price <[EMAIL PROTECTED]> writes: > After that I will write up a ChangeLog entry for the glob-glibc2gnulib > diff and submit our changes back to the glibc team, unless someone here > who is used to working with them would like to take a go at the actual > submission part. Perhaps it would b

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

2005-05-28 Thread Derek Price
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Conrad T. Pino wrote: >breaks the Windows build since Microsoft does NOT provide "sys/cdefs.h" >implementation. Yes. Since we don't run configure on Windows, _SYS_CDEFS_H needed to be defined to 1 in the windows-NT/config.h.in.in. I've done so and

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

2005-05-28 Thread Conrad T. Pino
Hi Derek, > From: Derek Price > > Done. I added this comment to both glob_.h & glob.m4, with different > comment leaders, of course: > > /* Note the reversal of the common HAVE_SYS_CDEFS_H idiom below. In this >way, #ifndef _SYS_CDEFS_H may be used to include both when >it has been ch

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

2005-05-28 Thread Derek Price
Paul Eggert wrote: >Derek Price <[EMAIL PROTECTED]> writes: > > > >>Fair enough, but why undo the change to glob.m4? Shouldn't I just >>change the target of the AC_DEFINE from MISSING_SYS_CDEFS_H to _SYS_CDEFS_H? >> >> > >Yes, you're right. > >Sorry, I'd forgotten the trick that I had sugge

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

2005-05-28 Thread Paul Eggert
Derek Price <[EMAIL PROTECTED]> writes: > Fair enough, but why undo the change to glob.m4? Shouldn't I just > change the target of the AC_DEFINE from MISSING_SYS_CDEFS_H to _SYS_CDEFS_H? Yes, you're right. Sorry, I'd forgotten the trick that I had suggested. (This suggests that it deserves a n

extensions.m4 patch (was Re: [bug-gnulib] New GNULIB glob module?)

2005-05-26 Thread Derek Price
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Paul Eggert wrote: >--- extensions.m4.~1.6.~ 2005-02-23 05:49:36 -0800 >+++ extensions.m4 2005-05-24 12:35:48 -0700 >@@ -21,6 +21,10 @@ AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS], [ > [/* Enable extensions on Solaris. */ > #ifndef __EXTENSIONS__ > # undef __

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

2005-05-26 Thread Derek Price
Paul Eggert wrote: >Derek Price <[EMAIL PROTECTED]> writes: > > > >>I chose the _SYS_CDEFS_H route since it seemed simplest to me, though I >>chose to name the macro `MISSING_SYS_CDEFS_H'. >> >> > >Sorry, that's not right, since it fails in the following scenario: > > #define MISSING_SYS_CD

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

2005-05-26 Thread Paul Eggert
Derek Price <[EMAIL PROTECTED]> writes: > I chose the _SYS_CDEFS_H route since it seemed simplest to me, though I > chose to name the macro `MISSING_SYS_CDEFS_H'. Sorry, that's not right, since it fails in the following scenario: #define MISSING_SYS_CDEFS_H 27 #include in an ordinary progr

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

2005-05-25 Thread Derek Price
Larry Jones wrote: >Derek Price writes: > > >>Larry, can you tell us if defining >>_POSIX_PTHREAD_SEMANTICS would work to get the POSIX version of >>getpwnam_r on Solaris? >> >> > >It looks like it. > > I've committed Paul's patch to the CVS CVS tree, as well as removing the associated gl

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

2005-05-25 Thread Larry Jones
Derek Price writes: > > Larry, can you tell us if defining > _POSIX_PTHREAD_SEMANTICS would work to get the POSIX version of > getpwnam_r on Solaris? It looks like it. -Larry Jones I never get to do anything fun. -- Calvin ___ bug-gnulib mailing lis

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

2005-05-25 Thread Derek Price
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Paul Eggert wrote: >Derek Price <[EMAIL PROTECTED]> writes: > >>+# ifdef HAVE___POSIX_GETPWNAM_R >>+ /* Solaris. */ >>+# define getpwnam_r(name, bufp, buf, len, res) \ >>+ __posix_getpwnam_r (name, bufp, buf, len, res) >>+# endif > > >I don't see why

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

2005-05-24 Thread Paul Eggert
Derek Price <[EMAIL PROTECTED]> writes: > +#else > +/* Is there really a case where the getlogin or getlogin_r proto can come > from > + somewhere other than ? */ > +# ifdef HAVE_GETLOGIN_R > +extern int getlogin_r (char *, size_t); > +# else > +extern char *getlogin (void); > +# endif > +#end

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

2005-05-23 Thread Paul Eggert
Derek Price <[EMAIL PROTECTED]> writes: > all the HAVE_.*64 stuff in glob.c shouldn't be necessary when !_LIBC. Yes, that's correct; it should just invoke stat, opendir, etc., without worrying about their 64-bit variants. I thought it already did that? If not, where does it not do it? > Also, t

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

2005-05-20 Thread Derek Price
Paul Eggert wrote: >>There is one change I know I made that might have an effect. I added >>the "!defined _LIBC" to the following block because I was unsure what >>__REDIRECT_NTH was supposed to be doing >> >> > >I think that one's OK. > > Larry Jones on the CVS team just made a comment th

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

2005-05-18 Thread Paul Eggert
Derek Price <[EMAIL PROTECTED]> writes: > +# define GETPW_R_SIZE_MAX() (-1); There shouldn't be a semicolon here. >>># ifndef __USE_GNU >>># define __USE_GNU 1 >>># endif >> >>This shouldn't be needed once the change is needed, >>because should define __USE_GNU. > > No, because we want _

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

2005-05-18 Thread Derek Price
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Paul Eggert wrote: >Answering my own question: yes it will, in general, because perhaps >the gnulib version fixes a bug that's in the glibc version, and the >user wants the gnulib version. So we should worry about this. >And (as far as I can see) the

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

2005-05-18 Thread Paul Eggert
Derek Price <[EMAIL PROTECTED]> writes: > # ifndef __USE_GNU > # define __USE_GNU 1 > # endif This shouldn't be needed once the change is needed, because should define __USE_GNU. > +# define GETPW_R_SIZE_MAX() -1; Change "-1;" to "(-1)". > -#endif /* GLOB_ONLY_P */ > +#endif /* !_LIBC

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

2005-05-18 Thread Paul Eggert
Derek Price <[EMAIL PROTECTED]> writes: >>But let's step back a second. Why are we worried about building >>gnulib glob.c under glibc? It will never happen, right? So perhaps >>we needn't worry about this problem at all. > > Won't it? I thought the idea was that when you and I settled on > someth

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

2005-05-17 Thread Derek Price
Paul Eggert wrote: >Derek Price <[EMAIL PROTECTED]> writes: > > > >>>This seems a bit brittle. Why not simply try to compile this program? >>> >>> #include >>> char a[_GNU_GLOB_INTERFACE_VERSION == 1 ? 1 : -1]; >>> >>> >>Because I like to avoid runtime tests if I can avoid it, since they

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

2005-05-17 Thread Derek Price
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Paul Eggert wrote: >First, already we have something bogus: that __BEGIN_DECLS. It must >be protected by "#ifdef _LIBC", since random C environments don't have >it. Similarly for __END_DECLS. Done. >The simplest fix would be to do something like th

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

2005-05-17 Thread Derek Price
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Paul Eggert wrote: >Derek Price <[EMAIL PROTECTED]> writes: > >>Are you sure? You asked me to restore similar parens around bit-ands >>back at several other locations despite other work that changed the >>lines, in an earlier email. Not that I disagre

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

2005-05-17 Thread Paul Eggert
Derek Price <[EMAIL PROTECTED]> writes: >>This seems a bit brittle. Why not simply try to compile this program? >> >> #include >> char a[_GNU_GLOB_INTERFACE_VERSION == 1 ? 1 : -1]; > > Because I like to avoid runtime tests if I can avoid it, since they > cannot be used when cross-compiling. T

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

2005-05-17 Thread Derek Price
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks for the latest round. I'm going to be out of the office today, but I should get to it by tomorrow. Regards, Derek -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (Cygwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

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

2005-05-17 Thread Derek Price
Paul Eggert wrote: >Derek Price <[EMAIL PROTECTED]> writes: > > > >> /* Enable GNU extensions in glob.h. */ >>-#ifndef _GNU_SOURCE >>+#if defined _LIBC && !defined _GNU_SOURCE >> # define _GNU_SOURCE 1 >> #endif >> >> > >I just checked the glibc source file include/libc-symbols.h, and it >d

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

2005-05-17 Thread Paul Eggert
Derek Price <[EMAIL PROTECTED]> writes: >>Why do we need to include here? All we need is size_t, >>right? And stddef.h gives us that. > > If I don't, I get the following error: > > In file included from glob.c:23: > glob.h:107: error: syntax error before "struct" > In file included from /usr/in

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

2005-05-17 Thread Paul Eggert
Derek Price <[EMAIL PROTECTED]> writes: > Are you sure? You asked me to restore similar parens around bit-ands > back at several other locations despite other work that changed the > lines, in an earlier email. Not that I disagree now. I actually prefer > the version without the unnecessary par

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

2005-05-15 Thread Derek Price
Paul Eggert wrote: >Now for commentary on glob.h. > >Derek Price <[EMAIL PROTECTED]> writes: > > > >>--- ../glibc-2.3.5/posix/glob.h 2004-09-16 20:55:15.0 -0400 >>+++ lib/glob_.h 2005-05-13 12:21:39.0 -0400 >>@@ -19,29 +19,48 @@ >> #ifndef _GLOB_H >> #define

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

2005-05-15 Thread Paul Eggert
One other remark about glob.c. You should remove this comment, as it's obsolete now: /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions.

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

2005-05-14 Thread Paul Eggert
Now for commentary on glob.h. Derek Price <[EMAIL PROTECTED]> writes: > --- ../glibc-2.3.5/posix/glob.h 2004-09-16 20:55:15.0 -0400 > +++ lib/glob_.h 2005-05-13 12:21:39.0 -0400 > @@ -19,29 +19,48 @@ > #ifndef _GLOB_H > #define _GLOB_H 1 > > -#include >

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

2005-05-14 Thread Paul Eggert
Derek Price <[EMAIL PROTECTED]> writes: > /* Enable GNU extensions in glob.h. */ > -#ifndef _GNU_SOURCE > +#if defined _LIBC && !defined _GNU_SOURCE > # define _GNU_SOURCE 1 > #endif I just checked the glibc source file include/libc-symbols.h, and it defines both _LIBC and _GNU_SOURCE. So th

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

2005-05-13 Thread Paul Eggert
Derek Price <[EMAIL PROTECTED]> writes: > We've been removing those sort of constructs from CVS as part of the > move away from K&R support. IIRC, I was told that typecasts to and from > (void *) were necessary on some really old systems, but that I could be > confident that we wouldn't encounter

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

2005-05-12 Thread Paul Eggert
Derek Price <[EMAIL PROTECTED]> writes: >>First, what is "__ptr_t"? Shouldn't it be replaced by "void *" >>uniformly? > > This is one of the items I didn't touch since it didn't raise any > compiler warnings here. It looks like it is mostly being used as a void > *, though I'm not sure why since

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

2005-05-11 Thread Derek Price
Most of this looks good, but one quick question as I get to this: I assume from the following that I can expect _LIBC to be defined iff the file is being compiled as part of glibc? I wasn't sure... Cheers, Derek Paul Eggert wrote: >>-#ifdef _LIBC >>-# include >>-# undef strdup >>-# define s

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

2005-05-11 Thread Paul Eggert
Derek Price <[EMAIL PROTECTED]> writes: > I needed a portable version of glob for CVS, so I imported the glob > module from glibc 2.3.5 into a GNULIB format. Wow! Nice project. > Mostly I kept the glibc version intact, though I managed to simplify > some portability cruft immensely by replacing

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

2005-05-11 Thread Derek Price
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Karl Berry wrote: > Subject: [bug-gnulib] New GNULIB glob module? > >Would it be possible to simply use the libc code as-is? I guess I mean, >with whatever changes are needed sent back to libc. > >So much stuff in gnulib is 95% th

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

2005-05-11 Thread Karl Berry
Subject: [bug-gnulib] New GNULIB glob module? Would it be possible to simply use the libc code as-is? I guess I mean, with whatever changes are needed sent back to libc. So much stuff in gnulib is 95% the same as libc. It doesn't seem goo