Skip to content

Commit

Permalink
Remove unneeded _syscallX macros from user view in asm-*/unistd.h
Browse files Browse the repository at this point in the history
These aren't needed by glibc or klibc, and they're broken in some cases
anyway. The uClibc folks are apparently switching over to stop using
them too (now that we agreed that they should be dropped, at least).

Signed-off-by: David Woodhouse <[email protected]>
  • Loading branch information
David Woodhouse authored and dwmw2 committed Apr 29, 2006
1 parent 34c278d commit 5614253
Show file tree
Hide file tree
Showing 21 changed files with 76 additions and 86 deletions.
7 changes: 4 additions & 3 deletions include/asm-alpha/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,8 @@
#define __NR_inotify_add_watch 445
#define __NR_inotify_rm_watch 446

#ifdef __KERNEL__

#define NR_SYSCALLS 447

#if defined(__GNUC__)
Expand Down Expand Up @@ -565,9 +567,8 @@ type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5, type6 arg6)\
_syscall_return(type); \
}

#endif /* __LIBRARY__ && __GNUC__ */
#endif /* __GNUC__ */

#ifdef __KERNEL__
#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
#define __ARCH_WANT_STAT64
Expand All @@ -578,7 +579,6 @@ type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5, type6 arg6)\
#define __ARCH_WANT_SYS_OLD_GETRLIMIT
#define __ARCH_WANT_SYS_OLDUMOUNT
#define __ARCH_WANT_SYS_SIGPENDING
#endif

#ifdef __KERNEL_SYSCALLS__

Expand Down Expand Up @@ -661,4 +661,5 @@ asmlinkage long sys_rt_sigaction(int sig,

#define cond_syscall(x) asm(".weak\t" #x "\n" #x " = sys_ni_syscall")

#endif /* __KERNEL__ */
#endif /* _ALPHA_UNISTD_H */
10 changes: 5 additions & 5 deletions include/asm-arm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
#ifndef __ASM_ARM_UNISTD_H
#define __ASM_ARM_UNISTD_H

#include <linux/linkage.h>

#define __NR_OABI_SYSCALL_BASE 0x900000

#if defined(__thumb__) || defined(__ARM_EABI__)
Expand Down Expand Up @@ -378,6 +376,9 @@
#undef __NR_ipc
#endif

#ifdef __KERNEL__
#include <linux/linkage.h>

#define __sys2(x) #x
#define __sys1(x) __sys2(x)

Expand Down Expand Up @@ -519,7 +520,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6
__syscall_return(type,__res); \
}

#ifdef __KERNEL__
#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_STAT64
#define __ARCH_WANT_SYS_GETHOSTNAME
Expand All @@ -540,7 +540,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6
#define __ARCH_WANT_OLD_READDIR
#define __ARCH_WANT_SYS_SOCKETCALL
#endif
#endif

#ifdef __KERNEL_SYSCALLS__

Expand All @@ -564,7 +563,7 @@ asmlinkage long sys_rt_sigaction(int sig,
struct sigaction __user *oact,
size_t sigsetsize);

#endif
#endif /* __KERNEL_SYSCALLS__ */

/*
* "Conditional" syscalls
Expand All @@ -574,4 +573,5 @@ asmlinkage long sys_rt_sigaction(int sig,
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")

#endif /* __KERNEL__ */
#endif /* __ASM_ARM_UNISTD_H */
10 changes: 5 additions & 5 deletions include/asm-arm26/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
#ifndef __ASM_ARM_UNISTD_H
#define __ASM_ARM_UNISTD_H

#include <linux/linkage.h>

#define __NR_SYSCALL_BASE 0x900000

/*
Expand Down Expand Up @@ -312,6 +310,9 @@
#define __ARM_NR_cacheflush (__ARM_NR_BASE+2)
#define __ARM_NR_usr26 (__ARM_NR_BASE+3)

#ifdef __KERNEL__
#include <linux/linkage.h>

#define __sys2(x) #x
#define __sys1(x) __sys2(x)

Expand Down Expand Up @@ -443,7 +444,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6
__syscall_return(type,__res); \
}

#ifdef __KERNEL__
#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
#define __ARCH_WANT_STAT64
Expand All @@ -462,7 +462,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6
#define __ARCH_WANT_SYS_SIGPENDING
#define __ARCH_WANT_SYS_SIGPROCMASK
#define __ARCH_WANT_SYS_RT_SIGACTION
#endif

#ifdef __KERNEL_SYSCALLS__

Expand All @@ -486,7 +485,7 @@ asmlinkage long sys_rt_sigaction(int sig,
struct sigaction __user *oact,
size_t sigsetsize);

#endif
#endif /* __KERNEL_SYSCALLS__ */

