Re: [PATCH] inttostr: add gidtostr and uidtostr
On 08/12/2013 01:44 AM, Paul Eggert wrote: I think the worry was that there are zillions of such types (mode_t, dev_t, pid_t, etc.), too many to define a function for each. For valid gid_t and uid_t values one can use umaxtostr in practice, and there seemed to be little point to tuning for platforms where gid_t and uid_t are narrower than uintmax_t. Fair enough. Thanks for the explanation. Have a nice day, Berny
Re: [PATCH] inttostr: add gidtostr and uidtostr
On 08/11/2013 05:44 PM, Paul Eggert wrote: I think the worry was that there are zillions of such types (mode_t, dev_t, pid_t, etc.), too many to define a function for each. For valid gid_t and uid_t values one can use umaxtostr in practice, and there seemed to be little point to tuning for platforms where gid_t and uid_t are narrower than uintmax_t. I don't know of any platforms where gid_t and uid_t are larger than int; so libvirt just casts them to int (although it is feasible that such a platform can be added, so it also uses verify() to be alerted at compile time if those assumptions are wrong). There ARE platforms where pid_t (and thus id_t) are larger than long (namely 64-bit mingw has a 64-bit pid_t but 32-bit long), requiring the use of uintmax_t. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature
Re: [bug #35580] bootstrap is not portable to OpenBSD
On Fri, Aug 09, 2013 at 16:34:24 +0100, Pádraig Brady wrote: Excellent. I intend to push the attached change to bootstrap so, that includes sha1 in the list now it's compatible, so therefore not requiring one to set SHA1SUM on BSD at all. I tested the change you pushed to gnulib. It still requires passing SHA1SUM, since a program from the default list must still understand the --version option to be accepted. But other than that, it works now. Also I've implemented the optimization not to look for sha1sum at all, when not updating po files. This works now. Thanks, -- mike
Re: OpenBSD: gettimeofday and sys/time.h errors
On Sat, Aug 10, 2013 at 22:05:39 -0700, Paul Eggert wrote: No, I think Gnulib is being too picky here. I installed the following patch, which I hope fixes the problems you mentioned. Yes, all the gettimeofday and sys/time.h tests pass now, thanks! -- mike
Re: [bug-diffutils] Building diffutils 3.3 with hardening flags
[adding bug-gnulib] On 08/12/2013 09:57 AM, Santiago Vila wrote: Hello. When building diffutils 3.3 using hardening compiler flags, I get this: gcc -std=gnu11 -I. -I../lib -DIN_DIFFUTILS_GNULIB_TESTS=1 -I. -I. -I.. -I./.. -I../lib -I./../lib -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -c -o test-xvasprintf.o test-xvasprintf.c test-xvasprintf.c: In function 'test_xasprintf': test-xvasprintf.c:98:5: error: format not a string literal and no format arguments [-Werror=format-security] cc1: some warnings being treated as errors You'll have this problem on ALL packages that share this test from gnulib. I think a better fix would be to use a #pragma GCC to tell the compiler that we intentionally don't want warnings on this particular unit test. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature
[PATCH] bootstrap: port to OpenBSD sed
As mentioned in a previous thread [1], the native sed utility on OpenBSD does not interpret `-' as a file argument to mean stdin. This is inconvenient but POSIX-compliant behavior. The attached patch fixes this, let me know if this looks okay (and push for me if so). [1] https://lists.gnu.org/archive/html/bug-gnulib/2013-08/msg00012.html Thanks, -- mike From c3f41ec0acbb9487002c14d310b1c63d3346a10b Mon Sep 17 00:00:00 2001 From: Mike Miller mtmil...@ieee.org Date: Mon, 12 Aug 2013 22:39:49 -0400 Subject: [PATCH] bootstrap: port to OpenBSD sed * build-aux/bootstrap (insert_if_absent): Port to OpenBSD sed which does not interpret `-' as a file argument to mean stdin. --- ChangeLog | 6 ++ build-aux/bootstrap | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3c8eb4d..57b078d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-08-12 Mike Miller mtmil...@ieee.org + + bootstrap: port to OpenBSD sed + * build-aux/bootstrap (insert_if_absent): Port to OpenBSD sed which + does not interpret `-' as a file argument to mean stdin. + 2013-08-11 Paul Eggert egg...@cs.ucla.edu fpending: port to recent Cygwin change to stdio_ext.h diff --git a/build-aux/bootstrap b/build-aux/bootstrap index df763de..d2a4665 100755 --- a/build-aux/bootstrap +++ b/build-aux/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh # Print a version string. -scriptversion=2013-08-09.15; # UTC +scriptversion=2013-08-13.02; # UTC # Bootstrap this package from checked-out sources. @@ -320,7 +320,7 @@ insert_if_absent() { die Error: Duplicate entries in $file: $duplicate_entries fi linesold=$(gitignore_entries $file | wc -l) - linesnew=$(echo $str | gitignore_entries - $file | sort -u | wc -l) + linesnew=$( { echo $str; cat $file; } | gitignore_entries | sort -u | wc -l) if [ $linesold != $linesnew ] ; then { echo $str | cat - $file $file.bak mv $file.bak $file; } \ || die insert_if_absent $file $str: failed -- 1.8.3.2