summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrofl0r <retnyg@gmx.net>2014-01-07 16:49:23 +0100
committerrofl0r <retnyg@gmx.net>2014-02-22 12:24:35 +0100
commit5cc1d920ba21e9f7672438e86fa11a0db52e23ea (patch)
tree950ab3ff18bc8de48326052a0d1c885645d826ac /src
parentbf84967cae9a5ef5582f9bbf5a097fb083126e33 (diff)
downloadmusl-5cc1d920ba21e9f7672438e86fa11a0db52e23ea.tar.gz
musl-5cc1d920ba21e9f7672438e86fa11a0db52e23ea.tar.bz2
musl-5cc1d920ba21e9f7672438e86fa11a0db52e23ea.tar.xz
musl-5cc1d920ba21e9f7672438e86fa11a0db52e23ea.zip
internal/syscall.h: add syscall_arg_t macro
some 32-on-64 archs require that the actual syscall args be long long. in that case syscall_arch.h can define syscall_arg_t to whatever it needs and syscall.h picks it up. all other archs just use long as usual.
Diffstat (limited to 'src')
-rw-r--r--src/internal/syscall.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/internal/syscall.h b/src/internal/syscall.h
index f8d425af..b203d6bb 100644
--- a/src/internal/syscall.h
+++ b/src/internal/syscall.h
@@ -1,12 +1,6 @@
#ifndef _INTERNAL_SYSCALL_H
#define _INTERNAL_SYSCALL_H
-#if defined(__PIC__) && (100*__GNUC__+__GNUC_MINOR__ >= 303)
-__attribute__((visibility("protected")))
-#endif
-long __syscall_ret(unsigned long), __syscall(long, ...),
- __syscall_cp(long, long, long, long, long, long, long);
-
#include <sys/syscall.h>
#include "syscall_arch.h"
@@ -14,6 +8,17 @@ long __syscall_ret(unsigned long), __syscall(long, ...),
#define __scc(X) (long) (X)
#endif
+#ifndef syscall_arg_t
+#define syscall_arg_t long
+#endif
+
+#if defined(__PIC__) && (100*__GNUC__+__GNUC_MINOR__ >= 303)
+__attribute__((visibility("protected")))
+#endif
+long __syscall_ret(unsigned long), __syscall(syscall_arg_t, ...),
+ __syscall_cp(syscall_arg_t, syscall_arg_t, syscall_arg_t, syscall_arg_t,
+ syscall_arg_t, syscall_arg_t, syscall_arg_t);
+
#define __syscall1(n,a) __syscall1(n,__scc(a))
#define __syscall2(n,a,b) __syscall2(n,__scc(a),__scc(b))
#define __syscall3(n,a,b,c) __syscall3(n,__scc(a),__scc(b),__scc(c))