提交 baf246e5 编写于 作者: R Rich Felker

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.
上级 34aa169d
#ifndef _SYS_SYSCALL_H #ifndef _SYS_SYSCALL_H
#define _SYS_SYSCALL_H #define _SYS_SYSCALL_H
#ifdef __cplusplus
extern "C" {
#endif
#include <features.h>
long syscall(long, ...);
#include <bits/syscall.h> #include <bits/syscall.h>
#ifdef __cplusplus
}
#endif
#endif #endif
...@@ -175,6 +175,7 @@ void setusershell(void); ...@@ -175,6 +175,7 @@ void setusershell(void);
void endusershell(void); void endusershell(void);
char *getusershell(void); char *getusershell(void);
int acct(const char *); int acct(const char *);
long syscall(long, ...);
#endif #endif
#ifdef _GNU_SOURCE #ifdef _GNU_SOURCE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册