Re: xctime()

2010-01-26 Thread Robert Millan
On Mon, Jan 25, 2010 at 10:57:07AM +0100, Bruno Haible wrote: > Robert Millan wrote: > > > - In the average case, you can get away with 1 strftime call instead of > > > 2, > > > if you preallocate a buffer on the stack: > > > char buf[256]; >

Re: xctime()

2010-01-24 Thread Robert Millan
1, but this case should be pretty rare > (even in Chinese and GB18030 encoding, 64 characters should be enough > for a date + time display). What about http://www.gnu.org/prep/standards/standards.html#Semantics ? Avoiding arbitrary limits is a good thing IMO. > - sizeof ("

xctime()

2010-01-24 Thread Robert Millan
= strftime (NULL, INT32_MAX, "%c", loctime) + sizeof (""); str = xmalloc (len); strftime (str, len, "%c", loctime); return str; } I find it much more comfortable than having to deal with strftime() every time. If you're interested, I could make a Gnulib module o

Re: [PATCH] fix build failure with getline.c

2010-01-02 Thread Robert Millan
On Sat, Jan 02, 2010 at 10:15:46AM +0100, Simon Josefsson wrote: > Eric Blake writes: > > > According to Robert Millan on 1/1/2010 4:24 PM: > >>> Aren't you using the gnulib stdio module, or is the code not working > >>> somehow? > >>> >

Re: [PATCH] fix build failure with getline.c

2010-01-01 Thread Robert Millan
On Fri, Jan 01, 2010 at 11:45:19PM +0100, Simon Josefsson wrote: > Robert Millan writes: > > > When importing getline.c into GNU GRUB, it failed to build due to undefined > > ssize_t. Here's a fix (I believe including is portable > > enough, > > please let

Re: [PATCH] fix build failure with getline.c

2010-01-01 Thread Robert Millan
Eric Blake writes: > Which platform was this failure on? Perhaps it resulted from > Bruno's attempts to reduce namespace pollution on glibc machines, coupled > with an older glibc that didn't yet expose everything required by POSIX 2008? Debian Lenny with glibc 2.7. -- R

[PATCH] fix build failure with getline.c

2010-01-01 Thread Robert Millan
When importing getline.c into GNU GRUB, it failed to build due to undefined ssize_t. Here's a fix (I believe including is portable enough, please let me know if I'm wrong). -- Robert Millan "Be the change you want to see in the world" -- Gandhi 2010-01-01 Robert Millan

Re: [PATCH] fix build warning in fnmatch_loop.c

2009-11-15 Thread Robert Millan
\ > + : p - startp + 1UL); \ You don't want the assert() though? I figured it'd be useful for extra safety. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may a

Re: [PATCH] fix build warning in fnmatch_loop.c

2009-11-14 Thread Robert Millan
On Sat, Nov 14, 2009 at 07:41:24AM -0700, Eric Blake wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > According to Robert Millan on 11/9/2009 2:50 PM: > >> I'm not a fan of unnecessary casts. Can't we instead write this as: > >> > >> :

Re: [PATCH] Fix $m4dirs count

2009-11-14 Thread Robert Millan
On Sat, Nov 14, 2009 at 06:47:15AM -0700, Eric Blake wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > According to Robert Millan on 11/9/2009 2:00 PM: > >> This is wrong, since 'echo -n' is not portable. It should use printf > >> instead,

Re: [PATCH] fix build warning in fnmatch_loop.c

