This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Use mode_t in open and friends


On Thu, Apr 24, 2014 at 07:06:58AM -0700, Paul Eggert wrote:
> gnulib attacks this problem by defining a macro PROMOTED_MODE_T that
> expands to 'int' on platforms where mode_t is narrower than int, and
> to 'mode_t' otherwise.  This supports 'mode = va_arg (ap,
> PROMOTED_MODE_T);'.  glibc could do something similar.

I thought glibc always had mode_t with rank >= int, but if not,
something like __typeof__(+(mode_t)0) would work just fine, since
glibc depends on GNU C extensions like __typeof__ anyway.

Rich


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]