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 02:30:21PM +0200, Andreas Schwab wrote:
> Rasmus Villemoes <rv@rasmusvillemoes.dk> writes:
> 
> > The sole varargs argument to open and friends has type mode_t, not int.
> 
> Varargs use the promoted type, but mode_t traditionally has been
> unsigned short.
> 
So which solution do you prefer? Adding a custom type for that as
suggested in sibling threads? What about just adding a cast like

mode = (mode_t) va_arg (arg, int);



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