summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-03-14 11:27:10 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-03-14 11:27:10 +0000
commit24ac8dc06fd7535549e22d162beb58d6592d6aea (patch)
tree29a16c9eb3a6bc6c21e38abe7299b5290473e2b0
parent33dfbbeaec4a49e110f51f5d088015f1a8fb9075 (diff)
downloadskalibs-24ac8dc06fd7535549e22d162beb58d6592d6aea.tar.xz
Fixes for weird systems
-rwxr-xr-xpatch-for-solaris10
-rwxr-xr-xtools/gen-types.sh2
2 files changed, 10 insertions, 2 deletions
diff --git a/patch-for-solaris b/patch-for-solaris
index fbefc32..4ca46ef 100755
--- a/patch-for-solaris
+++ b/patch-for-solaris
@@ -1,7 +1,11 @@
#!/usr/xpg4/bin/sh
patchit () {
- echo '#!/usr/xpg4/bin/sh' > $1.tmp
+ if head -n 1 $1 | grep -qF -- -e ; then
+ echo '#!/usr/xpg4/bin/sh -e' > $1.tmp
+ else
+ echo '#!/usr/xpg4/bin/sh' > $1.tmp
+ fi
tail -n +2 $1 >> $1.tmp
mv -f $1.tmp $1
chmod 0755 $1
@@ -14,6 +18,10 @@ mv -f configure.tmp configure
patchit ./configure
patchit ./tools/install.sh
patchit ./tools/gen-deps.sh
+patchit ./tools/gen-types.sh
+patchit ./tools/gen-types-internal.sh
+patchit ./tools/gen-bits.sh
+patchit ./tools/gen-bits-internal.sh
echo 'SHELL := /usr/xpg4/bin/sh' > Makefile.tmp
echo >> Makefile.tmp
diff --git a/tools/gen-types.sh b/tools/gen-types.sh
index acc9dab..e57ddfd 100755
--- a/tools/gen-types.sh
+++ b/tools/gen-types.sh
@@ -4,7 +4,7 @@ sysdeps="$1"
shift
getbits() {
- expr 8 '*' `grep -F sizeof$2: < "$1" | cut -f2 -d' ')`
+ expr 8 '*' `grep -F sizeof$2: < "$1" | cut -f2 -d' '`
}
cat < src/headers/types-header