diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-02-19 22:12:38 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-02-19 22:12:38 +0000 |
commit | 35f0c737d31abb9c25f1f62892a85db97accc264 (patch) | |
tree | 60746cba6c917454c18e9f7705b1d6e4274f108c /lib/libc/arch/i386/SYS.h | |
parent | 372a7dfd4b95b87ff1af26ce93abe967e20225af (diff) |
We need to keep K&R compat macros for some ports where the assemnbler is
still using -traditional-cpp.
Diffstat (limited to 'lib/libc/arch/i386/SYS.h')
-rw-r--r-- | lib/libc/arch/i386/SYS.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/libc/arch/i386/SYS.h b/lib/libc/arch/i386/SYS.h index 90f6beab34d..5099ef5fdc8 100644 --- a/lib/libc/arch/i386/SYS.h +++ b/lib/libc/arch/i386/SYS.h @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: SYS.h,v 1.10 2002/02/19 19:39:36 millert Exp $ + * $OpenBSD: SYS.h,v 1.11 2002/02/19 22:12:36 millert Exp $ */ #include <machine/asm.h> @@ -51,7 +51,11 @@ #ifdef _THREAD_SAFE /* Use _thread_sys_{syscall} when compiled with -D_THREAD_SAFE */ +#ifdef __STDC__ #define SYSENTRY(x) ENTRY(_thread_sys_ ## x) +#else /* ! __STDC__ */ +#define SYSENTRY(x) ENTRY(_thread_sys_/**/x) +#endif /* ! __STDC__ */ #else /* ! _THREAD_SAFE */ /* Use {syscall} when compiling without -D_THREAD_SAFE */ #define SYSENTRY(x) ENTRY(x) @@ -61,15 +65,28 @@ /* Use both _thread_sys_{syscall} and [weak] {syscall}. */ +#ifdef __STDC__ #define SYSENTRY(x) \ ENTRY(_thread_sys_ ## x) \ .weak _C_LABEL(x); \ _C_LABEL(x) = _C_LABEL(_thread_sys_ ## x) +#else /* ! __STDC__ */ +#define SYSENTRY(x) \ + ENTRY(_thread_sys_/**/x) \ + .weak _C_LABEL(x); \ + _C_LABEL(x) = _C_LABEL(_thread_sys_/**/x) +#endif /* ! __STDC__ */ #endif /* WEAK_ALIASES */ +#ifdef __STDC__ #define __DO_SYSCALL(x) \ movl $(SYS_ ## x),%eax; \ int $0x80 +#else /* ! __STDC__ */ +#define __DO_SYSCALL(x) \ + movl $(SYS_/**/x),%eax; \ + int $0x80 +#endif /* ! __STDC__ */ /* perform a syscall */ #define _SYSCALL_NOERROR(x,y) \ |