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: Rasmus Villemoes <rv at rasmusvillemoes dot dk>
- To: libc-alpha at sourceware dot org
- Date: Thu, 24 Apr 2014 15:06:14 +0200
- 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>
Andreas Schwab <schwab@linux-m68k.org> writes:
> 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.
Makes sense. But then sysdeps/unix/sysv/linux/mq_open.c and
sysdeps/unix/sysv/linux/openat.c are inconsistent with the other files
in sysdeps/unix/sysv/linux/.
(Also, mode_t is actually unsigned int on linux/x86_64.)
Rasmus