Merge remote-tracking branch 'nsz/math'
authorRich Felker <dalias@aerifal.cx>
Sat, 15 Dec 2012 05:49:09 +0000 (00:49 -0500)
committerRich Felker <dalias@aerifal.cx>
Sat, 15 Dec 2012 05:49:09 +0000 (00:49 -0500)
configure
include/sys/shm.h
include/sys/timerfd.h

index b61ffb8..96f93b2 100755 (executable)
--- a/configure
+++ b/configure
@@ -270,9 +270,19 @@ fnmatch '-march=*|*\ -march=*' "$CFLAGS" || tryldflag CFLAGS_AUTO -march=i486
 fnmatch '-mtune=*|*\ -mtune=*' "$CFLAGS" || tryldflag CFLAGS_AUTO -mtune=generic
 fi
 
+#
+# Even with -std=c99, gcc accepts some constructs which are constraint
+# violations. We want to treat these as errors regardless of whether
+# other purely stylistic warnings are enabled -- especially implicit
+# function declarations, which are a dangerous programming error.
+#
+tryflag CFLAGS_AUTO -Werror=implicit-function-declaration
+tryflag CFLAGS_AUTO -Werror=implicit-int
+tryflag CFLAGS_AUTO -Werror=pointer-sign
+tryflag CFLAGS_AUTO -Werror=pointer-arith
+
 if test "x$warnings" = xyes ; then
 tryflag CFLAGS_AUTO -Wall
-tryflag CFLAGS_AUTO -Wpointer-arith
 tryflag CFLAGS_AUTO -Wcast-align
 tryflag CFLAGS_AUTO -Wno-parentheses
 tryflag CFLAGS_AUTO -Wno-uninitialized
index ce3029f..bca6ed6 100644 (file)
@@ -16,6 +16,9 @@ extern "C" {
 #include <sys/ipc.h>
 #include <bits/shm.h>
 
+#define SHM_R 0400
+#define SHM_W 0200
+
 #define SHM_RDONLY 010000
 #define SHM_RND    020000
 #define SHM_REMAP  040000
index 0afa7b0..df645fe 100644 (file)
@@ -6,6 +6,12 @@ extern "C" {
 #endif
 
 #include <time.h>
+#include <fcntl.h>
+
+#define TFD_NONBLOCK O_NONBLOCK
+#define TFD_CLOEXEC O_CLOEXEC
+
+#define TFD_TIMER_ABSTIME 1
 
 int timerfd_create(int, int);
 int timerfd_settime(int, int, const struct itimerspec *, struct itimerspec *);