Forráskód Böngészése

add wrapper headers, with warnings, for various incorrect names under sys

also add a warning to the existing sys/poll.h. the warning is absent
from sys/dir.h because it is actually providing a slightly different
API to the program, and thus just replacing the #include directive is
not a valid fix to programs using this one.
Rich Felker 11 éve
szülő
commit
54446d730c
6 módosított fájl, 11 hozzáadás és 0 törlés
  1. 2 0
      include/sys/dir.h
  2. 2 0
      include/sys/errno.h
  3. 2 0
      include/sys/fcntl.h
  4. 1 0
      include/sys/poll.h
  5. 2 0
      include/sys/signal.h
  6. 2 0
      include/sys/termios.h

+ 2 - 0
include/sys/dir.h

@@ -0,0 +1,2 @@
+#include <dirent.h>
+#define direct dirent

+ 2 - 0
include/sys/errno.h

@@ -0,0 +1,2 @@
+#warning redirecting incorrect #include <sys/errno.h> to <errno.h>
+#include <errno.h>

+ 2 - 0
include/sys/fcntl.h

@@ -0,0 +1,2 @@
+#warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
+#include <fcntl.h>

+ 1 - 0
include/sys/poll.h

@@ -1 +1,2 @@
+#warning redirecting incorrect #include <sys/poll.h> to <poll.h>
 #include <poll.h>

+ 2 - 0
include/sys/signal.h

@@ -0,0 +1,2 @@
+#warning redirecting incorrect #include <sys/signal.h> to <signal.h>
+#include <signal.h>

+ 2 - 0
include/sys/termios.h

@@ -0,0 +1,2 @@
+#warning redirecting incorrect #include <sys/termios.h> to <termios.h>
+#include <termios.h>