This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Use mode_t in open and friends
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: Rasmus Villemoes <rv at rasmusvillemoes dot dk>, libc-alpha at sourceware dot org
- Date: Thu, 24 Apr 2014 07:06:58 -0700
- Subject: Re: [PATCH] Use mode_t in open and friends
- Authentication-results: sourceware.org; auth=none
- References: <87k3afhsua dot fsf at rasmusvillemoes dot dk> <87a9banc4i dot fsf at igel dot home> <87bnvqj2rd dot fsf at rasmusvillemoes dot dk>
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.