Re: open_safer on amd64

2009-05-22 Thread Jim Meyering
Bruno Haible wrote: > Eric Blake wrote: >> We could also check at configure time for AC_CHECK_SIZEOF([mode_t]), then >> use the preprocessor to skip the unneeded branch altogether using the >> appropriate macro from config.h. > > Yes. Paul Eggert tried to avoid configure-time checks that could also

Re: open_safer on amd64

2009-05-21 Thread Bruno Haible
Eric Blake wrote: > We could also check at configure time for AC_CHECK_SIZEOF([mode_t]), then > use the preprocessor to skip the unneeded branch altogether using the > appropriate macro from config.h. Yes. Paul Eggert tried to avoid configure-time checks that could also be done at compile-time. Bu

Re: open_safer on amd64

2009-05-21 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 5/20/2009 5:08 PM: > You can ignore this warning. The code is fine. > > We know no way of getting rid of this warning, except by passing fewer warning > options to gcc. We could also check at configure time for AC_CHECK_S

Re: open_safer on amd64

2009-05-21 Thread Sergey Poznyakoff
Eric Blake ha escrit: > In earlier versions of POSIX, the intent was that mode_t could > be narrower than int, and that all programmers had to use only symbolic > constants in that argument. As a side note, on that particular architecture, mode_t is indeed narrower than int. Regards, Sergey

Re: open_safer on amd64

2009-05-21 Thread Sergey Poznyakoff
Bruno Haible ha escrit: > You can ignore this warning. The code is fine. Ah, OK. Thank you. Perhaps it merits mentioning in the docs, to avoid further reports of this kind? Regards, Sergey

Re: open_safer on amd64

2009-05-20 Thread Ben Pfaff
Eric Blake writes: > In earlier versions of POSIX, the intent was that mode_t could > be narrower than int, and that all programmers had to use only symbolic > constants in that argument. But POSIX 2008 changed its stance by adding > these words: > > The header shall define the following symbol

Re: open_safer on amd64

2009-05-20 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 5/20/2009 5:08 PM: > Sergey Poznyakoff wrote: >> When trying to compile open-safer.c on amd64 I get: >> >> open-safer.c: In function 'open_safer': >> open-safer.c:46: warning: 'mode_t' is promoted to 'int' when passed throu

Re: open_safer on amd64

2009-05-20 Thread Bruno Haible
Sergey Poznyakoff wrote: > When trying to compile open-safer.c on amd64 I get: > > open-safer.c: In function 'open_safer': > open-safer.c:46: warning: 'mode_t' is promoted to 'int' when passed through > '...' > open-safer.c:46: warning: (so you should pass 'int' not 'mode_t' to 'va_arg') > open-s

open_safer on amd64

2009-05-20 Thread Sergey Poznyakoff
Hello, When trying to compile open-safer.c on amd64 I get: open-safer.c: In function 'open_safer': open-safer.c:46: warning: 'mode_t' is promoted to 'int' when passed through '...' open-safer.c:46: warning: (so you should pass 'int' not 'mode_t' to 'va_arg') open-safer.c:46: note: if this code is