summaryrefslogtreecommitdiff
path: root/libc/sysdeps
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-01-23 19:25:12 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-01-23 19:25:12 +0000
commitbfa91a43d6f8a58aa9db375ed0a6209293e9f312 (patch)
treebbc7fa087f78143ef291e1e2fb973755585921ff /libc/sysdeps
parent60155d4649bde150591fb8ce3c6b0260739ad05c (diff)
Make i386 build w/ -std=c99 (almost)
Diffstat (limited to 'libc/sysdeps')
-rw-r--r--libc/sysdeps/linux/i386/__syscall_error.c6
-rw-r--r--libc/sysdeps/linux/i386/bits/syscalls.h4
-rw-r--r--libc/sysdeps/linux/i386/brk.c2
-rw-r--r--libc/sysdeps/linux/i386/sigaction.c12
4 files changed, 12 insertions, 12 deletions
diff --git a/libc/sysdeps/linux/i386/__syscall_error.c b/libc/sysdeps/linux/i386/__syscall_error.c
index 98240da3e..d96d20c0f 100644
--- a/libc/sysdeps/linux/i386/__syscall_error.c
+++ b/libc/sysdeps/linux/i386/__syscall_error.c
@@ -27,9 +27,9 @@
int attribute_hidden __syscall_error(void)
{
- register int edx asm("%edx");
- asm("mov %eax, %edx");
- asm("negl %edx");
+ register int edx __asm__("%edx");
+ __asm__("mov %eax, %edx");
+ __asm__("negl %edx");
__set_errno(edx);
return -1;
}
diff --git a/libc/sysdeps/linux/i386/bits/syscalls.h b/libc/sysdeps/linux/i386/bits/syscalls.h
index 6ad3b1dd9..a69c4a669 100644
--- a/libc/sysdeps/linux/i386/bits/syscalls.h
+++ b/libc/sysdeps/linux/i386/bits/syscalls.h
@@ -20,7 +20,7 @@
/* We need some help from the assembler to generate optimal code. We
define some macros here which later will be used. */
-asm (".L__X'%ebx = 1\n\t"
+__asm__ (".L__X'%ebx = 1\n\t"
".L__X'%ecx = 2\n\t"
".L__X'%edx = 2\n\t"
".L__X'%eax = 3\n\t"
@@ -112,7 +112,7 @@ return (type) (INLINE_SYSCALL(name, 6, arg1, arg2, arg3, arg4, arg5, arg6)); \
#define INLINE_SYSCALL(name, nr, args...) \
({ \
unsigned int resultvar; \
- asm volatile ( \
+ __asm__ __volatile__ ( \
LOADARGS_##nr \
"movl %1, %%eax\n\t" \
"int $0x80\n\t" \
diff --git a/libc/sysdeps/linux/i386/brk.c b/libc/sysdeps/linux/i386/brk.c
index 1b3128f9c..fcf7f3b33 100644
--- a/libc/sysdeps/linux/i386/brk.c
+++ b/libc/sysdeps/linux/i386/brk.c
@@ -30,7 +30,7 @@ int brk (void *addr)
{
void *__unbounded newbrk, *__unbounded scratch;
- asm ("movl %%ebx, %1\n" /* Save %ebx in scratch register. */
+ __asm__ ("movl %%ebx, %1\n" /* Save %ebx in scratch register. */
"movl %3, %%ebx\n" /* Put ADDR in %ebx to be syscall arg. */
"int $0x80 # %2\n" /* Perform the system call. */
"movl %1, %%ebx\n" /* Restore %ebx from scratch register. */
diff --git a/libc/sysdeps/linux/i386/sigaction.c b/libc/sysdeps/linux/i386/sigaction.c
index c550c75d2..cc1d75c6b 100644
--- a/libc/sysdeps/linux/i386/sigaction.c
+++ b/libc/sysdeps/linux/i386/sigaction.c
@@ -31,8 +31,8 @@
#if defined __NR_rt_sigaction
libc_hidden_proto(memcpy)
-extern void restore_rt (void) asm ("__restore_rt") attribute_hidden;
-extern void restore (void) asm ("__restore") attribute_hidden;
+extern void restore_rt (void) __asm__ ("__restore_rt") attribute_hidden;
+extern void restore (void) __asm__ ("__restore") attribute_hidden;
/* If ACT is not NULL, change the action for SIG to *ACT.
If OACT is not NULL, put the old action for SIG in *OACT. */
@@ -74,7 +74,7 @@ int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oa
#else
-extern void restore (void) asm ("__restore") attribute_hidden;
+extern void restore (void) __asm__ ("__restore") attribute_hidden;
/* If ACT is not NULL, change the action for SIG to *ACT.
If OACT is not NULL, put the old action for SIG in *OACT. */
@@ -97,7 +97,7 @@ int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oa
kact.sa_restorer = &restore;
}
- asm volatile ("pushl %%ebx\n"
+ __asm__ __volatile__ ("pushl %%ebx\n"
"movl %2, %%ebx\n"
"int $0x80\n"
"popl %%ebx"
@@ -141,7 +141,7 @@ libc_hidden_def(sigaction)
#define RESTORE(name, syscall) RESTORE2 (name, syscall)
#define RESTORE2(name, syscall) \
-asm \
+__asm__ \
( \
".text\n" \
" .align 16\n" \
@@ -158,7 +158,7 @@ RESTORE (restore_rt, __NR_rt_sigreturn)
/* For the boring old signals. */
# undef RESTORE2
# define RESTORE2(name, syscall) \
-asm \
+__asm__ \
( \
".text\n" \
" .align 8\n" \