/*
* "Conditional" syscalls
Expand All @@ -496,4 +495,5 @@ asmlinkage long sys_rt_sigaction(int sig,
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")

#endif /* __KERNEL__ */
#endif /* __ASM_ARM_UNISTD_H */
9 changes: 4 additions & 5 deletions include/asm-cris/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,11 @@
#define __NR_request_key 287
#define __NR_keyctl 288

#define NR_syscalls 289
#ifdef __KERNEL__

#define NR_syscalls 289


#ifdef __KERNEL__
#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
#define __ARCH_WANT_OLD_STAT
Expand Down Expand Up @@ -379,12 +379,10 @@ asmlinkage long sys_rt_sigaction(int sig,
* complaints. We don't want to use -fno-builtin, so just use a
* different name when in the kernel.
*/
#ifdef __KERNEL__
#define _exit kernel_syscall_exit
#endif
static inline _syscall1(int,_exit,int,exitcode)
static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
#endif
#endif /* __KERNEL_SYSCALLS__ */


/*
Expand All @@ -395,4 +393,5 @@ static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")

#endif /* __KERNEL__ */
#endif /* _ASM_CRIS_UNISTD_H_ */
7 changes: 4 additions & 3 deletions include/asm-frv/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@
#define __NR_pselect6 308
#define __NR_ppoll 309

#ifdef __KERNEL__

#define NR_syscalls 310

/*
Expand Down Expand Up @@ -477,9 +479,8 @@ static inline pid_t wait(int * wait_stat)
return waitpid(-1,wait_stat,0);
}

#endif
#endif /* __KERNEL_SYSCALLS__ */

#ifdef __KERNEL__
#define __ARCH_WANT_IPC_PARSE_VERSION
/* #define __ARCH_WANT_OLD_READDIR */
#define __ARCH_WANT_OLD_STAT
Expand All @@ -503,7 +504,6 @@ static inline pid_t wait(int * wait_stat)
#define __ARCH_WANT_SYS_SIGPROCMASK
#define __ARCH_WANT_SYS_RT_SIGACTION
#define __ARCH_WANT_SYS_RT_SIGSUSPEND
#endif

/*
* "Conditional" syscalls
Expand All @@ -515,4 +515,5 @@ static inline pid_t wait(int * wait_stat)
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
#endif

#endif /* __KERNEL__ */
#endif /* _ASM_UNISTD_H_ */
7 changes: 4 additions & 3 deletions include/asm-h8300/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@
#define __NR_request_key 287
#define __NR_keyctl 288

#ifdef __KERNEL__

#define NR_syscalls 289


Expand Down Expand Up @@ -460,7 +462,6 @@ type name(atype a, btype b, ctype c, dtype d, etype e, ftype f) \
__syscall_return(type, __res); \
}

#ifdef __KERNEL__
#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
#define __ARCH_WANT_OLD_STAT
Expand All @@ -483,7 +484,6 @@ type name(atype a, btype b, ctype c, dtype d, etype e, ftype f) \
#define __ARCH_WANT_SYS_SIGPENDING
#define __ARCH_WANT_SYS_SIGPROCMASK
#define __ARCH_WANT_SYS_RT_SIGACTION
#endif

#ifdef __KERNEL_SYSCALLS__

Expand Down Expand Up @@ -534,7 +534,7 @@ asmlinkage long sys_rt_sigaction(int sig,
struct sigaction __user *oact,
size_t sigsetsize);

#endif
#endif /* __KERNEL_SYSCALLS__ */

/*
* "Conditional" syscalls
Expand All @@ -543,4 +543,5 @@ asmlinkage long sys_rt_sigaction(int sig,
asm (".weak\t_" #name "\n" \
".set\t_" #name ",_sys_ni_syscall");

#endif /* __KERNEL__ */
#endif /* _ASM_H8300_UNISTD_H_ */
7 changes: 4 additions & 3 deletions include/asm-i386/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@
#define __NR_tee 315
#define __NR_vmsplice 316

#ifdef __KERNEL__

#define NR_syscalls 317

/*
Expand Down Expand Up @@ -422,7 +424,6 @@ __asm__ volatile ("push %%ebp ; push %%ebx ; movl 4(%2),%%ebp ; " \
__syscall_return(type,__res); \
}

#ifdef __KERNEL__
#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
#define __ARCH_WANT_OLD_STAT
Expand All @@ -446,7 +447,6 @@ __syscall_return(type,__res); \
#define __ARCH_WANT_SYS_SIGPROCMASK
#define __ARCH_WANT_SYS_RT_SIGACTION
#define __ARCH_WANT_SYS_RT_SIGSUSPEND
#endif

#ifdef __KERNEL_SYSCALLS__

Expand Down Expand Up @@ -485,7 +485,7 @@ asmlinkage long sys_rt_sigaction(int sig,
struct sigaction __user *oact,
size_t sigsetsize);

#endif
#endif /* __KERNEL_SYSCALLS__ */

