Browse Source

Use __typeof instead of adding full prototypes

Peter S. Mazinger 18 years ago
parent
commit
358534f7db

+ 2 - 2
libc/misc/internals/__uClibc_main.c

@@ -38,9 +38,9 @@ libc_hidden_proto(fstat)
 libc_hidden_proto(abort)
 libc_hidden_proto(exit)
 
-extern int __libc_open (__const char *__file, int __oflag, ...) __nonnull ((1));
+extern __typeof(open) __libc_open;
 libc_hidden_proto(__libc_open)
-extern int __libc_fcntl (int __fd, int __cmd, ...);
+extern __typeof(fcntl) __libc_fcntl;
 libc_hidden_proto(__libc_fcntl)
 
 #ifndef SHARED

+ 2 - 2
libc/sysdeps/linux/common/__syscall_fcntl.c

@@ -12,11 +12,11 @@
 #include <fcntl.h>
 #include <bits/wordsize.h>
 
-extern int __libc_fcntl(int fd, int cmd, ...);
+extern __typeof(fcntl) __libc_fcntl;
 libc_hidden_proto(__libc_fcntl)
 
 #if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64
-extern int __libc_fcntl64(int fd, int cmd, ...);
+extern __typeof(fcntl64) __libc_fcntl64;
 libc_hidden_proto(__libc_fcntl64)
 #endif
 

+ 1 - 1
libc/sysdeps/linux/common/__syscall_fcntl64.c

@@ -12,7 +12,7 @@
 #include <fcntl.h>
 
 #if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64
-extern int __libc_fcntl64(int fd, int cmd, ...);
+extern __typeof(fcntl64) __libc_fcntl64;
 libc_hidden_proto(__libc_fcntl64)
 
 #define __NR___syscall_fcntl64 __NR_fcntl64

+ 1 - 1
libc/sysdeps/linux/common/open.c

@@ -14,7 +14,7 @@
 #include <string.h>
 #include <sys/param.h>
 
-extern int __libc_open(const char *file, int flags, ...);
+extern __typeof(open) __libc_open;
 libc_hidden_proto(__libc_open)
 
 #define __NR___syscall_open __NR_open

+ 1 - 1
libc/sysdeps/linux/common/open64.c

@@ -14,7 +14,7 @@
 # define O_LARGEFILE	0100000
 #endif
 
-extern int __libc_open (__const char *__file, int __oflag, ...) __nonnull ((1));
+extern __typeof(open) __libc_open;
 libc_hidden_proto(__libc_open)
 
 /* Open FILE with access OFLAG.  If OFLAG includes O_CREAT,