From 455f96857f91d14e193219ca00969354a981c09c Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sat, 8 Sep 2012 17:14:52 -0400 Subject: remove all remaining redundant __restrict/__inline/_Noreturn defs --- include/arpa/inet.h | 7 +------ include/byteswap.h | 5 +---- include/iconv.h | 6 +----- include/inttypes.h | 7 +------ include/monetary.h | 6 +----- include/mqueue.h | 6 +----- include/pthread.h | 13 +------------ include/regex.h | 6 +----- include/semaphore.h | 6 +----- include/spawn.h | 6 +----- include/sys/select.h | 6 +----- include/sys/socket.h | 6 +----- include/sys/syscall.h | 4 +--- include/wordexp.h | 6 +----- 14 files changed, 14 insertions(+), 76 deletions(-) diff --git a/include/arpa/inet.h b/include/arpa/inet.h index 82e2ac1b..92938403 100644 --- a/include/arpa/inet.h +++ b/include/arpa/inet.h @@ -5,12 +5,7 @@ extern "C" { #endif -#if __STDC_VERSION__ >= 199901L -#define __restrict restrict -#elif !defined(__GNUC__) -#define __restrict -#endif - +#include #include #include diff --git a/include/byteswap.h b/include/byteswap.h index bf222d3c..00b9df3c 100644 --- a/include/byteswap.h +++ b/include/byteswap.h @@ -1,12 +1,9 @@ #ifndef _BYTESWAP_H #define _BYTESWAP_H +#include #include -#if __STDC_VERSION__ >= 199901L || defined(__cplusplus) -#define __inline inline -#endif - static __inline uint16_t __bswap_16(uint16_t __x) { return __x<<8 | __x>>8; diff --git a/include/iconv.h b/include/iconv.h index cef06f60..ebe9bfda 100644 --- a/include/iconv.h +++ b/include/iconv.h @@ -5,11 +5,7 @@ extern "C" { #endif -#if __STDC_VERSION__ >= 199901L -#define __restrict restrict -#elif !defined(__GNUC__) -#define __restrict -#endif +#include #define __NEED_size_t diff --git a/include/inttypes.h b/include/inttypes.h index 23acc5be..3f0339ce 100644 --- a/include/inttypes.h +++ b/include/inttypes.h @@ -5,17 +5,12 @@ extern "C" { #endif +#include #include #define __NEED_wchar_t #include -#if __STDC_VERSION__ >= 199901L -#define __restrict restrict -#elif !defined(__GNUC__) -#define __restrict -#endif - typedef struct { intmax_t quot, rem; } imaxdiv_t; intmax_t imaxabs(intmax_t); diff --git a/include/monetary.h b/include/monetary.h index 11dabb23..a91fa565 100644 --- a/include/monetary.h +++ b/include/monetary.h @@ -5,11 +5,7 @@ extern "C" { #endif -#if __STDC_VERSION__ >= 199901L -#define __restrict restrict -#elif !defined(__GNUC__) -#define __restrict -#endif +#include #define __NEED_ssize_t #define __NEED_size_t diff --git a/include/mqueue.h b/include/mqueue.h index bd35842c..f5cbe796 100644 --- a/include/mqueue.h +++ b/include/mqueue.h @@ -4,11 +4,7 @@ extern "C" { #endif -#if __STDC_VERSION__ >= 199901L -#define __restrict restrict -#elif !defined(__GNUC__) -#define __restrict -#endif +#include #define __NEED_size_t #define __NEED_ssize_t diff --git a/include/pthread.h b/include/pthread.h index bc0d9f1c..74d86006 100644 --- a/include/pthread.h +++ b/include/pthread.h @@ -4,18 +4,7 @@ extern "C" { #endif -#if __STDC_VERSION__ >= 199901L -#define __restrict restrict -#elif !defined(__GNUC__) -#define __restrict -#endif - -#if __STDC_VERSION__ >= 201112L -#elif defined(__GNUC__) -#define _Noreturn __attribute__((__noreturn__)) -#else -#define _Noreturn -#endif +#include #define __NEED_time_t #define __NEED_clockid_t diff --git a/include/regex.h b/include/regex.h index b7167b87..2eac1ebf 100644 --- a/include/regex.h +++ b/include/regex.h @@ -5,11 +5,7 @@ extern "C" { #endif -#if __STDC_VERSION__ >= 199901L -#define __restrict restrict -#elif !defined(__GNUC__) -#define __restrict -#endif +#include #define __NEED_size_t diff --git a/include/semaphore.h b/include/semaphore.h index 724957fb..20d46f0d 100644 --- a/include/semaphore.h +++ b/include/semaphore.h @@ -4,11 +4,7 @@ extern "C" { #endif -#if __STDC_VERSION__ >= 199901L -#define __restrict restrict -#elif !defined(__GNUC__) -#define __restrict -#endif +#include #define __NEED_time_t #define __NEED_struct_timespec diff --git a/include/spawn.h b/include/spawn.h index c934d423..a28ae691 100644 --- a/include/spawn.h +++ b/include/spawn.h @@ -5,11 +5,7 @@ extern "C" { #endif -#if __STDC_VERSION__ >= 199901L -#define __restrict restrict -#elif !defined(__GNUC__) -#define __restrict -#endif +#include #define __NEED_mode_t #define __NEED_pid_t diff --git a/include/sys/select.h b/include/sys/select.h index dd4176dd..c5a2877f 100644 --- a/include/sys/select.h +++ b/include/sys/select.h @@ -4,11 +4,7 @@ extern "C" { #endif -#if __STDC_VERSION__ >= 199901L -#define __restrict restrict -#elif !defined(__GNUC__) -#define __restrict -#endif +#include #define __NEED_size_t #define __NEED_time_t diff --git a/include/sys/socket.h b/include/sys/socket.h index 7024d232..97d78871 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -4,11 +4,7 @@ extern "C" { #endif -#if __STDC_VERSION__ >= 199901L -#define __restrict restrict -#elif !defined(__GNUC__) -#define __restrict -#endif +#include #define __NEED_socklen_t #define __NEED_sa_family_t diff --git a/include/sys/syscall.h b/include/sys/syscall.h index 154e5ab5..62564d7d 100644 --- a/include/sys/syscall.h +++ b/include/sys/syscall.h @@ -4,9 +4,7 @@ extern "C" { #endif -#if __STDC_VERSION__ >= 199901L || defined(__cplusplus) -#define __inline inline -#endif +#include long __syscall_ret(unsigned long); long __syscall(long, ...); diff --git a/include/wordexp.h b/include/wordexp.h index e7eb3255..d12081e8 100644 --- a/include/wordexp.h +++ b/include/wordexp.h @@ -5,11 +5,7 @@ extern "C" { #endif -#if __STDC_VERSION__ >= 199901L -#define __restrict restrict -#elif !defined(__GNUC__) -#define __restrict -#endif +#include #define __NEED_size_t -- cgit v1.2.1