aboutsummaryrefslogtreecommitdiff
path: root/system/include/libc/sys
diff options
context:
space:
mode:
authorBruce Mitchener <bruce.mitchener@gmail.com>2013-09-06 17:48:28 +0700
committerAlon Zakai <alonzakai@gmail.com>2013-09-13 10:07:03 -0700
commit733e6877d7b1146ecb5c796f4d249843101a7b5f (patch)
treedeef7abf4f88e6e0ba4ac326d351063a73399a8d /system/include/libc/sys
parent4c3c7df30af6dc9ba6309e527a5173d9078c56b9 (diff)
Update to musl-0.9.13 headers.
Diffstat (limited to 'system/include/libc/sys')
-rw-r--r--system/include/libc/sys/msg.h1
-rw-r--r--system/include/libc/sys/personality.h40
-rw-r--r--system/include/libc/sys/un.h19
-rw-r--r--system/include/libc/sys/wait.h4
4 files changed, 62 insertions, 2 deletions
diff --git a/system/include/libc/sys/msg.h b/system/include/libc/sys/msg.h
index ceedd1c6..139f22b7 100644
--- a/system/include/libc/sys/msg.h
+++ b/system/include/libc/sys/msg.h
@@ -23,6 +23,7 @@ typedef unsigned long msglen_t;
#define __msg_cbytes msg_cbytes
#define MSG_NOERROR 010000
+#define MSG_EXCEPT 020000
#define MSG_STAT 11
#define MSG_INFO 12
diff --git a/system/include/libc/sys/personality.h b/system/include/libc/sys/personality.h
index 852c0248..31d43dfe 100644
--- a/system/include/libc/sys/personality.h
+++ b/system/include/libc/sys/personality.h
@@ -1,6 +1,46 @@
#ifndef _PERSONALITY_H
#define _PERSONALITY_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ADDR_NO_RANDOMIZE 0x0040000
+#define MMAP_PAGE_ZERO 0x0100000
+#define ADDR_COMPAT_LAYOUT 0x0200000
+#define READ_IMPLIES_EXEC 0x0400000
+#define ADDR_LIMIT_32BIT 0x0800000
+#define SHORT_INODE 0x1000000
+#define WHOLE_SECONDS 0x2000000
+#define STICKY_TIMEOUTS 0x4000000
+#define ADDR_LIMIT_3GB 0x8000000
+
+#define PER_LINUX 0
+#define PER_LINUX_32BIT ADDR_LIMIT_32BIT
+#define PER_SVR4 (1 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO)
+#define PER_SVR3 (2 | STICKY_TIMEOUTS | SHORT_INODE)
+#define PER_SCOSVR3 (3 | STICKY_TIMEOUTS | WHOLE_SECONDS | SHORT_INODE)
+#define PER_OSR5 (3 | STICKY_TIMEOUTS | WHOLE_SECONDS)
+#define PER_WYSEV386 (4 | STICKY_TIMEOUTS | SHORT_INODE)
+#define PER_ISCR4 (5 | STICKY_TIMEOUTS)
+#define PER_BSD 6
+#define PER_SUNOS (6 | STICKY_TIMEOUTS)
+#define PER_XENIX (7 | STICKY_TIMEOUTS | SHORT_INODE)
+#define PER_LINUX32 8
+#define PER_LINUX32_3GB (8 | ADDR_LIMIT_3GB)
+#define PER_IRIX32 (9 | STICKY_TIMEOUTS)
+#define PER_IRIXN32 (0xa | STICKY_TIMEOUTS)
+#define PER_IRIX64 (0x0b | STICKY_TIMEOUTS)
+#define PER_RISCOS 0xc
+#define PER_SOLARIS (0xd | STICKY_TIMEOUTS)
+#define PER_UW7 (0xe | STICKY_TIMEOUTS | MMAP_PAGE_ZERO)
+#define PER_OSF4 0xf
+#define PER_HPUX 0x10
+#define PER_MASK 0xff
+
int personality(unsigned long);
+#ifdef __cplusplus
+}
+#endif
#endif
diff --git a/system/include/libc/sys/un.h b/system/include/libc/sys/un.h
index 769dac6b..7494f1a3 100644
--- a/system/include/libc/sys/un.h
+++ b/system/include/libc/sys/un.h
@@ -1,7 +1,17 @@
#ifndef _SYS_UN_H
#define _SYS_UN_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <features.h>
+
#define __NEED_sa_family_t
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+#define __NEED_size_t
+#endif
+
#include <bits/alltypes.h>
struct sockaddr_un
@@ -10,4 +20,13 @@ struct sockaddr_un
char sun_path[108];
};
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+size_t strlen(const char *);
+#define SUN_LEN(s) (2+strlen((s)->sun_path))
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/system/include/libc/sys/wait.h b/system/include/libc/sys/wait.h
index b6dfe01d..a7ad7cd1 100644
--- a/system/include/libc/sys/wait.h
+++ b/system/include/libc/sys/wait.h
@@ -45,8 +45,8 @@ pid_t wait4 (pid_t, int *, int, struct rusage *);
#define WSTOPSIG(s) WEXITSTATUS(s)
#define WCOREDUMP(s) ((s) & 0x80)
#define WIFEXITED(s) (!WTERMSIG(s))
-#define WIFSTOPPED(s) (((s) & 0xff) == 0x7f)
-#define WIFSIGNALED(s) (((signed char) (((s) & 0x7f) + 1) >> 1) > 0)
+#define WIFSTOPPED(s) ((short)((((s)&0xffff)*0x10001)>>8) > 0x7f00)
+#define WIFSIGNALED(s) (((s)&0xffff)-1 < 0xffu)
#define WIFCONTINUED(s) ((s) == 0xffff)
#ifdef __cplusplus