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.52content-type=text/x-cvsweb-markupcvsroot=glibc), but I still disagree. I agree with you. Historically, the * pattern in

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: http://www.opengroup.org/onlinepubs/009695399/functions/getlogin_r.html. 2. Moves the check

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 be

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 glob.h in an ordinary

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_CDEFS_H 27

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-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 this is needed.

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-cvs mailing list

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 glob.c changes,

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 unistd.h? */ +# ifdef HAVE_GETLOGIN_R +extern int getlogin_r (char *, size_t); +# else +extern char *getlogin (void); +# endif +#endif

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, this

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 that makes me

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-17 Thread Paul Eggert
Derek Price [EMAIL PROTECTED] writes: Why do we need to include sys/types.h 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

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 defines both _LIBC and

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 glob.h 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. The

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

2005-05-17 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 _GLOB_H 1

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 disagree now. I

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 this:

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

2005-05-16 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 parens

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

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 this stuff

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 sys/cdefs.h

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

2005-05-13 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 there are a

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 KR 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 any

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 good. k

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% the same as libc. It doesn't

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 huge

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 alloca.h -# undef strdup -# define