Explorar o código

syscall() declaration belongs in unistd.h, not sys/syscall.h

traditionally, both BSD and GNU systems have it this way.
sys/syscall.h is purely syscall number macros. presently glibc exposes
the syscall declaration in unistd.h only with _GNU_SOURCE, but that
does not reflect historical practice.
Rich Felker %!s(int64=12) %!d(string=hai) anos
pai
achega
baf246e559
Modificáronse 2 ficheiros con 1 adicións e 10 borrados
  1. 0 10
      include/sys/syscall.h
  2. 1 0
      include/unistd.h

+ 0 - 10
include/sys/syscall.h

@@ -1,16 +1,6 @@
 #ifndef _SYS_SYSCALL_H
 #define _SYS_SYSCALL_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <features.h>
-
-long syscall(long, ...);
 
 #include <bits/syscall.h>
 
-#ifdef __cplusplus
-}
-#endif
 #endif

+ 1 - 0
include/unistd.h

@@ -175,6 +175,7 @@ void setusershell(void);
 void endusershell(void);
 char *getusershell(void);
 int acct(const char *);
+long syscall(long, ...);
 #endif
 
 #ifdef _GNU_SOURCE