Solaris

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello list,

I cannot get dash 0.5.4 to build on Solaris.  I've made a couple small
patches that may be a step in the right direction.


$ diff -u src/mkbuiltins.orig src/mkbuiltins
--- mkbuiltins.orig     Fri Jul 13 03:26:43 2007
+++ mkbuiltins  Tue Oct 21 14:27:30 2008
@@ -35,6 +35,7 @@
 #
 #      @(#)mkbuiltins  8.2 (Berkeley) 5/4/95

+opsys=$(uname -s)
 tempfile=tempfile
 if ! type tempfile > /dev/null 2>&1; then
        tempfile=mktemp
@@ -83,9 +84,17 @@
  */

 !
+
+if [ ${opsys} = "SunOS" ]; then
+sed 's/        -[a-z]*//' $temp2 | nl -v0 | sort -u -k 3,3 |
+tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |
+       awk '{  printf "#define %s (builtincmd + %d)\n", $3, $1}'
+else # not SunOS
 sed 's/        -[a-z]*//' $temp2 | nl -v 0 | sort -u -k 3,3 |
 tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |
        awk '{  printf "#define %s (builtincmd + %d)\n", $3, $1}'
+fi
+
 printf '\n#define NUMBUILTINS %d\n' $(wc -l < $temp2)
 echo '
 #define BUILTIN_SPECIAL 0x1


$ diff -u configure.ac.orig configure.ac
--- configure.ac.orig   Fri Jul 13 03:26:42 2007
+++ configure.ac        Tue Oct 21 14:37:12 2008
@@ -21,6 +21,7 @@
 dnl Checks for libraries.

 dnl Checks for header files.
+AC_CHECK_HEADERS(paths.h)

 dnl Checks for library functions.
 AC_CHECK_FUNCS(bsearch getpwnam getrlimit isalpha killpg mempcpy sigsetmask
\


After regenerating configure and such, I was then able to conditionally
include paths.h or define the constants in-place as needed in the 4 files
that use it, and dash would build.  (There's probably a better way to handle
this, but I was going for a quick check first.)  It would dump core as soon
I tried executing any command in it, though, so I think I've missed
something.


Thanks,
Tim

-- 
Tim Larson        AMT2 Unix Systems Administrator
    InterCall, a division of West Corporation

               Eschew obfuscation!

Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux