diff options
-rw-r--r-- | include/ctype.h | 2 | ||||
-rw-r--r-- | include/elf.h | 10 | ||||
-rw-r--r-- | include/libc-symbols.h | 2 | ||||
-rw-r--r-- | include/protocols/timed.h | 2 | ||||
-rw-r--r-- | include/resolv.h | 2 | ||||
-rw-r--r-- | include/rpc/auth.h | 2 | ||||
-rw-r--r-- | include/sys/file.h | 2 | ||||
-rw-r--r-- | include/sys/queue.h | 10 | ||||
-rw-r--r-- | include/sys/time.h | 6 | ||||
-rw-r--r-- | include/sys/ttydefaults.h | 6 | ||||
-rw-r--r-- | include/sys/types.h | 2 | ||||
-rw-r--r-- | include/tgmath.h | 8 | ||||
-rw-r--r-- | include/ttyent.h | 2 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/bits/getopt.h | 2 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/bits/ioctls.h | 8 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/bits/shm.h | 4 | ||||
-rw-r--r-- | libc/sysdeps/linux/i386/bits/atomic.h | 42 | ||||
-rw-r--r-- | libc/sysdeps/linux/i386/bits/byteswap.h | 4 | ||||
-rw-r--r-- | libc/sysdeps/linux/powerpc/bits/atomic.h | 14 | ||||
-rw-r--r-- | libc/sysdeps/linux/x86_64/bits/atomic.h | 50 | ||||
-rw-r--r-- | libpthread/linuxthreads.old/semaphore.h | 2 |
21 files changed, 91 insertions, 91 deletions
diff --git a/include/ctype.h b/include/ctype.h index e1aea86a2..19d9f35f5 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -1,5 +1,5 @@ /* Copyright (C) 1991,92,93,95,96,97,98,99,2001,02 - Free Software Foundation, Inc. + Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/include/elf.h b/include/elf.h index 9f00970bf..53fda0140 100644 --- a/include/elf.h +++ b/include/elf.h @@ -2968,18 +2968,18 @@ typedef Elf32_Addr Elf32_Conflict; #define R_NIOS2_PCREL16 3 #define R_NIOS2_CALL26 4 #define R_NIOS2_IMM5 5 -#define R_NIOS2_CACHE_OPX 6 +#define R_NIOS2_CACHE_OPX 6 #define R_NIOS2_IMM6 7 #define R_NIOS2_IMM8 8 #define R_NIOS2_HI16 9 #define R_NIOS2_LO16 10 -#define R_NIOS2_HIADJ16 11 +#define R_NIOS2_HIADJ16 11 #define R_NIOS2_BFD_RELOC_32 12 #define R_NIOS2_BFD_RELOC_16 13 -#define R_NIOS2_BFD_RELOC_8 14 +#define R_NIOS2_BFD_RELOC_8 14 #define R_NIOS2_GPREL 15 -#define R_NIOS2_GNU_VTINHERIT 16 -#define R_NIOS2_GNU_VTENTRY 17 +#define R_NIOS2_GNU_VTINHERIT 16 +#define R_NIOS2_GNU_VTENTRY 17 #define R_NIOS2_UJMP 18 #define R_NIOS2_CJMP 19 #define R_NIOS2_CALLR 20 diff --git a/include/libc-symbols.h b/include/libc-symbols.h index 0234d8642..85a2db7df 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -483,7 +483,7 @@ FIXME! - ? # ifdef HAVE_ASM_SET_DIRECTIVE # ifdef HAVE_ASM_GLOBAL_DOT_NAME # define _hidden_strong_alias(original, alias) \ - ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(alias) ASM_LINE_SEP \ + ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(alias) ASM_LINE_SEP \ .hidden C_SYMBOL_NAME(alias) ASM_LINE_SEP \ .set C_SYMBOL_NAME(alias),C_SYMBOL_NAME(original) ASM_LINE_SEP \ ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME(alias) ASM_LINE_SEP \ diff --git a/include/protocols/timed.h b/include/protocols/timed.h index 4345bed47..da31f69b3 100644 --- a/include/protocols/timed.h +++ b/include/protocols/timed.h @@ -39,7 +39,7 @@ */ #define TSPVERSION 1 -#define ANYADDR NULL +#define ANYADDR NULL struct tsp { u_char tsp_type; diff --git a/include/resolv.h b/include/resolv.h index ee204dbe3..fc2fa9b99 100644 --- a/include/resolv.h +++ b/include/resolv.h @@ -115,7 +115,7 @@ typedef res_sendhookact (*res_send_rhook) (const struct sockaddr_in *ns, */ struct __res_state { #ifdef __UCLIBC_HAS_COMPAT_RES_STATE__ - int retrans; /* retransmission time interval */ + int retrans; /* retransmission time interval */ int retry; /* number of times to retransmit */ #endif u_int32_t options; /* (was: ulong) option flags - see below. */ diff --git a/include/rpc/auth.h b/include/rpc/auth.h index 15126c166..e8390c885 100644 --- a/include/rpc/auth.h +++ b/include/rpc/auth.h @@ -113,7 +113,7 @@ struct AUTH { int (*ah_validate) (AUTH *, struct opaque_auth *); /* validate verifier */ int (*ah_refresh) (AUTH *); /* refresh credentials */ - void (*ah_destroy) (AUTH *); /* destroy this structure */ + void (*ah_destroy) (AUTH *); /* destroy this structure */ } *ah_ops; caddr_t ah_private; }; diff --git a/include/sys/file.h b/include/sys/file.h index 93b36350a..3b8dbc9c0 100644 --- a/include/sys/file.h +++ b/include/sys/file.h @@ -39,7 +39,7 @@ __BEGIN_DECLS /* Operations for the `flock' call. */ #define LOCK_SH 1 /* Shared lock. */ -#define LOCK_EX 2 /* Exclusive lock. */ +#define LOCK_EX 2 /* Exclusive lock. */ #define LOCK_UN 8 /* Unlock. */ /* Can be OR'd in to one of the above. */ diff --git a/include/sys/queue.h b/include/sys/queue.h index d62afcc84..0ea0c11fc 100644 --- a/include/sys/queue.h +++ b/include/sys/queue.h @@ -333,7 +333,7 @@ struct { \ if (LIST_NEXT((elm), field) != NULL && \ LIST_NEXT((elm), field)->field.le_prev != \ &((elm)->field.le_next)) \ - panic("Bad link elm %p next->prev != elm", (elm)); \ + panic("Bad link elm %p next->prev != elm", (elm)); \ } while (0) #define QMD_LIST_CHECK_PREV(elm, field) do { \ @@ -395,7 +395,7 @@ struct { \ QMD_LIST_CHECK_NEXT(elm, field); \ QMD_LIST_CHECK_PREV(elm, field); \ if (LIST_NEXT((elm), field) != NULL) \ - LIST_NEXT((elm), field)->field.le_prev = \ + LIST_NEXT((elm), field)->field.le_prev = \ (elm)->field.le_prev; \ *(elm)->field.le_prev = LIST_NEXT((elm), field); \ TRASHIT((elm)->field.le_next); \ @@ -435,7 +435,7 @@ struct { \ #define QMD_TAILQ_CHECK_TAIL(head, field) do { \ if (*(head)->tqh_last != NULL) \ - panic("Bad tailq NEXT(%p->tqh_last) != NULL", (head)); \ + panic("Bad tailq NEXT(%p->tqh_last) != NULL", (head)); \ } while (0) #define QMD_TAILQ_CHECK_NEXT(elm, field) do { \ @@ -500,7 +500,7 @@ struct { \ #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ QMD_TAILQ_CHECK_NEXT(listelm, field); \ if ((TAILQ_NEXT((elm), field) = TAILQ_NEXT((listelm), field)) != NULL)\ - TAILQ_NEXT((elm), field)->field.tqe_prev = \ + TAILQ_NEXT((elm), field)->field.tqe_prev = \ &TAILQ_NEXT((elm), field); \ else { \ (head)->tqh_last = &TAILQ_NEXT((elm), field); \ @@ -557,7 +557,7 @@ struct { \ QMD_TAILQ_CHECK_NEXT(elm, field); \ QMD_TAILQ_CHECK_PREV(elm, field); \ if ((TAILQ_NEXT((elm), field)) != NULL) \ - TAILQ_NEXT((elm), field)->field.tqe_prev = \ + TAILQ_NEXT((elm), field)->field.tqe_prev = \ (elm)->field.tqe_prev; \ else { \ (head)->tqh_last = (elm)->field.tqe_prev; \ diff --git a/include/sys/time.h b/include/sys/time.h index 46b9b5667..1dfe4f36e 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -166,9 +166,9 @@ extern int futimesat (int __fd, __const char *__file, NOTE: `timercmp' does not work for >= or <=. */ # define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) # define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) -# define timercmp(a, b, CMP) \ - (((a)->tv_sec == (b)->tv_sec) ? \ - ((a)->tv_usec CMP (b)->tv_usec) : \ +# define timercmp(a, b, CMP) \ + (((a)->tv_sec == (b)->tv_sec) ? \ + ((a)->tv_usec CMP (b)->tv_usec) : \ ((a)->tv_sec CMP (b)->tv_sec)) # define timeradd(a, b, result) \ do { \ diff --git a/include/sys/ttydefaults.h b/include/sys/ttydefaults.h index 9be168b83..bb605a458 100644 --- a/include/sys/ttydefaults.h +++ b/include/sys/ttydefaults.h @@ -75,9 +75,9 @@ #define CSTART CTRL('q') #define CSTOP CTRL('s') #define CLNEXT CTRL('v') -#define CDISCARD CTRL('o') -#define CWERASE CTRL('w') -#define CREPRINT CTRL('r') +#define CDISCARD CTRL('o') +#define CWERASE CTRL('w') +#define CREPRINT CTRL('r') #define CEOT CEOF /* compat */ #define CBRK CEOL diff --git a/include/sys/types.h b/include/sys/types.h index 8c0b5dce3..7e29dc832 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -1,5 +1,5 @@ /* Copyright (C) 1991,1992,1994,1995,1996,1997,1998,1999,2000,2001,2002 - Free Software Foundation, Inc. + Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/include/tgmath.h b/include/tgmath.h index b3a546d17..2897697b6 100644 --- a/include/tgmath.h +++ b/include/tgmath.h @@ -70,7 +70,7 @@ __tgmres = Fct (Val); \ else if (sizeof (Val) == sizeof (float)) \ __tgmres = Fct##f (Val); \ - else \ + else \ __tgmres = __tgml(Fct) (Val); \ __tgmres; })) @@ -81,7 +81,7 @@ __tgmres = Fct (Val1, Val2); \ else if (sizeof (Val1) == sizeof (float)) \ __tgmres = Fct##f (Val1, Val2); \ - else \ + else \ __tgmres = __tgml(Fct) (Val1, Val2); \ __tgmres; })) @@ -155,7 +155,7 @@ else \ __tgmres = Cfct (Val); \ } \ - else \ + else \ { \ if (sizeof (__real__ (Val)) == sizeof (Val)) \ __tgmres = Fct##f (Val); \ @@ -173,7 +173,7 @@ __tgmres = Fct (Val); \ else if (sizeof (Val) == sizeof (__complex__ float)) \ __tgmres = Fct##f (Val); \ - else \ + else \ __tgmres = __tgml(Fct) (Val); \ __tgmres; })) diff --git a/include/ttyent.h b/include/ttyent.h index ae2082354..3166e83b2 100644 --- a/include/ttyent.h +++ b/include/ttyent.h @@ -48,7 +48,7 @@ struct ttyent { #define TTY_ON 0x01 /* enable logins (start ty_getty program) */ #define TTY_SECURE 0x02 /* allow uid of 0 to login */ int ty_status; /* status flags */ - char *ty_window; /* command to start up window manager */ + char *ty_window; /* command to start up window manager */ char *ty_comment; /* comment field */ }; diff --git a/libc/sysdeps/linux/common/bits/getopt.h b/libc/sysdeps/linux/common/bits/getopt.h index 0307757a6..89bd33238 100644 --- a/libc/sysdeps/linux/common/bits/getopt.h +++ b/libc/sysdeps/linux/common/bits/getopt.h @@ -92,7 +92,7 @@ extern int optopt; The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, - optional_argument (or 2) if the option takes an optional argument. + optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but diff --git a/libc/sysdeps/linux/common/bits/ioctls.h b/libc/sysdeps/linux/common/bits/ioctls.h index 11bb4c485..268c0e486 100644 --- a/libc/sysdeps/linux/common/bits/ioctls.h +++ b/libc/sysdeps/linux/common/bits/ioctls.h @@ -49,7 +49,7 @@ #define SIOCGIFMTU 0x8921 /* get MTU size */ #define SIOCSIFMTU 0x8922 /* set MTU size */ #define SIOCSIFNAME 0x8923 /* set interface name */ -#define SIOCSIFHWADDR 0x8924 /* set hardware address */ +#define SIOCSIFHWADDR 0x8924 /* set hardware address */ #define SIOCGIFENCAP 0x8925 /* get/set encapsulations */ #define SIOCSIFENCAP 0x8926 #define SIOCGIFHWADDR 0x8927 /* Get hardware address */ @@ -66,10 +66,10 @@ #define SIOCGIFCOUNT 0x8938 /* get number of devices */ #define SIOCGIFBR 0x8940 /* Bridging support */ -#define SIOCSIFBR 0x8941 /* Set bridging options */ +#define SIOCSIFBR 0x8941 /* Set bridging options */ #define SIOCGIFTXQLEN 0x8942 /* Get the tx queue length */ -#define SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */ +#define SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */ /* ARP cache control calls. */ @@ -100,7 +100,7 @@ names as their own. Because these are device dependent it is a good idea _NOT_ to issue them to random objects and hope. */ -#define SIOCDEVPRIVATE 0x89F0 /* to 89FF */ +#define SIOCDEVPRIVATE 0x89F0 /* to 89FF */ /* * These 16 ioctl calls are protocol private diff --git a/libc/sysdeps/linux/common/bits/shm.h b/libc/sysdeps/linux/common/bits/shm.h index 318d601ae..87ccd0fc5 100644 --- a/libc/sysdeps/linux/common/bits/shm.h +++ b/libc/sysdeps/linux/common/bits/shm.h @@ -66,8 +66,8 @@ struct shmid_ds #ifdef __USE_MISC /* ipcs ctl commands */ -# define SHM_STAT 13 -# define SHM_INFO 14 +# define SHM_STAT 13 +# define SHM_INFO 14 /* shm_mode upper byte flags */ # define SHM_DEST 01000 /* segment will be destroyed on last detach */ diff --git a/libc/sysdeps/linux/i386/bits/atomic.h b/libc/sysdeps/linux/i386/bits/atomic.h index a20f424f8..c838978a9 100644 --- a/libc/sysdeps/linux/i386/bits/atomic.h +++ b/libc/sysdeps/linux/i386/bits/atomic.h @@ -60,21 +60,21 @@ typedef uintmax_t uatomic_max_t; #define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ ({ __typeof (*mem) ret; \ - __asm__ __volatile__ (LOCK_PREFIX "cmpxchgb %b2, %1" \ + __asm__ __volatile__ (LOCK_PREFIX "cmpxchgb %b2, %1" \ : "=a" (ret), "=m" (*mem) \ : "q" (newval), "m" (*mem), "0" (oldval)); \ ret; }) #define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ ({ __typeof (*mem) ret; \ - __asm__ __volatile__ (LOCK_PREFIX "cmpxchgw %w2, %1" \ + __asm__ __volatile__ (LOCK_PREFIX "cmpxchgw %w2, %1" \ : "=a" (ret), "=m" (*mem) \ : "r" (newval), "m" (*mem), "0" (oldval)); \ ret; }) #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ ({ __typeof (*mem) ret; \ - __asm__ __volatile__ (LOCK_PREFIX "cmpxchgl %2, %1" \ + __asm__ __volatile__ (LOCK_PREFIX "cmpxchgl %2, %1" \ : "=a" (ret), "=m" (*mem) \ : "r" (newval), "m" (*mem), "0" (oldval)); \ ret; }) @@ -92,7 +92,7 @@ typedef uintmax_t uatomic_max_t; # ifdef __PIC__ # define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ ({ __typeof (*mem) ret; \ - __asm__ __volatile__ ("xchgl %2, %%ebx\n\t" \ + __asm__ __volatile__ ("xchgl %2, %%ebx\n\t" \ LOCK_PREFIX "cmpxchg8b %1\n\t" \ "xchgl %2, %%ebx" \ : "=A" (ret), "=m" (*mem) \ @@ -131,7 +131,7 @@ typedef uintmax_t uatomic_max_t; : "=r" (result), "=m" (*mem) \ : "0" (newvalue), "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm__ __volatile__ ("xchgl %0, %1" \ + __asm__ __volatile__ ("xchgl %0, %1" \ : "=r" (result), "=m" (*mem) \ : "0" (newvalue), "m" (*mem)); \ else \ @@ -146,11 +146,11 @@ typedef uintmax_t uatomic_max_t; ({ __typeof (*mem) __result; \ __typeof (value) __addval = (value); \ if (sizeof (*mem) == 1) \ - __asm__ __volatile__ (LOCK_PREFIX "xaddb %b0, %1" \ + __asm__ __volatile__ (LOCK_PREFIX "xaddb %b0, %1" \ : "=r" (__result), "=m" (*mem) \ : "0" (__addval), "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm__ __volatile__ (LOCK_PREFIX "xaddw %w0, %1" \ + __asm__ __volatile__ (LOCK_PREFIX "xaddw %w0, %1" \ : "=r" (__result), "=m" (*mem) \ : "0" (__addval), "m" (*mem)); \ else if (sizeof (*mem) == 4) \ @@ -204,11 +204,11 @@ typedef uintmax_t uatomic_max_t; #define atomic_add_negative(mem, value) \ ({ unsigned char __result; \ if (sizeof (*mem) == 1) \ - __asm__ __volatile__ (LOCK_PREFIX "addb %b2, %0; sets %1" \ + __asm__ __volatile__ (LOCK_PREFIX "addb %b2, %0; sets %1" \ : "=m" (*mem), "=qm" (__result) \ : "iq" (value), "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm__ __volatile__ (LOCK_PREFIX "addw %w2, %0; sets %1" \ + __asm__ __volatile__ (LOCK_PREFIX "addw %w2, %0; sets %1" \ : "=m" (*mem), "=qm" (__result) \ : "ir" (value), "m" (*mem)); \ else if (sizeof (*mem) == 4) \ @@ -223,11 +223,11 @@ typedef uintmax_t uatomic_max_t; #define atomic_add_zero(mem, value) \ ({ unsigned char __result; \ if (sizeof (*mem) == 1) \ - __asm__ __volatile__ (LOCK_PREFIX "addb %b2, %0; setz %1" \ + __asm__ __volatile__ (LOCK_PREFIX "addb %b2, %0; setz %1" \ : "=m" (*mem), "=qm" (__result) \ : "ir" (value), "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm__ __volatile__ (LOCK_PREFIX "addw %w2, %0; setz %1" \ + __asm__ __volatile__ (LOCK_PREFIX "addw %w2, %0; setz %1" \ : "=m" (*mem), "=qm" (__result) \ : "ir" (value), "m" (*mem)); \ else if (sizeof (*mem) == 4) \ @@ -241,15 +241,15 @@ typedef uintmax_t uatomic_max_t; #define atomic_increment(mem) \ (void) ({ if (sizeof (*mem) == 1) \ - __asm__ __volatile__ (LOCK_PREFIX "incb %b0" \ + __asm__ __volatile__ (LOCK_PREFIX "incb %b0" \ : "=m" (*mem) \ : "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm__ __volatile__ (LOCK_PREFIX "incw %w0" \ + __asm__ __volatile__ (LOCK_PREFIX "incw %w0" \ : "=m" (*mem) \ : "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm__ __volatile__ (LOCK_PREFIX "incl %0" \ + __asm__ __volatile__ (LOCK_PREFIX "incl %0" \ : "=m" (*mem) \ : "m" (*mem)); \ else \ @@ -276,7 +276,7 @@ typedef uintmax_t uatomic_max_t; : "=m" (*mem), "=qm" (__result) \ : "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm__ __volatile__ (LOCK_PREFIX "incl %0; sete %1" \ + __asm__ __volatile__ (LOCK_PREFIX "incl %0; sete %1" \ : "=m" (*mem), "=qm" (__result) \ : "m" (*mem)); \ else \ @@ -286,15 +286,15 @@ typedef uintmax_t uatomic_max_t; #define atomic_decrement(mem) \ (void) ({ if (sizeof (*mem) == 1) \ - __asm__ __volatile__ (LOCK_PREFIX "decb %b0" \ + __asm__ __volatile__ (LOCK_PREFIX "decb %b0" \ : "=m" (*mem) \ : "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm__ __volatile__ (LOCK_PREFIX "decw %w0" \ + __asm__ __volatile__ (LOCK_PREFIX "decw %w0" \ : "=m" (*mem) \ : "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm__ __volatile__ (LOCK_PREFIX "decl %0" \ + __asm__ __volatile__ (LOCK_PREFIX "decl %0" \ : "=m" (*mem) \ : "m" (*mem)); \ else \ @@ -305,7 +305,7 @@ typedef uintmax_t uatomic_max_t; do \ __tmpval = __oldval; \ while ((__oldval = __arch_compare_and_exchange_val_64_acq \ - (__memp, __oldval - 1, __oldval)) == __tmpval); \ + (__memp, __oldval - 1, __oldval)) == __tmpval); \ } \ }) @@ -321,7 +321,7 @@ typedef uintmax_t uatomic_max_t; : "=m" (*mem), "=qm" (__result) \ : "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm__ __volatile__ (LOCK_PREFIX "decl %0; sete %1" \ + __asm__ __volatile__ (LOCK_PREFIX "decl %0; sete %1" \ : "=m" (*mem), "=qm" (__result) \ : "m" (*mem)); \ else \ @@ -361,7 +361,7 @@ typedef uintmax_t uatomic_max_t; __asm__ __volatile__ (LOCK_PREFIX "btsl %3, %1; setc %0" \ : "=q" (__result), "=m" (*mem) \ : "m" (*mem), "ir" (bit)); \ - else \ + else \ abort (); \ __result; }) diff --git a/libc/sysdeps/linux/i386/bits/byteswap.h b/libc/sysdeps/linux/i386/bits/byteswap.h index 33af20888..32b21920d 100644 --- a/libc/sysdeps/linux/i386/bits/byteswap.h +++ b/libc/sysdeps/linux/i386/bits/byteswap.h @@ -38,8 +38,8 @@ else \ __asm__ ("rorw $8, %w0" \ : "=r" (__v) \ - : "0" (__x) \ - : "cc"); \ + : "0" (__x) \ + : "cc"); \ __v; })) # else /* This is better than nothing. */ diff --git a/libc/sysdeps/linux/powerpc/bits/atomic.h b/libc/sysdeps/linux/powerpc/bits/atomic.h index d8a4ed33e..1088d2f3c 100644 --- a/libc/sysdeps/linux/powerpc/bits/atomic.h +++ b/libc/sysdeps/linux/powerpc/bits/atomic.h @@ -512,7 +512,7 @@ typedef uintmax_t uatomic_max_t; __result = __arch_compare_and_exchange_val_32_acq(mem, newval, oldval); \ else if (sizeof (*mem) == 8) \ __result = __arch_compare_and_exchange_val_64_acq(mem, newval, oldval); \ - else \ + else \ abort (); \ __result; \ }) @@ -524,7 +524,7 @@ typedef uintmax_t uatomic_max_t; __result = __arch_compare_and_exchange_val_32_rel(mem, newval, oldval); \ else if (sizeof (*mem) == 8) \ __result = __arch_compare_and_exchange_val_64_rel(mem, newval, oldval); \ - else \ + else \ abort (); \ __result; \ }) @@ -536,7 +536,7 @@ typedef uintmax_t uatomic_max_t; __result = __arch_atomic_exchange_32_acq (mem, value); \ else if (sizeof (*mem) == 8) \ __result = __arch_atomic_exchange_64_acq (mem, value); \ - else \ + else \ abort (); \ __result; \ }) @@ -548,7 +548,7 @@ typedef uintmax_t uatomic_max_t; __result = __arch_atomic_exchange_32_rel (mem, value); \ else if (sizeof (*mem) == 8) \ __result = __arch_atomic_exchange_64_rel (mem, value); \ - else \ + else \ abort (); \ __result; \ }) @@ -560,7 +560,7 @@ typedef uintmax_t uatomic_max_t; __result = __arch_atomic_exchange_and_add_32 (mem, value); \ else if (sizeof (*mem) == 8) \ __result = __arch_atomic_exchange_and_add_64 (mem, value); \ - else \ + else \ abort (); \ __result; \ }) @@ -572,7 +572,7 @@ typedef uintmax_t uatomic_max_t; __result = __arch_atomic_increment_val_32 (mem); \ else if (sizeof (*(mem)) == 8) \ __result = __arch_atomic_increment_val_64 (mem); \ - else \ + else \ abort (); \ __result; \ }) @@ -586,7 +586,7 @@ typedef uintmax_t uatomic_max_t; __result = __arch_atomic_decrement_val_32 (mem); \ else if (sizeof (*(mem)) == 8) \ __result = __arch_atomic_decrement_val_64 (mem); \ - else \ + else \ abort (); \ __result; \ }) diff --git a/libc/sysdeps/linux/x86_64/bits/atomic.h b/libc/sysdeps/linux/x86_64/bits/atomic.h index 04870cbf5..6739afa43 100644 --- a/libc/sysdeps/linux/x86_64/bits/atomic.h +++ b/libc/sysdeps/linux/x86_64/bits/atomic.h @@ -57,28 +57,28 @@ typedef uintmax_t uatomic_max_t; #define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ ({ __typeof (*mem) ret; \ - __asm__ __volatile__ (LOCK_PREFIX "cmpxchgb %b2, %1" \ + __asm__ __volatile__ (LOCK_PREFIX "cmpxchgb %b2, %1" \ : "=a" (ret), "=m" (*mem) \ : "q" (newval), "m" (*mem), "0" (oldval)); \ ret; }) #define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ ({ __typeof (*mem) ret; \ - __asm__ __volatile__ (LOCK_PREFIX "cmpxchgw %w2, %1" \ + __asm__ __volatile__ (LOCK_PREFIX "cmpxchgw %w2, %1" \ : "=a" (ret), "=m" (*mem) \ : "r" (newval), "m" (*mem), "0" (oldval)); \ ret; }) #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ ({ __typeof (*mem) ret; \ - __asm__ __volatile__ (LOCK_PREFIX "cmpxchgl %2, %1" \ + __asm__ __volatile__ (LOCK_PREFIX "cmpxchgl %2, %1" \ : "=a" (ret), "=m" (*mem) \ : "r" (newval), "m" (*mem), "0" (oldval)); \ ret; }) #define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ ({ __typeof (*mem) ret; \ - __asm__ __volatile__ (LOCK_PREFIX "cmpxchgq %q2, %1" \ + __asm__ __volatile__ (LOCK_PREFIX "cmpxchgq %q2, %1" \ : "=a" (ret), "=m" (*mem) \ : "r" ((long) (newval)), "m" (*mem), \ "0" ((long) (oldval))); \ @@ -97,7 +97,7 @@ typedef uintmax_t uatomic_max_t; : "=r" (result), "=m" (*mem) \ : "0" (newvalue), "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm__ __volatile__ ("xchgl %0, %1" \ + __asm__ __volatile__ ("xchgl %0, %1" \ : "=r" (result), "=m" (*mem) \ : "0" (newvalue), "m" (*mem)); \ else \ @@ -110,11 +110,11 @@ typedef uintmax_t uatomic_max_t; #define atomic_exchange_and_add(mem, value) \ ({ __typeof (*mem) result; \ if (sizeof (*mem) == 1) \ - __asm__ __volatile__ (LOCK_PREFIX "xaddb %b0, %1" \ + __asm__ __volatile__ (LOCK_PREFIX "xaddb %b0, %1" \ : "=r" (result), "=m" (*mem) \ : "0" (value), "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm__ __volatile__ (LOCK_PREFIX "xaddw %w0, %1" \ + __asm__ __volatile__ (LOCK_PREFIX "xaddw %w0, %1" \ : "=r" (result), "=m" (*mem) \ : "0" (value), "m" (*mem)); \ else if (sizeof (*mem) == 4) \ @@ -122,7 +122,7 @@ typedef uintmax_t uatomic_max_t; : "=r" (result), "=m" (*mem) \ : "0" (value), "m" (*mem)); \ else \ - __asm__ __volatile__ (LOCK_PREFIX "xaddq %q0, %1" \ + __asm__ __volatile__ (LOCK_PREFIX "xaddq %q0, %1" \ : "=r" (result), "=m" (*mem) \ : "0" ((long) (value)), "m" (*mem)); \ result; }) @@ -155,11 +155,11 @@ typedef uintmax_t uatomic_max_t; #define atomic_add_negative(mem, value) \ ({ unsigned char __result; \ if (sizeof (*mem) == 1) \ - __asm__ __volatile__ (LOCK_PREFIX "addb %b2, %0; sets %1" \ + __asm__ __volatile__ (LOCK_PREFIX "addb %b2, %0; sets %1" \ : "=m" (*mem), "=qm" (__result) \ : "ir" (value), "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm__ __volatile__ (LOCK_PREFIX "addw %w2, %0; sets %1" \ + __asm__ __volatile__ (LOCK_PREFIX "addw %w2, %0; sets %1" \ : "=m" (*mem), "=qm" (__result) \ : "ir" (value), "m" (*mem)); \ else if (sizeof (*mem) == 4) \ @@ -167,7 +167,7 @@ typedef uintmax_t uatomic_max_t; : "=m" (*mem), "=qm" (__result) \ : "ir" (value), "m" (*mem)); \ else \ - __asm__ __volatile__ (LOCK_PREFIX "addq %q2, %0; sets %1" \ + __asm__ __volatile__ (LOCK_PREFIX "addq %q2, %0; sets %1" \ : "=m" (*mem), "=qm" (__result) \ : "ir" ((long) (value)), "m" (*mem)); \ __result; }) @@ -176,11 +176,11 @@ typedef uintmax_t uatomic_max_t; #define atomic_add_zero(mem, value) \ ({ unsigned char __result; \ if (sizeof (*mem) == 1) \ - __asm__ __volatile__ (LOCK_PREFIX "addb %b2, %0; setz %1" \ + __asm__ __volatile__ (LOCK_PREFIX "addb %b2, %0; setz %1" \ : "=m" (*mem), "=qm" (__result) \ : "ir" (value), "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm__ __volatile__ (LOCK_PREFIX "addw %w2, %0; setz %1" \ + __asm__ __volatile__ (LOCK_PREFIX "addw %w2, %0; setz %1" \ : "=m" (*mem), "=qm" (__result) \ : "ir" (value), "m" (*mem)); \ else if (sizeof (*mem) == 4) \ @@ -188,7 +188,7 @@ typedef uintmax_t uatomic_max_t; : "=m" (*mem), "=qm" (__result) \ : "ir" (value), "m" (*mem)); \ else \ - __asm__ __volatile__ (LOCK_PREFIX "addq %q2, %0; setz %1" \ + __asm__ __volatile__ (LOCK_PREFIX "addq %q2, %0; setz %1" \ : "=m" (*mem), "=qm" (__result) \ : "ir" ((long) (value)), "m" (*mem)); \ __result; }) @@ -196,19 +196,19 @@ typedef uintmax_t uatomic_max_t; #define atomic_increment(mem) \ (void) ({ if (sizeof (*mem) == 1) \ - __asm__ __volatile__ (LOCK_PREFIX "incb %b0" \ + __asm__ __volatile__ (LOCK_PREFIX "incb %b0" \ : "=m" (*mem) \ : "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm__ __volatile__ (LOCK_PREFIX "incw %w0" \ + __asm__ __volatile__ (LOCK_PREFIX "incw %w0" \ : "=m" (*mem) \ : "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm__ __volatile__ (LOCK_PREFIX "incl %0" \ + __asm__ __volatile__ (LOCK_PREFIX "incl %0" \ : "=m" (*mem) \ : "m" (*mem)); \ else \ - __asm__ __volatile__ (LOCK_PREFIX "incq %q0" \ + __asm__ __volatile__ (LOCK_PREFIX "incq %q0" \ : "=m" (*mem) \ : "m" (*mem)); \ }) @@ -225,7 +225,7 @@ typedef uintmax_t uatomic_max_t; : "=m" (*mem), "=qm" (__result) \ : "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm__ __volatile__ (LOCK_PREFIX "incl %0; sete %1" \ + __asm__ __volatile__ (LOCK_PREFIX "incl %0; sete %1" \ : "=m" (*mem), "=qm" (__result) \ : "m" (*mem)); \ else \ @@ -237,19 +237,19 @@ typedef uintmax_t uatomic_max_t; #define atomic_decrement(mem) \ (void) ({ if (sizeof (*mem) == 1) \ - __asm__ __volatile__ (LOCK_PREFIX "decb %b0" \ + __asm__ __volatile__ (LOCK_PREFIX "decb %b0" \ : "=m" (*mem) \ : "m" (*mem)); \ else if (sizeof (*mem) == 2) \ - __asm__ __volatile__ (LOCK_PREFIX "decw %w0" \ + __asm__ __volatile__ (LOCK_PREFIX "decw %w0" \ : "=m" (*mem) \ : "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm__ __volatile__ (LOCK_PREFIX "decl %0" \ + __asm__ __volatile__ (LOCK_PREFIX "decl %0" \ : "=m" (*mem) \ : "m" (*mem)); \ else \ - __asm__ __volatile__ (LOCK_PREFIX "decq %q0" \ + __asm__ __volatile__ (LOCK_PREFIX "decq %q0" \ : "=m" (*mem) \ : "m" (*mem)); \ }) @@ -266,7 +266,7 @@ typedef uintmax_t uatomic_max_t; : "=m" (*mem), "=qm" (__result) \ : "m" (*mem)); \ else if (sizeof (*mem) == 4) \ - __asm__ __volatile__ (LOCK_PREFIX "decl %0; sete %1" \ + __asm__ __volatile__ (LOCK_PREFIX "decl %0; sete %1" \ : "=m" (*mem), "=qm" (__result) \ : "m" (*mem)); \ else \ @@ -314,7 +314,7 @@ typedef uintmax_t uatomic_max_t; __asm__ __volatile__ (LOCK_PREFIX "btsl %3, %1; setc %0" \ : "=q" (__result), "=m" (*mem) \ : "m" (*mem), "ir" (bit)); \ - else \ + else \ __asm__ __volatile__ (LOCK_PREFIX "btsq %3, %1; setc %0" \ : "=q" (__result), "=m" (*mem) \ : "m" (*mem), "ir" (bit)); \ diff --git a/libpthread/linuxthreads.old/semaphore.h b/libpthread/linuxthreads.old/semaphore.h index fac2e5937..fea127b1e 100644 --- a/libpthread/linuxthreads.old/semaphore.h +++ b/libpthread/linuxthreads.old/semaphore.h @@ -42,7 +42,7 @@ typedef struct #define SEM_FAILED ((sem_t *) 0) /* Maximum value the semaphore can have. */ -#define SEM_VALUE_MAX ((int) ((~0u) >> 1)) +#define SEM_VALUE_MAX ((int) ((~0u) >> 1)) __BEGIN_DECLS |