/*
* "Conditional" syscalls
Expand All @@ -497,4 +497,5 @@ asmlinkage long sys_rt_sigaction(int sig,
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
#endif

#endif /* __KERNEL__ */
#endif /* _ASM_I386_UNISTD_H_ */
5 changes: 3 additions & 2 deletions include/asm-m32r/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@
#define __NR_kexec_load 283
#define __NR_waitid 284

#ifdef __KERNEL__

#define NR_syscalls 285

/* user-visible error numbers are in the range -1 - -124: see
Expand Down Expand Up @@ -405,7 +407,6 @@ __asm__ __volatile__ (\
__syscall_return(type,__res); \
}

#ifdef __KERNEL__
#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_STAT64
#define __ARCH_WANT_SYS_ALARM
Expand All @@ -421,7 +422,6 @@ __syscall_return(type,__res); \
#define __ARCH_WANT_SYS_OLD_GETRLIMIT /*will be unused*/
#define __ARCH_WANT_SYS_OLDUMOUNT
#define __ARCH_WANT_SYS_RT_SIGACTION
#endif

#ifdef __KERNEL_SYSCALLS__

Expand Down Expand Up @@ -470,4 +470,5 @@ asmlinkage long sys_rt_sigaction(int sig,
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
#endif

#endif /* __KERNEL__ */
#endif /* _ASM_M32R_UNISTD_H */
7 changes: 4 additions & 3 deletions include/asm-m68k/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@
#define __NR_request_key 280
#define __NR_keyctl 281

#ifdef __KERNEL__

#define NR_syscalls 282

/* user-visible error numbers are in the range -1 - -124: see
Expand Down Expand Up @@ -383,7 +385,6 @@ __asm__ __volatile__ ("trap #0" \
__syscall_return(type,__res); \
}

#ifdef __KERNEL__
#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
#define __ARCH_WANT_OLD_STAT
Expand All @@ -406,7 +407,6 @@ __syscall_return(type,__res); \
#define __ARCH_WANT_SYS_SIGPENDING
#define __ARCH_WANT_SYS_SIGPROCMASK
#define __ARCH_WANT_SYS_RT_SIGACTION
#endif

#ifdef __KERNEL_SYSCALLS__

Expand Down Expand Up @@ -451,7 +451,7 @@ asmlinkage long sys_rt_sigaction(int sig,
struct sigaction __user *oact,
size_t sigsetsize);

#endif
#endif /* __KERNEL_SYSCALLS__ */

/*
* "Conditional" syscalls
Expand All @@ -461,4 +461,5 @@ asmlinkage long sys_rt_sigaction(int sig,
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")

#endif /* __KERNEL__ */
#endif /* _ASM_M68K_UNISTD_H_ */
7 changes: 4 additions & 3 deletions include/asm-m68knommu/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@
#define __NR_request_key 280
#define __NR_keyctl 281

#ifdef __KERNEL__

#define NR_syscalls 282

/* user-visible error numbers are in the range -1 - -122: see
Expand Down Expand Up @@ -437,7 +439,6 @@ type name(atype a, btype b, ctype c, dtype d, etype e) \
return (type)__res; \
}

#ifdef __KERNEL__
#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
#define __ARCH_WANT_OLD_STAT
Expand All @@ -460,7 +461,6 @@ type name(atype a, btype b, ctype c, dtype d, etype e) \
#define __ARCH_WANT_SYS_SIGPENDING
#define __ARCH_WANT_SYS_SIGPROCMASK
#define __ARCH_WANT_SYS_RT_SIGACTION
#endif

#ifdef __KERNEL_SYSCALLS__

Expand Down Expand Up @@ -515,7 +515,7 @@ asmlinkage long sys_rt_sigaction(int sig,
struct sigaction __user *oact,
size_t sigsetsize);

#endif
#endif /* __KERNEL_SYSCALLS__ */

/*
* "Conditional" syscalls
Expand All @@ -525,4 +525,5 @@ asmlinkage long sys_rt_sigaction(int sig,
*/
#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")

#endif /* __KERNEL__ */
#endif /* _ASM_M68K_UNISTD_H_ */
Loading

0 comments on commit 5614253

Please sign in to comment.