summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdeheader8
1 files changed, 6 insertions, 2 deletions
diff --git a/deheader b/deheader
index ea44267..fec34fe 100755
--- a/deheader
+++ b/deheader
@@ -37,9 +37,11 @@ version = "0.3"
# Difference in various compiler implementations and OSes mean that for cross-
# platform compatibility you sometimes want to leave "unneeded" headers alone
# because they're required in order to satify dependencies on other platforms.
-# We list those here. Home port is Linux; these are mostly extracted from
-# observing compiles on BSD systems.
+# We list those here. In general they fall into two categrories:
requirements = map(lambda (r, h): (re.compile(r), h), (
+ # Headers mandated by SuS that may not be required by a particular compiler,
+ # usually because all the argument types and the return type are composed
+ # from C scalar types.
(r"a64l\s*\(", ["<stdlib.h>"]),
(r"l64a\s*\(", ["<stdlib.h>"]),
(r"access\s*\(", ["<unistd.h>"]),
@@ -51,6 +53,8 @@ requirements = map(lambda (r, h): (re.compile(r), h), (
(r"atan2\s*\(", ["<math.h>"]),
(r"basename\s*\(", ["<libgen.h>"]),
(r"umask\s*\(", ["<sys/stat.h>", "<sys/types.h>"]),
+ # Dependencies observed on systems other than the Linux this was
+ # developed under.
(r"<sys/socket.h>", ["<sys/stat.h>", "<sys/types.h>"]),
))