[PATCHv2 4/2] stdio: limit __gnu_printf__ witness to gcc 4.4+

2015-05-26 Thread Eric Blake
If we start adding more places that need to conditionally label functions with __gnu_printf__, it will be nicer if the logic for determining that gcc even supports that attribute is done once up front rather than in each caller. * lib/error.h (_GL_ATTRIBUTE_SPEC_PRINTF): Move gcc version probe...

Re: [PATCHv2 3/2] error: use correct printf attributes on mingw

2015-05-26 Thread Pádraig Brady
On 27/05/15 00:36, Eric Blake wrote: > On 05/26/2015 05:32 PM, Eric Blake wrote: >> Now that we always turn on __USE_MINGW_ANSI_STDIO when extensions >> are in use, we need to replicate the same logic in error.h as >> we have in stdio.h, for selecting the correct format string that >> will squelch

Re: [PATCHv2 3/2] error: use correct printf attributes on mingw

2015-05-26 Thread Eric Blake
On 05/26/2015 05:32 PM, Eric Blake wrote: > Now that we always turn on __USE_MINGW_ANSI_STDIO when extensions > are in use, we need to replicate the same logic in error.h as > we have in stdio.h, for selecting the correct format string that > will squelch gcc -Wformat=2 warnings. > > Reported by A

[PATCHv2 3/2] error: use correct printf attributes on mingw

2015-05-26 Thread Eric Blake
Now that we always turn on __USE_MINGW_ANSI_STDIO when extensions are in use, we need to replicate the same logic in error.h as we have in stdio.h, for selecting the correct format string that will squelch gcc -Wformat=2 warnings. Reported by Assaf Gordon. * lib/stdio.in.h (_GL_ATTRIBUTE_SPEC_PRI

Re: [PATCH] stdio: fix probe on mingw under gcc 5.1

2015-05-26 Thread Eric Blake
On 05/26/2015 04:09 PM, Assaf Gordon wrote: > Hello Eric, > > Thanks for your quick reply and fix. > > I've found one more issue which I'm not sure how to solve - interplay > between gcc/mingw/inttypes/gnulib: The format string to "error()". > > In theory (if I understand correctly), printf() an

Re: [PATCH] stdio: fix probe on mingw under gcc 5.1

2015-05-26 Thread Assaf Gordon
Hello Eric, Thanks for your quick reply and fix. I've found one more issue which I'm not sure how to solve - interplay between gcc/mingw/inttypes/gnulib: The format string to "error()". In theory (if I understand correctly), printf() and error() should accept the same format specifiers, thus

[PATCH v2 2/2] inttypes: force correct mingw PRIdMAX even without

2015-05-26 Thread Eric Blake
The mingw trick of using __USE_MINGW_ANSI_STDIO only changes the definitions in if is also included. But since we want to always use the __gnu_printf__ flavor when available, we want to make sure that including in isolation will give the desired "lld" answer. Reported by Assaf Gordon. * modul

[PATCH v2 1/2] stdio: fix probe on mingw under gcc 5.1

2015-05-26 Thread Eric Blake
Per https://gcc.gnu.org/gcc-5/porting_to.html, gcc 5.1 intentionally changed the preprocessor to emit multiple lines, rather than one line, when expanding text that includes literal markers combined with a macro expansion obtained from a header. This in turn breaks the probe for whether mingw head

[PATCH v2 0/2] mingw PRIdMAX cleanups

2015-05-26 Thread Eric Blake
Thanks for the reviews on my previous attempt; this one is a lot cleaner, and passed in my testing, so I'm going ahead and pushing it. Eric Blake (2): stdio: fix probe on mingw under gcc 5.1 inttypes: force correct mingw PRIdMAX even without ChangeLog | 11 +++ lib/inttypes.

Re: [PATCH] stdio: fix probe on mingw under gcc 5.1

2015-05-26 Thread Eric Blake
On 05/26/2015 02:21 PM, Eric Blake wrote: > On 05/26/2015 01:49 PM, Assaf Gordon wrote: >> Hello, >> >> I'm encountering a similar/related issue with PRIdMAX on mingw32-gcc 4.8.2. >> > > Okay, so that's a version of mingw new enough to honor > __USE_MINGW_ANSI_STDIO, and a version of gcc old enou

[GNULIB v2 0/2] Improved acl handling

2015-05-26 Thread Andreas Gruenbacher
Hello, these are the remaining two gnulib patches from the patch set originally posted on 12 April. These patches (and the richacl patches on top) are also available here: https://github.com/andreas-gruenbacher/gnulib https://github.com/andreas-gruenbacher/coreutils On the coreutils side, a

[GNULIB v2 2/2] qacl: Reimplement qset_acl and qcopy_acl

2015-05-26 Thread Andreas Gruenbacher
Implement get_permissions and set_permissions primitives for getting all the permissions of a file, storing them, and later setting them. (In the minimal case, the permissions consist only of a file mode.) Reimplement qset_acl and qcopy_acl based on these new primitives: this avoids code duplicatio

[GNULIB v2 1/2] file-has-acl: Split feature tests again

2015-05-26 Thread Andreas Gruenbacher
* lib/file-has-acl.c: Instead of testing for XATTR_NAME_POSIX_ACL_ACCESS and XATTR_NAME_POSIX_ACL_DEFAULT, define them when needed. * m4/acl.m4 (gl_FILE_HAS_ACL): With that, Paul's GETXATTR_WITH_POSIX_ACLS change shouldn't be needed anymore. --- ChangeLog | 9 + lib/file-has-acl.

Re: [PATCH] stdio: fix probe on mingw under gcc 5.1

2015-05-26 Thread Eric Blake
On 05/26/2015 01:49 PM, Assaf Gordon wrote: > Hello, > > I'm encountering a similar/related issue with PRIdMAX on mingw32-gcc 4.8.2. > > In short, when using gnulib in my project and cross-compiling with > mingw32-gcc 4.8.2 > somehow the PRIdMAX becomes "lld" instead of "I64d". That somehow is t

Re: [PATCH] stdio: fix probe on mingw under gcc 5.1

2015-05-26 Thread Assaf Gordon
Hello, I'm encountering a similar/related issue with PRIdMAX on mingw32-gcc 4.8.2. In short, when using gnulib in my project and cross-compiling with mingw32-gcc 4.8.2 somehow the PRIdMAX becomes "lld" instead of "I64d". I was able to reproduce it with GNU Hello (long details below). perhaps