about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/ia64/sysdep.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-09-20 00:16:11 +0000
committerUlrich Drepper <drepper@redhat.com>2004-09-20 00:16:11 +0000
commit2edb61e3f955bfcc9dd3cb6b3b1acfe4806234a6 (patch)
treeeb3ba83120d92a0ea9955520f2df4e00a22bc884 /sysdeps/unix/sysv/linux/ia64/sysdep.h
parent29e11320c90722aec6335a5f8d8af84d12ba3c6b (diff)
downloadglibc-2edb61e3f955bfcc9dd3cb6b3b1acfe4806234a6.tar.gz
glibc-2edb61e3f955bfcc9dd3cb6b3b1acfe4806234a6.tar.xz
glibc-2edb61e3f955bfcc9dd3cb6b3b1acfe4806234a6.zip
Update.
	* sysdeps/unix/sysv/linux/setegid.c [HAVE_PTR__NPTL_SETXID]: Call
	callback to set IDs in all other threads as well.
	* sysdeps/unix/sysv/linux/seteuid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/setegid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/seteuid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/setgid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/setuid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise.
	* sysdeps/unix/sysv/linux/setuid.c: New file.
	* sysdeps/unix/sysv/linux/setgid.c: New file.
	* sysdeps/unix/sysv/linux/setreuid.c: New file.
	* sysdeps/unix/sysv/linux/setregid.c: New file.
	* sysdeps/unix/sysv/linux/setresuid.c: New file.
	* sysdeps/unix/sysv/linux/setresgid.c: New file.
	* sysdeps/unix/sysv/linux/i386/sysdep.h: Define INTERNAL_SYSCALL_NCS.
	* sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c: Use x86 version.
	* sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/setresgid.c: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc32/setresuid.c: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: Remove setresgid
	and setresuid.
	* nscd/aicache.c: Use pthread_seteuid_np instead of seteuid.
	* nscd/grpcache.c: Likewise.
	* nscd/hstcache.c: Likewise.
	* nscd/pwdcache.c: Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/ia64/sysdep.h')
-rw-r--r--sysdeps/unix/sysv/linux/ia64/sysdep.h46
1 files changed, 24 insertions, 22 deletions
diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.h b/sysdeps/unix/sysv/linux/ia64/sysdep.h
index 0868ad50ef..0ebfc56fdd 100644
--- a/sysdeps/unix/sysv/linux/ia64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/ia64/sysdep.h
@@ -199,33 +199,33 @@
 
 #ifdef IA64_USE_NEW_STUB
 
-#define DO_INLINE_SYSCALL(name, nr, args...)					\
-    LOAD_ARGS_##nr (args)							\
-    register long _r8 __asm ("r8");						\
-    register long _r10 __asm ("r10");						\
-    register long _r15 __asm ("r15") = __NR_##name;				\
-    register void *_b7 __asm ("b7") = ((tcbhead_t *) __thread_self)->private;	\
-    long _retval;								\
-    LOAD_REGS_##nr								\
-    /*										\
-     * Don't specify any unwind info here.  We mark ar.pfs as			\
-     * clobbered.  This will force the compiler to save ar.pfs			\
-     * somewhere and emit appropriate unwind info for that save.		\
-     */										\
-    __asm __volatile ("br.call.sptk.many b6=%0;;\n"				\
-		      : "=b"(_b7), "=r" (_r8), "=r" (_r10), "=r" (_r15)		\
-			ASM_OUTARGS_##nr					\
-		      : "0" (_b7), "3" (_r15) ASM_ARGS_##nr			\
-		      : "memory", "ar.pfs" ASM_CLOBBERS_##nr);			\
+# define DO_INLINE_SYSCALL(name, nr, args...)				      \
+    LOAD_ARGS_##nr (args)						      \
+    register long _r8 __asm ("r8");					      \
+    register long _r10 __asm ("r10");					      \
+    register long _r15 __asm ("r15") = name;				      \
+    register void *_b7 __asm ("b7") = ((tcbhead_t *) __thread_self)->private; \
+    long _retval;							      \
+    LOAD_REGS_##nr							      \
+    /*									      \
+     * Don't specify any unwind info here.  We mark ar.pfs as		      \
+     * clobbered.  This will force the compiler to save ar.pfs		      \
+     * somewhere and emit appropriate unwind info for that save.	      \
+     */									      \
+    __asm __volatile ("br.call.sptk.many b6=%0;;\n"			      \
+		      : "=b"(_b7), "=r" (_r8), "=r" (_r10), "=r" (_r15)	      \
+			ASM_OUTARGS_##nr				      \
+		      : "0" (_b7), "3" (_r15) ASM_ARGS_##nr		      \
+		      : "memory", "ar.pfs" ASM_CLOBBERS_##nr);		      \
     _retval = _r8;
 
 #else /* !IA64_USE_NEW_STUB */
 
-#define DO_INLINE_SYSCALL(name, nr, args...)			\
+# define DO_INLINE_SYSCALL(name, nr, args...)			\
     LOAD_ARGS_##nr (args)					\
     register long _r8 asm ("r8");				\
     register long _r10 asm ("r10");				\
-    register long _r15 asm ("r15") = __NR_##name;		\
+    register long _r15 asm ("r15") = name;			\
     long _retval;						\
     LOAD_REGS_##nr						\
     __asm __volatile (BREAK_INSN (__BREAK_SYSCALL)		\
@@ -240,7 +240,7 @@
 #undef INLINE_SYSCALL
 #define INLINE_SYSCALL(name, nr, args...)	\
   ({						\
-    DO_INLINE_SYSCALL(name, nr, args)		\
+    DO_INLINE_SYSCALL(__NR_##name, nr, args)	\
     if (_r10 == -1)				\
       {						\
 	__set_errno (_retval);			\
@@ -252,11 +252,13 @@
 #define INTERNAL_SYSCALL_DECL(err) long int err
 
 #undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err, nr, args...)	\
+#define INTERNAL_SYSCALL_NCS(name, err, nr, args...)	\
   ({							\
     DO_INLINE_SYSCALL(name, nr, args)			\
     err = _r10;						\
     _retval; })
+#define INTERNAL_SYSCALL(name, err, nr, args...)	\
+  INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args)
 
 #undef INTERNAL_SYSCALL_ERROR_P
 #define INTERNAL_SYSCALL_ERROR_P(val, err)	(err == -1)