@@ -30,7 +30,7 @@ __libc_open (file, oflag)
const char *file;
int oflag;
{
- int mode;
+ mode_t mode;
if (file == NULL)
{
@@ -41,9 +41,9 @@ __libc_open (file, oflag)
if (oflag & O_CREAT)
{
va_list arg;
- va_start(arg, oflag);
- mode = va_arg(arg, int);
- va_end(arg);
+ va_start (arg, oflag);
+ mode = va_arg (ap, __typeof__(+(mode_t)0));
+ va_end (arg);
}
__set_errno (ENOSYS);
@@ -28,7 +28,7 @@ __libc_open64 (file, oflag)
const char *file;
int oflag;
{
- int mode;
+ mode_t mode;
if (file == NULL)
{
@@ -40,7 +40,7 @@ __libc_open64 (file, oflag)
{
va_list arg;
va_start (arg, oflag);
- mode = va_arg (arg, int);
+ mode = va_arg (ap, __typeof__(+(mode_t)0));
va_end (arg);
}
@@ -38,7 +38,7 @@ __openat (fd, file, oflag)
const char *file;
int oflag;
{
- int mode;
+ mode_t mode;
if (file == NULL)
{
@@ -64,7 +64,7 @@ __openat (fd, file, oflag)
{
va_list arg;
va_start (arg, oflag);
- mode = va_arg (arg, int);
+ mode = va_arg (ap, __typeof__(+(mode_t)0));
va_end (arg);
}
@@ -31,7 +31,7 @@ __openat64 (fd, file, oflag)
const char *file;
int oflag;
{
- int mode;
+ mode_t mode;
if (file == NULL)
{
@@ -57,7 +57,7 @@ __openat64 (fd, file, oflag)
{
va_list arg;
va_start (arg, oflag);
- mode = va_arg (arg, int);
+ mode = va_arg (ap, __typeof__(+(mode_t)0));
va_end (arg);
}
@@ -291,7 +291,7 @@ sem_open (const char *name, int oflag, ...)
try_create:
va_start (ap, oflag);
- mode = va_arg (ap, mode_t);
+ mode = va_arg (ap, __typeof__(+(mode_t)0));
value = va_arg (ap, unsigned int);
va_end (ap);
@@ -34,7 +34,7 @@ __libc_open (const char *file, int oflag, ...)
{
va_list arg;
va_start (arg, oflag);
- mode = va_arg (arg, mode_t);
+ mode = va_arg (ap, __typeof__(+(mode_t)0));
va_end (arg);
}
else
@@ -41,7 +41,7 @@ __openat (fd, file, oflag)
{
va_list arg;
va_start (arg, oflag);
- mode = va_arg (arg, mode_t);
+ mode = va_arg (ap, __typeof__(+(mode_t)0));
va_end (arg);
}
else
@@ -24,13 +24,13 @@
int
__libc_open64 (const char *file, int oflag, ...)
{
- int mode = 0;
+ mode_t mode = 0;
if (oflag & O_CREAT)
{
va_list arg;
va_start (arg, oflag);
- mode = va_arg (arg, int);
+ mode = va_arg (ap, __typeof__(+(mode_t)0));
va_end (arg);
}
@@ -27,13 +27,13 @@
int
__libc_open (const char *file, int oflag, ...)
{
- int mode = 0;
+ mode_t mode = 0;
if (oflag & O_CREAT)
{
va_list arg;
va_start (arg, oflag);
- mode = va_arg (arg, int);
+ mode = va_arg (ap, __typeof__(+(mode_t)0));
va_end (arg);
}
@@ -57,13 +57,13 @@ weak_alias (__libc_open, open)
int
__open_nocancel (const char *file, int oflag, ...)
{
- int mode = 0;
+ mode_t mode = 0;
if (oflag & O_CREAT)
{
va_list arg;
va_start (arg, oflag);
- mode = va_arg (arg, int);
+ mode = va_arg (ap, __typeof__(+(mode_t)0));
va_end (arg);
}
@@ -27,13 +27,13 @@
int
__libc_open64 (const char *file, int oflag, ...)
{
- int mode = 0;
+ mode_t mode = 0;
if (oflag & O_CREAT)
{
va_list arg;
va_start (arg, oflag);
- mode = va_arg (arg, int);
+ mode = va_arg (ap, __typeof__(+(mode_t)0));
va_end (arg);
}
@@ -47,7 +47,7 @@ __mq_open (const char *name, int oflag, ...)
va_list ap;
va_start (ap, oflag);
- mode = va_arg (ap, mode_t);
+ mode = va_arg (ap, __typeof__(+(mode_t)0));
attr = va_arg (ap, struct mq_attr *);
va_end (ap);
}
@@ -26,13 +26,13 @@
int
__libc_open64 (const char *file, int oflag, ...)
{
- int mode = 0;
+ mode_t mode = 0;
if (oflag & O_CREAT)
{
va_list arg;
va_start (arg, oflag);
- mode = va_arg (arg, int);
+ mode = va_arg (ap, __typeof__(+(mode_t)0));
va_end (arg);
}
@@ -161,7 +161,7 @@ __OPENAT (fd, file, oflag)
{
va_list arg;
va_start (arg, oflag);
- mode = va_arg (arg, mode_t);
+ mode = va_arg (ap, __typeof__(+(mode_t)0));
va_end (arg);
}