2009-11-09 Thread Robert Millan
Btw, excuse me for the duplicate mail. It's a bit odd, but I don't receive any mail from the list (my server doesn't register attempts from mailman), even though I'm subscribed (if I try to re-subscribe, I do receive a notification). Perhaps someone could investigate this

Re: [PATCH] fix build warning in fnmatch_loop.c

2009-11-09 Thread Robert Millan
> I'm not a fan of unnecessary casts. Can't we instead write this as: > > : p - startp + 1U; > > to still show that we intend for unsigned math, but without a cast? The warning persists. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We wi

Re: [PATCH] Fix $m4dirs count

2009-11-09 Thread Robert Millan
> This is wrong, since 'echo -n' is not portable. It should use printf > instead, > or find some other portable way to count $m4dirs. Hi, In that case, please use printf. It should work too. (I assume it's not necessary to send a new patch, let me know if you&#

[PATCH] fix build warning in fnmatch_loop.c

2009-11-09 Thread Robert Millan
Fixes a build warning in fnmatch_loop.c. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all

[PATCH] fix build warning in fnmatch_loop.c

2009-11-09 Thread Robert Millan
Fixes a build warning in fnmatch_loop.c. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all

[PATCH] Fix $m4dirs count

2009-11-09 Thread Robert Millan
$m4dirs is incorrectly counting. In my particular case (correct value: 0, detected value: 1), this resulted in gnulib-tool silently exitting with no visible error (and no job done). -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) yo

[PATCH] xgethostbyname using realloc()

2009-08-28 Thread Robert Millan
This makes it easier to import xgethostname.c into an external program. 2009-08-29 Robert Millan * lib/xgethostname.c: Remove `"xalloc.h"'. (xgethostname): Use realloc() instead of x2realloc(). -- Robert Millan The DRM opt-in fallacy: "Your data be

[PATCH] add "extern \"C\"" blurb to xgethostname.h

2009-08-28 Thread Robert Millan
This makes xgethostname.h usable on C++. 2009-08-29 Robert Millan * lib/xgethostname.h [__cplusplus] (xgethostname): Enclose declaration within `extern "C"'. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and

Re: [PATCH] GNU/kOpenSolaris support

2009-03-29 Thread Robert Millan
On Sun, Mar 29, 2009 at 08:30:27PM +0200, Simon Josefsson wrote: > Robert Millan writes: > > > On Sat, Feb 28, 2009 at 03:52:56PM +0100, Robert Millan wrote: > >> > >> Ping! > > > > Hey, > > > > I think we got everything cleared now. Pl

Re: [PATCH] GNU/kOpenSolaris support

2009-03-28 Thread Robert Millan
On Sat, Feb 28, 2009 at 03:52:56PM +0100, Robert Millan wrote: > > Ping! Hey, I think we got everything cleared now. Please can someone look at this patch? It's rather small & straightforwarded, should be no pain to review it. > On Wed, Feb 04, 2009 at 11:03:01PM +0100, R

Re: [PATCH] GNU/kOpenSolaris support

2009-02-28 Thread Robert Millan
Ping! On Wed, Feb 04, 2009 at 11:03:01PM +0100, Robert Millan wrote: > > Hi! > > Any news about this? > > On Mon, Jan 19, 2009 at 12:01:04PM +0100, Robert Millan wrote: > > > > Hi, > > > > A triplet for GNU/kOpenSolaris has been assigned in GNU co

Re: [PATCH] GNU/kOpenSolaris support

2009-02-04 Thread Robert Millan
Hi! Any news about this? On Mon, Jan 19, 2009 at 12:01:04PM +0100, Robert Millan wrote: > > Hi, > > A triplet for GNU/kOpenSolaris has been assigned in GNU config now. Here's > the patch for gnulib to detect it. In addition to my previous patch, this > one als

[PATCH] GNU/kOpenSolaris support

2009-01-19 Thread Robert Millan
Hi, A triplet for GNU/kOpenSolaris has been assigned in GNU config now. Here's the patch for gnulib to detect it. In addition to my previous patch, this one also adds it to host-os.m4. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and

[PATCH] Generic check for ld.so in config.libpath

2009-01-04 Thread Robert Millan
This patch adds a generic check for ld.so in config.libpath. It should detect all Glibc-based systems (and possibly others) without need to maintain a hardcoded list. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your

Re: [PATCH] match GNU/kOpenSolaris in Glibc checks

2008-12-29 Thread Robert Millan
There's now: 0) Produce a complete system with more than a handful of users as a prerequisite for having a triplet assigned. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening you

Re: [PATCH] match GNU/kOpenSolaris in Glibc checks

2008-12-29 Thread Robert Millan
k for '*-gnu' and, if necessary, exclude whatever matches that which is not glibc. At this time you wouldn't need to exclude anything, but I don't see it as a problem if you had to exclude future triplets that don't exist yet. I think it's clear that my request doesn&

Re: [PATCH] match GNU/kOpenSolaris in Glibc checks

2008-12-29 Thread Robert Millan
t; which differs from i386-unknown-knetbsd-gnu in the choice of its libc: it uses > NetBSD's libc instead of GNU libc. The latest updates that can be found for this port date from 2002. I believe it is defunct now. I think I'll contact its former maintainers and try to have this

[PATCH] match GNU/kOpenSolaris in Glibc checks

2008-12-26 Thread Robert Millan
checks in gnulib do it this way already). Patch attached. [1] Glibc-based system on kernel of Opensolaris, see: http://csclub.uwaterloo.ca/~dtbartle/opensolaris/ -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your dat