aboutsummaryrefslogtreecommitdiff
path: root/lang/sml-nj/files/extra-patch-genposixnames
diff options
context:
space:
mode:
Diffstat (limited to 'lang/sml-nj/files/extra-patch-genposixnames')
-rw-r--r--lang/sml-nj/files/extra-patch-genposixnames33
1 files changed, 33 insertions, 0 deletions
diff --git a/lang/sml-nj/files/extra-patch-genposixnames b/lang/sml-nj/files/extra-patch-genposixnames
new file mode 100644
index 000000000000..c1301b1b8b7b
--- /dev/null
+++ b/lang/sml-nj/files/extra-patch-genposixnames
@@ -0,0 +1,33 @@
+--- src/runtime/config/gen-posix-names.sh.orig Tue Oct 10 21:26:35 2000
++++ src/runtime/config/gen-posix-names.sh Tue Mar 11 22:50:21 2003
+@@ -36,17 +36,20 @@
+ /lib/cpp > $INCLFILE <<XXX
+ #include <unistd.h>
+ XXX
+-elif [ -r "/usr/include/sys/unistd.h" ]; then
+- INCLFILE=/usr/include/sys/unistd.h
+-elif [ -r "/usr/include/confname.h" ]; then
+- INCLFILE=/usr/include/confname.h
+-elif [ -r "/usr/include/unistd.h" ]; then
+- INCLFILE=/usr/include/unistd.h
+-elif [ -r "/usr/include/bsd/unistd.h" ]; then
+- INCLFILE=/usr/include/bsd/unistd.h
+ else
+- echo "gen-posix-names.sh: unable to find <unistd.h>"
+- exit 1
++ INCLFILE=""
++ for f in "/usr/include/sys/unistd.h" \
++ "/usr/include/confname.h" \
++ "/usr/include/unistd.h" \
++ "/usr/include/bsd/unistd.h"; do
++ if [ -r "$f" ]; then
++ INCLFILE="$INCLFILE $f"
++ fi
++ done
++ if [ -z "$INCLFILE" ]; then
++ echo "gen-posix-names.sh: unable to find <unistd.h>"
++ exit 1
++ fi
+ fi
+
+ echo "/* $OUTF" >> $OUTF