summaryrefslogtreecommitdiff
path: root/include/sys
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-09-07 23:13:55 -0400
committerRich Felker <dalias@aerifal.cx>2012-09-07 23:13:55 -0400
commitc1a9658bd19245ff0fb52d3da567815d822fb622 (patch)
tree36af789c4a0ebc8a1af3c49eab9edb34f5dbf869 /include/sys
parent9f65796c35bd93a1de42752ce8af901acfe4b1a4 (diff)
downloadmusl-c1a9658bd19245ff0fb52d3da567815d822fb622.tar.gz
default features: make musl usable without feature test macros
the old behavior of exposing nothing except plain ISO C can be obtained by defining __STRICT_ANSI__ or using a compiler option (such as -std=c99) that predefines it. the new default featureset is POSIX with XSI plus _BSD_SOURCE. any explicit feature test macros will inhibit the default. installation docs have also been updated to reflect this change.
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/ipc.h2
-rw-r--r--include/sys/mman.h2
-rw-r--r--include/sys/resource.h2
-rw-r--r--include/sys/sem.h2
-rw-r--r--include/sys/sendfile.h1
-rw-r--r--include/sys/shm.h2
-rw-r--r--include/sys/stat.h6
-rw-r--r--include/sys/statfs.h2
-rw-r--r--include/sys/statvfs.h6
-rw-r--r--include/sys/time.h6
-rw-r--r--include/sys/types.h2
-rw-r--r--include/sys/uio.h2
-rw-r--r--include/sys/utsname.h2
-rw-r--r--include/sys/wait.h2
14 files changed, 24 insertions, 15 deletions
diff --git a/include/sys/ipc.h b/include/sys/ipc.h
index 8e2f7172..3f896b8c 100644
--- a/include/sys/ipc.h
+++ b/include/sys/ipc.h
@@ -4,6 +4,8 @@
extern "C" {
#endif
+#include <features.h>
+
#define __NEED_uid_t
#define __NEED_gid_t
#define __NEED_mode_t
diff --git a/include/sys/mman.h b/include/sys/mman.h
index 5cfafbed..0fa32e6a 100644
--- a/include/sys/mman.h
+++ b/include/sys/mman.h
@@ -4,6 +4,8 @@
extern "C" {
#endif
+#include <features.h>
+
#define __NEED_mode_t
#define __NEED_size_t
#define __NEED_off_t
diff --git a/include/sys/resource.h b/include/sys/resource.h
index bf59d1c8..9536ba35 100644
--- a/include/sys/resource.h
+++ b/include/sys/resource.h
@@ -5,6 +5,8 @@
extern "C" {
#endif
+#include <features.h>
+
#define __NEED_id_t
#define __NEED_time_t
#define __NEED_struct_timeval
diff --git a/include/sys/sem.h b/include/sys/sem.h
index add3f1c8..cc3a3e63 100644
--- a/include/sys/sem.h
+++ b/include/sys/sem.h
@@ -4,6 +4,8 @@
extern "C" {
#endif
+#include <features.h>
+
#define __NEED_size_t
#define __NEED_pid_t
#define __NEED_time_t
diff --git a/include/sys/sendfile.h b/include/sys/sendfile.h
index 1f2b5231..e7570d8e 100644
--- a/include/sys/sendfile.h
+++ b/include/sys/sendfile.h
@@ -5,6 +5,7 @@
extern "C" {
#endif
+#include <features.h>
#include <unistd.h>
ssize_t sendfile(int, int, off_t *, size_t);
diff --git a/include/sys/shm.h b/include/sys/shm.h
index 34117cc8..ce3029f5 100644
--- a/include/sys/shm.h
+++ b/include/sys/shm.h
@@ -5,6 +5,8 @@
extern "C" {
#endif
+#include <features.h>
+
#define __NEED_time_t
#define __NEED_size_t
#define __NEED_pid_t
diff --git a/include/sys/stat.h b/include/sys/stat.h
index e16a9682..c63c6b8b 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -4,11 +4,7 @@
extern "C" {
#endif
-#if __STDC_VERSION__ >= 199901L
-#define __restrict restrict
-#elif !defined(__GNUC__)
-#define __restrict
-#endif
+#include <features.h>
#define __NEED_dev_t
#define __NEED_ino_t
diff --git a/include/sys/statfs.h b/include/sys/statfs.h
index a5a4db9c..d8128a25 100644
--- a/include/sys/statfs.h
+++ b/include/sys/statfs.h
@@ -5,6 +5,8 @@
extern "C" {
#endif
+#include <features.h>
+
#include <sys/statvfs.h>
typedef struct {
diff --git a/include/sys/statvfs.h b/include/sys/statvfs.h
index be41c287..e0839eca 100644
--- a/include/sys/statvfs.h
+++ b/include/sys/statvfs.h
@@ -5,11 +5,7 @@
extern "C" {
#endif
-#if __STDC_VERSION__ >= 199901L
-#define __restrict restrict
-#elif !defined(__GNUC__)
-#define __restrict
-#endif
+#include <features.h>
#define __NEED_fsblkcnt_t
#define __NEED_fsfilcnt_t
diff --git a/include/sys/time.h b/include/sys/time.h
index bf026432..a0ed8e0f 100644
--- a/include/sys/time.h
+++ b/include/sys/time.h
@@ -4,11 +4,7 @@
extern "C" {
#endif
-#if __STDC_VERSION__ >= 199901L
-#define __restrict restrict
-#elif !defined(__GNUC__)
-#define __restrict
-#endif
+#include <features.h>
#include <sys/select.h>
diff --git a/include/sys/types.h b/include/sys/types.h
index f5b64879..7378b60b 100644
--- a/include/sys/types.h
+++ b/include/sys/types.h
@@ -4,6 +4,8 @@
extern "C" {
#endif
+#include <features.h>
+
#define __NEED_ino_t
#define __NEED_dev_t
#define __NEED_uid_t
diff --git a/include/sys/uio.h b/include/sys/uio.h
index 7a75a542..624ff422 100644
--- a/include/sys/uio.h
+++ b/include/sys/uio.h
@@ -5,6 +5,8 @@
extern "C" {
#endif
+#include <features.h>
+
#define __NEED_size_t
#define __NEED_ssize_t
#define __NEED_struct_iovec
diff --git a/include/sys/utsname.h b/include/sys/utsname.h
index 4c36960f..6b9ea970 100644
--- a/include/sys/utsname.h
+++ b/include/sys/utsname.h
@@ -5,6 +5,8 @@
extern "C" {
#endif
+#include <features.h>
+
struct utsname
{
char sysname[65];
diff --git a/include/sys/wait.h b/include/sys/wait.h
index 5e3012ba..8bcac8a3 100644
--- a/include/sys/wait.h
+++ b/include/sys/wait.h
@@ -4,6 +4,8 @@
extern "C" {
#endif
+#include <features.h>
+
#include <signal.h>
#define __NEED_pid_t