Article View: fj.sys.sun
Article #57Re: bash on Solaris 2.0
From: Azuma Okamoto
Date: Wed, 04 Nov 1992 10:48
Date: Wed, 04 Nov 1992 10:48
273 lines
9506 bytes
9506 bytes
In article <SS.92Nov4161534@amont.astec.co.jp> ss@astec.co.jp (Sakashita Shiu) writes:
>>In article <SS.92Nov4130242@amont.astec.co.jp>
>> ss@astec.co.jp (Sakashita Shiu) writes:
>> ASTEC,Inc.$B$N:d2<$H?=$7$^$9!#(J
>> Solaris 2.0$B$G(Jgcc$B$r;H$C$F(Jbash$B$HF0$+$9$h$&$K$7$?$N$G$9$,!"(J
>
> $B$:$5$s$J@-3J$,$P$l$F$7$^$$$^$9$,!"(J
> $BF0$$$?$H;W$C$?$i!"(Jlogin shell$B$K$9$k$H(Jcore dump$B$9$k$3$H$,(J
$B30$7$F$k$+$bCN$l$^$;$s$,!"(J
gnu.bash.bug $B$K0JA0$3$&$$$&$b$N$,N.$l$F$$$^$7$?!#(J
# $BJ*$,$J$$$N$G;n$7$F$^$;$s!#(J
>From: zoo@cygnus.com (david d 'zoo' zuhn)
Newsgroups: gnu.bash.bug
Subject: bash patches for solaris 2.0
Message-ID: <ZOO.92Jul16040438@cirdan.cygnus.com>
Date: 16 Jul 92 09:04:38 GMT
Sender: gnulists@ai.mit.edu
Distribution: gnu
Organization: Cygnus Support -- +1 415 322 3816
Lines: 241
Approved: bug-bash@prep.ai.mit.edu
I've talked to several people in the last few days who have just
gotten Solaris 2.0 and are trying to bring up their world under it.
The very first thing that I did was bring up bash, as did several
other people. I sent the patches to Brian Fox, but I haven't a clue
when they'll be incorporated into a new release of bash.
Rather than have everyone duplicate this effort, here are the patches
to bash-1.12 to get it working under Solaris 2.0. I've been using it
for 2 1/2 months now, without any problems at all.
I think we're going to see a lot of software break in the next few
months, because there exists a lot of software that assumes that SunOS
== BSD, and that the presence of the cpp define for 'sun' or 'sparc'
means BSD semantics. This isn't true anymore (and hopefully by the
end of the year there will be even more choices for an OS on SPARC
based machines).
david d 'zoo' zuhn |
cygnus support | "Man made it, man can fix it."
zoo@cygnus.com | -- anonymous biker in South Dakota
---------- slice 'n' dice ------------------------------------ file: bashdiffs
===================================================================
RCS file: /rel/cvsfiles/unsupported/gnu/bash/Makefile,v
retrieving revision 1.4
diff -u -2 -r1.4 Makefile
--- 1.4 1992/02/08 06:40:33
+++ Makefile 1992/05/18 09:58:20
@@ -11,14 +11,15 @@
# If you haven't read README, now might be a good time.
-DESTDIR = /usr/gnu/bin
+DESTDIR = /usr/local/bin
MAKE = make
RM = rm -f
SHELL = /bin/sh
-GAWK = awk
+GAWK = nawk
# GAWK = gawk
CPPNAME = /lib/cpp
-CPP = $(CPPNAME) `$(CPPMAGIC) $(GETCPPSYMS) $(CPPNAME)` -P
-# CPP = $(CC) -E
+#CPP = $(CPPNAME) `$(CPPMAGIC) $(GETCPPSYMS) $(CPPNAME)` -P
+CPP = $(CC) -E
CPP_MAKEFILE = cpp-Makefile
===================================================================
RCS file: /rel/cvsfiles/unsupported/gnu/bash/cpp-Makefile,v
retrieving revision 1.5
diff -u -2 -r1.5 cpp-Makefile
--- 1.5 1992/02/08 06:40:42
+++ cpp-Makefile 1992/05/18 10:15:22
@@ -92,5 +92,5 @@
CC = gcc -traditional -posix -I/usr/include $(GCC_EXTRAS)
# else
-CC = gcc -traditional -I/usr/include $(GCC_EXTRAS)
+CC = gcc $(GCC_EXTRAS)
# endif /* isc386 */
# else /* HAVE_FIXED_INCLUDES */
@@ -812,5 +812,5 @@
/**/# named MACHINE-OS.
architecture: $(MACHINE)-$(OS)/$(PROGRAM)
-
+#if 0
$(MACHINE)-$(OS):
-mkdir $(MACHINE)-$(OS)
@@ -821,2 +821,3 @@
mv $(SDIR)getcppsyms $(MACHINE)-$(OS)
$(MAKE) $(MFLAGS) clean
+#endif /* 0 */
===================================================================
RCS file: /rel/cvsfiles/unsupported/gnu/bash/jobs.c,v
retrieving revision 1.4
diff -u -2 -r1.4 jobs.c
--- 1.4 1992/02/08 06:40:56
+++ jobs.c 1992/05/18 10:38:41
@@ -105,5 +105,11 @@
extern int interactive, asynchronous_notification;
extern char *shell_name;
+
+#if defined(__svr4__) && defined(sun)
+#define sys_siglist _sys_siglist
+#else
extern char *sys_siglist[];
+#endif
+
/* The array of known jobs. */
===================================================================
RCS file: /rel/cvsfiles/unsupported/gnu/bash/machines.h,v
retrieving revision 1.5
diff -u -2 -r1.5 machines.h
--- 1.5 1992/02/08 06:41:01
+++ machines.h 1992/05/18 10:03:39
@@ -59,5 +59,7 @@
YP which bites us when Sun free ()'s an already free ()'ed address.
When Sun fixes their YP, we can start using our winning malloc again. */
-# undef USE_GNU_MALLOC
+# ifndef __svr4__
+# undef USE_GNU_MALLOC
+# endif
/* Most Sun systems have signal handler functions that are void. */
@@ -76,12 +78,18 @@
# define Sun386i
# endif
-#if defined (HAVE_SHARED_LIBS)
-# define M_OS SunOS4
-# define SunOS4_SYSDEP_CFLAGS -DBSD_GETPGRP
+
+#if defined (__svr4__)
+# define M_OS Solaris
#else
-# if !defined (sparc)
-# undef VOID_SIGHANDLER
+# if defined (HAVE_SHARED_LIBS)
+# define M_OS SunOS4
+# define SunOS4_SYSDEP_CFLAGS -DBSD_GETPGRP
+# else
+# if !defined (sparc)
+# undef VOID_SIGHANDLER
+# endif
+# define M_OS SunOS3
# endif
-# define M_OS SunOS3
+
#endif
#endif /* sun */
@@ -92,5 +100,5 @@
/* */
/* ************************ */
-#if defined (sun2)
+#if defined (sun2) /* SunOS only */
#define M_MACHINE "sun2"
#define HAVE_SYS_SIGLIST
@@ -105,5 +113,5 @@
/* */
/* ************************ */
-#if defined (sun3)
+#if defined (sun3) /* SunOS only */
#define M_MACHINE "sun3"
#if defined (SunOS4_SYSDEP_CFLAGS)
@@ -123,11 +131,22 @@
#if defined (sun4)
#define M_MACHINE "sparc"
-#if defined (SunOS4_SYSDEP_CFLAGS)
-# define SYSDEP_CFLAGS SunOS4_SYSDEP_CFLAGS
-#endif /* SunOS4 */
-#define HAVE_SYS_SIGLIST
-#define HAVE_SETLINEBUF
-#define HAVE_VFPRINTF
-#define HAVE_GETGROUPS
+
+#if defined (__svr4__) /* do the Solaris thing */
+# define HAVE_SYS_SIGLIST
+# define HAVE_VFPRINTF
+# define VOID_SIGNAL_HANDLER
+# define HAVE_GETGROUPS
+# define SYSDEP_CFLAGS -DUSG -DUSGr4 -D_POSIX_VERSION -D_POSIX_JOB_CONTROL
+# undef HAVE_GETWD
+#else /* do the SunOS thing*/
+# if defined (SunOS4_SYSDEP_CFLAGS)
+# define SYSDEP_CFLAGS SunOS4_SYSDEP_CFLAGS
+# endif /* SunOS4 */
+# define HAVE_SYS_SIGLIST
+# define HAVE_SETLINEBUF
+# define HAVE_VFPRINTF
+# define HAVE_GETGROUPS
+#endif
+
#endif /* sparc */
===================================================================
RCS file: /rel/cvsfiles/unsupported/gnu/bash/shell.c,v
retrieving revision 1.1.1.8
diff -u -2 -r1.1.1.8 shell.c
--- 1.1.1.8 1992/02/08 06:05:28
+++ shell.c 1992/05/18 09:30:41
@@ -32,6 +32,6 @@
*/
-#include <stdio.h>
#include <sys/types.h>
+#include <stdio.h>
#include <signal.h>
#include <errno.h>
===================================================================
RCS file: /rel/cvsfiles/unsupported/gnu/bash/builtins/Makefile,v
retrieving revision 1.1.1.2
diff -u -2 -r1.1.1.2 Makefile
--- 1.1.1.2 1992/02/08 06:07:40
+++ Makefile 1992/05/18 10:12:54
@@ -54,5 +54,5 @@
libbuiltins.a: $(MKBUILTINS) $(OFILES)
$(RM) $@
- $(AR) clq $@ $(OFILES)
+ $(AR) cq $@ $(OFILES)
-if [ -f "$(RANLIB)" ]; then $(RANLIB) $@; fi
===================================================================
RCS file: /rel/cvsfiles/unsupported/gnu/bash/lib/glob/Makefile,v
retrieving revision 1.1.1.2
diff -u -2 -r1.1.1.2 Makefile
--- 1.1.1.2 1992/02/08 06:07:07
+++ Makefile 1992/05/18 10:14:02
@@ -13,5 +13,5 @@
libglob.a: $(OBJECTS)
$(RM) -f $@
- $(AR) clq $@ $(OBJECTS)
+ $(AR) cq $@ $(OBJECTS)
-if [ -f "$(RANLIB)" ]; then $(RANLIB) $@; fi
===================================================================
RCS file: /rel/cvsfiles/unsupported/gnu/bash/lib/malloc/malloc.c,v
retrieving revision 1.1.1.2
diff -u -2 -r1.1.1.2 malloc.c
--- 1.1.1.2 1992/02/08 06:06:32
+++ malloc.c 1992/05/18 10:07:39
@@ -676,5 +676,5 @@
}
-#if !(defined (HPUX) || defined (Multimax) || defined (Multimax32k))
+#if !(defined(__svr4__) || defined (HPUX) || defined (Multimax) || defined (Multimax32k))
/* This runs into trouble with getpagesize on HPUX, and Multimax machines.
Patching out seems cleaner than the ugly fix needed. */
===================================================================
RCS file: /rel/cvsfiles/unsupported/gnu/bash/lib/readline/Makefile,v
retrieving revision 1.1.1.2
diff -u -2 -r1.1.1.2 Makefile
--- 1.1.1.2 1992/02/08 06:06:47
+++ Makefile 1992/05/18 10:13:46
@@ -77,5 +77,5 @@
libreadline.a: $(OBJECTS)
$(RM) -f $@
- $(AR) clq $@ $(OBJECTS)
+ $(AR) cq $@ $(OBJECTS)
-if [ -f "$(RANLIB)" ]; then $(RANLIB) libreadline.a; fi
--
Azuma Okamoto (lfo@ecei.tohoku.ac.jp)
Departments of Electrical Engineering, Electrical Communications,
Electronics Engineering, and Information Engineering,
Faculty of Engineering, Tohoku University, Sendai, 980 Japan
Technical Details
Message-ID:
<1992Nov4.104857.11750@ecei.tohoku.ac.jp>Path:
arc1-ca.pugleaf.net!sparky!uunet!ccut!sh.wide!wnoc-snd-ss2!akiu!yagi!lfoReferences:
<SS.92Nov4130242@amont.astec.co.jp> <SS.92Nov4161534@amont.astec.co.jp>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ccut!sh.wide!wnoc-snd-ss2!akiu!yagi!lfo From: lfo@ecei.tohoku.ac.jp (Azuma Okamoto) Newsgroups: fj.sys.sun Subject: Re: bash on Solaris 2.0 Message-ID: <1992Nov4.104857.11750@ecei.tohoku.ac.jp> Date: 4 Nov 92 10:48:57 GMT References: <SS.92Nov4130242@amont.astec.co.jp> <SS.92Nov4161534@amont.astec.co.jp> Sender: news@ecei.tohoku.ac.jp Distribution: fj Organization: Departments of Electrical Engineering, Electrical Communications, Electronics Engineering, and Information Engineering, Faculty of Engineering, Tohoku University, Sendai, 980 Japan Lines: 273 Nntp-Posting-Host: yagi