* Patches for bash on DEC Alpha
@ 1993-04-02 20:28 Arne Henrik Juul
0 siblings, 0 replies; only message in thread
From: Arne Henrik Juul @ 1993-04-02 20:28 UTC (permalink / raw)
Starting with the patches available from ftp.ncsa.uiuc.edu in the
DEC_Alpha directory (thanks to Rob McCool!), I made some additional
patches and got a working version of GNU's Bourne Again SHell, bash.
Since this is a very important program (to some people at least :-)
I'm posting my patches here. Note that you will probably want to
change the default path settings according to your local setup, the
patch to config.h below is very site-dependant. With these patches,
bash compiles with only some harmless warnings about MAXPATHLEN being
redefined (from 1024 to PATH_MAX, which is also 1024) on our Alpha
running T1.2-2. Please contact me if you notice any problems with
these patches, but as ususal: Use at own risk, keep unavailable for
children, etc.
Thanks,
Arne H. Juul, arnej@lise.unit.no
diff -rc ../orig/command.h ./command.h
*** ../orig/command.h Tue Jan 21 19:08:40 1992
--- ./command.h Fri Mar 26 15:19:57 1993
***************
*** 40,45 ****
--- 40,50 ----
/* */
/* **************************************************************** */
+ typedef union {
+ int dest; /* Place to redirect REDIRECTOR to, or ... */
+ WORD_DESC *filename; /* filename to redirect to. */
+ } xx_un;
+
/* What a redirection descriptor looks like. If FLAGS is IS_DESCRIPTOR,
then we use REDIRECTEE.DEST, else we use the file specified. */
typedef struct redirect {
***************
*** 47,56 ****
int redirector; /* Descriptor to be redirected. */
int flags; /* Flag value for `open'. */
enum r_instruction instruction; /* What to do with the information. */
! union {
! int dest; /* Place to redirect REDIRECTOR to, or ... */
! WORD_DESC *filename; /* filename to redirect to. */
! } redirectee;
char *here_doc_eof; /* The word that appeared in <<foo. */
} REDIRECT;
--- 52,58 ----
int redirector; /* Descriptor to be redirected. */
int flags; /* Flag value for `open'. */
enum r_instruction instruction; /* What to do with the information. */
! xx_un redirectee;
char *here_doc_eof; /* The word that appeared in <<foo. */
} REDIRECT;
diff -rc ../orig/config.h ./config.h
*** ../orig/config.h Mon Nov 4 06:21:13 1991
--- ./config.h Fri Mar 26 17:20:06 1993
***************
*** 87,99 ****
#endif /* READLINE */
/* The default value of the PATH variable. */
#define DEFAULT_PATH_VALUE \
! ":/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:/etc:/usr/etc"
/* The value for PATH when invoking `command -p'. This is only used when
the Posix.2 confstr () function, or CS_PATH define are not present. */
#define STANDARD_UTILS_PATH \
! "/bin:/usr/bin:/usr/ucb:/usr/sbin:/etc:/usr/etc"
/* Define V9_ECHO if you want to give the echo builtin backslash-escape
interpretation using the -e option, in the style of the Bell Labs 9th
--- 87,100 ----
#endif /* READLINE */
/* The default value of the PATH variable. */
+
#define DEFAULT_PATH_VALUE \
! "/store/gnu/bin:/store/bin:local/bin:/usr/ucb:/bin:/usr/bin"
/* The value for PATH when invoking `command -p'. This is only used when
the Posix.2 confstr () function, or CS_PATH define are not present. */
#define STANDARD_UTILS_PATH \
! "/store/gnu/bin:/store/bin:local/bin:/usr/ucb:/bin:/usr/bin"
/* Define V9_ECHO if you want to give the echo builtin backslash-escape
interpretation using the -e option, in the style of the Bell Labs 9th
diff -rc ../orig/cpp-Makefile ./cpp-Makefile
*** ../orig/cpp-Makefile Sun Jan 26 03:16:31 1992
--- ./cpp-Makefile Fri Mar 26 17:11:59 1993
***************
*** 54,60 ****
/**/# If you do use Yacc, please make sure that any bugs in parsing
/**/# are not really manifestations of Yacc bugs before you report
/**/# them.
! #define HAVE_BISON
/* This includes the appropriate description for the machine that you are
using (we hope). If the compilation doesn't work correctly, then you
--- 54,60 ----
/**/# If you do use Yacc, please make sure that any bugs in parsing
/**/# are not really manifestations of Yacc bugs before you report
/**/# them.
! #undef HAVE_BISON
/* This includes the appropriate description for the machine that you are
using (we hope). If the compilation doesn't work correctly, then you
***************
*** 111,117 ****
RM = rm -f
AR = ar
! MACHINE = M_MACHINE
OS = M_OS
/**/# PROFILE_FLAGS is either -pg, to generate profiling info for use
--- 111,117 ----
RM = rm -f
AR = ar
! XMACHINE = M_MACHINE
OS = M_OS
/**/# PROFILE_FLAGS is either -pg, to generate profiling info for use
***************
*** 191,203 ****
SYSTEM_FLAGS = $(LINEBUF) $(VPRINTF) $(UNISTD) $(GROUPS) $(RESOURCE) \
$(SIGHANDLER) $(SYSDEP) $(WAITH) $(GETWD) $(DUP2) $(STRERROR) \
! -D$(MACHINE) -D$(OS)
! DEBUG_FLAGS = $(PROFILE_FLAGS) -g
LDFLAGS = $(NOSHARE) $(SYSDEP_LD) $(EXTRA_LD_PATH) $(DEBUG_FLAGS)
CFLAGS = $(DEBUG_FLAGS) $(SYSTEM_FLAGS) -DSHELL $(ALLOCA_CFLAGS)
CPPFLAGS= -I$(LIBSRC)
! /* It is conceviable that you wish to edit some things beyond this point,
but I guess that it is highly unlikely, and may give you a headache. */
/* **************************************************************** */
--- 191,203 ----
SYSTEM_FLAGS = $(LINEBUF) $(VPRINTF) $(UNISTD) $(GROUPS) $(RESOURCE) \
$(SIGHANDLER) $(SYSDEP) $(WAITH) $(GETWD) $(DUP2) $(STRERROR) \
! -D$(XMACHINE) -D$(OS)
! DEBUG_FLAGS = $(PROFILE_FLAGS) -O
LDFLAGS = $(NOSHARE) $(SYSDEP_LD) $(EXTRA_LD_PATH) $(DEBUG_FLAGS)
CFLAGS = $(DEBUG_FLAGS) $(SYSTEM_FLAGS) -DSHELL $(ALLOCA_CFLAGS)
CPPFLAGS= -I$(LIBSRC)
! /* It is conceivable that you wish to edit some things beyond this point,
but I guess that it is highly unlikely, and may give you a headache. */
/* **************************************************************** */
***************
*** 228,237 ****
/* Flags used when building libraries. */
LIBRARY_CFLAGS = $(DEBUG_FLAGS) $(SIGHANDLER) $(ALLOCA_CFLAGS) \
! $(SYSDEP) -D$(MACHINE) -D$(OS) $(UNISTD) -DSHELL
/**/# These are required for sending bug reports.
! SYSTEM_NAME = $(MACHINE)
OS_NAME = $(OS)
/**/# The name of this program.
--- 228,237 ----
/* Flags used when building libraries. */
LIBRARY_CFLAGS = $(DEBUG_FLAGS) $(SIGHANDLER) $(ALLOCA_CFLAGS) \
! $(SYSDEP) -D$(XMACHINE) -D$(OS) $(UNISTD) -DSHELL
/**/# These are required for sending bug reports.
! SYSTEM_NAME = $(XMACHINE)
OS_NAME = $(OS)
/**/# The name of this program.
***************
*** 401,407 ****
#if defined (HAVE_READLINE_SOURCE)
READLINE_CFLAGS = $(DEBUG_FLAGS) $(SIGHANDLER) $(ALLOCA_CFLAGS) \
! $(SYSDEP) -D$(MACHINE) -D$(OS) $(UNISTD)
#define READLINE_LIBRARY ./lib/readline/libreadline.a
#else
#define READLINE_LIBRARY -lreadline
--- 401,407 ----
#if defined (HAVE_READLINE_SOURCE)
READLINE_CFLAGS = $(DEBUG_FLAGS) $(SIGHANDLER) $(ALLOCA_CFLAGS) \
! $(SYSDEP) -D$(XMACHINE) -D$(OS) $(UNISTD)
#define READLINE_LIBRARY ./lib/readline/libreadline.a
#else
#define READLINE_LIBRARY -lreadline
***************
*** 616,626 ****
@echo
@echo " ***************************************************"
@echo " * *"
! @echo " * Making Bash-`cat .distribution` for a $(MACHINE) running $(OS)."
@echo " * *"
@echo " ***************************************************"
@echo
! @echo "$(PROGRAM) last made for a $(MACHINE) running $(OS)" >.machine
version.h: newversion.aux
if ./newversion.aux -build; then mv -f newversion.h version.h; fi
--- 616,626 ----
@echo
@echo " ***************************************************"
@echo " * *"
! @echo " * Making Bash-`cat .distribution` for a $(XMACHINE) running $(OS)."
@echo " * *"
@echo " ***************************************************"
@echo
! @echo "$(PROGRAM) last made for a $(XMACHINE) running $(OS)" >.machine
version.h: newversion.aux
if ./newversion.aux -build; then mv -f newversion.h version.h; fi
***************
*** 756,762 ****
compress -f $(PROGRAM).tar
clone: $(THINGS_TO_TAR)
! @$(MKTARFILE) +notar $(MACHINE) $(OS) $(THINGS_TO_TAR)
install: .made
-if [ -f $(DESTDIR)/$(PROGRAM) ]; \
--- 756,762 ----
compress -f $(PROGRAM).tar
clone: $(THINGS_TO_TAR)
! @$(MKTARFILE) +notar $(XMACHINE) $(OS) $(THINGS_TO_TAR)
install: .made
-if [ -f $(DESTDIR)/$(PROGRAM) ]; \
***************
*** 809,822 ****
/**/# Here is a convenient rule when you arrive at a new site and wish to
/**/# install bash on several different architectures. It creates a new
/**/# directory to hold the results of compilatation. The directory is
! /**/# named MACHINE-OS.
! architecture: $(MACHINE)-$(OS)/$(PROGRAM)
! $(MACHINE)-$(OS):
! -mkdir $(MACHINE)-$(OS)
! $(MACHINE)-$(OS)/$(PROGRAM): $(MACHINE)-$(OS) $(PROGRAM)
! mv $(PROGRAM) $(MACHINE)-$(OS)
! mv sysdefs.h $(MACHINE)-$(OS)
! mv $(SDIR)getcppsyms $(MACHINE)-$(OS)
$(MAKE) $(MFLAGS) clean
--- 809,822 ----
/**/# Here is a convenient rule when you arrive at a new site and wish to
/**/# install bash on several different architectures. It creates a new
/**/# directory to hold the results of compilatation. The directory is
! /**/# named XMACHINE-OS.
! architecture: $(XMACHINE)-$(OS)/$(PROGRAM)
! $(XMACHINE)-$(OS):
! -mkdir $(XMACHINE)-$(OS)
! $(XMACHINE)-$(OS)/$(PROGRAM): $(XMACHINE)-$(OS) $(PROGRAM)
! mv $(PROGRAM) $(XMACHINE)-$(OS)
! mv sysdefs.h $(XMACHINE)-$(OS)
! mv $(SDIR)getcppsyms $(XMACHINE)-$(OS)
$(MAKE) $(MFLAGS) clean
diff -rc ../orig/general.c ./general.c
*** ../orig/general.c Tue Jan 21 05:35:27 1992
--- ./general.c Fri Apr 2 14:58:28 1993
***************
*** 806,812 ****
return (name);
}
! #if defined (USG) || (defined (_POSIX_VERSION) && defined (Ultrix))
int
sysv_getc (stream)
FILE *stream;
--- 806,812 ----
return (name);
}
! #if defined (USG) || defined(DIGITAL)
int
sysv_getc (stream)
FILE *stream;
diff -rc ../orig/hash.c ./hash.c
*** ../orig/hash.c Sun Jul 7 23:53:51 1991
--- ./hash.c Fri Mar 26 14:37:29 1993
***************
*** 28,39 ****
#define FILENAME_HASH_BUCKETS 107
- /* Create the hash table for filenames that we use in the shell. */
- initialize_hashed_filenames ()
- {
- hashed_filenames = make_hash_table (FILENAME_HASH_BUCKETS);
- }
-
/* Make a new hash table with BUCKETS number of buckets. Initialize
each slot in the table to NULL. */
HASH_TABLE *
--- 28,33 ----
diff -rc ../orig/machines.h ./machines.h
*** ../orig/machines.h Fri Jan 17 22:42:24 1992
--- ./machines.h Fri Apr 2 14:58:01 1993
***************
*** 196,202 ****
#define HAVE_GETGROUPS
#endif /* vax && !ultrix */
! /* **************************************** */
/* */
/* SGI Iris/IRIX */
/* */
--- 196,219 ----
#define HAVE_GETGROUPS
#endif /* vax && !ultrix */
! /* ************************ */
! /* */
! /* DEC AXP OSF/1 */
! /* */
! /* ************************ */
!
! #if defined(alpha) && defined(DEC_OSF1)
! #define M_MACHINE "AlphaAXP"
! #define M_OS DecOSF
! #undef USE_GNU_MALLOC
! #define HAVE_SETLINEBUF
! #define HAVE_VFPRINTF
! #define SYSDEP_CFLAGS -DDIGITAL
! #define HAVE_STRERROR
! #define VOID_SIGHANDLER
! #endif
!
! /* **************************************** */
/* */
/* SGI Iris/IRIX */
/* */
diff -rc ../orig/make_cmd.c ./make_cmd.c
*** ../orig/make_cmd.c Tue Jan 21 18:41:40 1992
--- ./make_cmd.c Fri Mar 26 17:32:38 1993
***************
*** 22,27 ****
--- 22,28 ----
#include <stdio.h>
#include <sys/types.h>
#include <sys/file.h>
+ #include "config.h"
#include "general.h"
#include "error.h"
#include "command.h"
***************
*** 405,422 ****
}
}
! /* Generate a REDIRECT from SOURCE, DEST, and INSTRUCTION.
INSTRUCTION is the instruction type, SOURCE is an INT,
! and DEST is an INT or a WORD_DESC *. */
REDIRECT *
! make_redirection (source, instruction, dest)
enum r_instruction instruction;
{
REDIRECT *temp = (REDIRECT *)xmalloc (sizeof (REDIRECT));
/* First do the common cases. */
temp->redirector = source;
! temp->redirectee.dest = dest;
temp->instruction = instruction;
temp->next = (REDIRECT *)NULL;
--- 406,424 ----
}
}
! /* Generate a REDIRECT from SOURCE, INSTRUCTION, and REDIRECTEE.
INSTRUCTION is the instruction type, SOURCE is an INT,
! and REDIRECTEE is an union (INT, WORD_DESC *) */
REDIRECT *
! make_redirection (source, instruction, redirectee)
enum r_instruction instruction;
+ xx_un redirectee;
{
REDIRECT *temp = (REDIRECT *)xmalloc (sizeof (REDIRECT));
/* First do the common cases. */
temp->redirector = source;
! temp->redirectee = redirectee;
temp->instruction = instruction;
temp->next = (REDIRECT *)NULL;
diff -rc ../orig/parse.y ./parse.y
*** ../orig/parse.y Sat Jan 25 23:52:44 1992
--- ./parse.y Fri Apr 2 14:59:07 1993
***************
*** 751,757 ****
yy_stream_get ()
{
if (bash_input.location.file)
! #if defined (USG) || (defined (_POSIX_VERSION) && defined (Ultrix))
return (sysv_getc (bash_input.location.file));
#else
return (getc (bash_input.location.file));
--- 751,757 ----
yy_stream_get ()
{
if (bash_input.location.file)
! #if defined (USG) || defined (DIGITAL)
return (sysv_getc (bash_input.location.file));
#else
return (getc (bash_input.location.file));
diff -rc ../orig/subst.c ./subst.c
*** ../orig/subst.c Tue Nov 26 20:58:59 1991
--- ./subst.c Fri Apr 2 15:01:50 1993
***************
*** 51,56 ****
--- 51,59 ----
extern WORD_DESC *copy_word ();
extern WORD_LIST *copy_word_list();
+ /* Fix a bug on the alpha running OSF/1 -Rob McCool */
+ extern GENERIC_LIST *reverse_list();
+
static WORD_LIST *expand_string_internal (), *expand_words_internal ();
static char *quote_string (), *dequote_string ();
static int unquoted_substring ();
***************
*** 1244,1250 ****
/* Read the output of the command through the pipe. */
while (1)
{
! #if defined (USG) || (defined (_POSIX_VERSION) && defined (Ultrix))
c = sysv_getc (istream);
#else
c = getc (istream);
--- 1247,1253 ----
/* Read the output of the command through the pipe. */
while (1)
{
! #if defined (USG) || defined (DIGITAL)
c = sysv_getc (istream);
#else
c = getc (istream);
***************
*** 2815,2822 ****
t = copy_word_list (expanded);
}
new_list =
! (WORD_LIST *)list_append (reverse_list (t), new_list);
dispose_words (expanded);
--- 2818,2826 ----
t = copy_word_list (expanded);
}
+ /* RMM */
new_list =
! (WORD_LIST *)list_append (reverse_list (t), new_list);
dispose_words (expanded);
diff -rc ../orig/builtins/hashcom.h ./builtins/hashcom.h
*** ../orig/builtins/hashcom.h Mon Jul 8 00:03:38 1991
--- ./builtins/hashcom.h Fri Mar 26 14:37:29 1993
***************
*** 3,9 ****
#define FILENAME_HASH_BUCKETS 631
! HASH_TABLE *hashed_filenames;
typedef struct {
char *path; /* The full pathname of the file. */
--- 3,9 ----
#define FILENAME_HASH_BUCKETS 631
! extern HASH_TABLE *hashed_filenames;
typedef struct {
char *path; /* The full pathname of the file. */
diff -rc ../orig/support/getcppsyms.c ./support/getcppsyms.c
*** ../orig/support/getcppsyms.c Thu Jan 9 09:33:05 1992
--- ./support/getcppsyms.c Sat Jan 16 20:29:21 1993
***************
*** 305,310 ****
--- 305,313 ----
#if defined (vax)
printf (" -Dvax");
#endif /* vax */
+ #if defined (__osf__) && defined (__alpha)
+ printf(" -Dalpha -DDEC_OSF1");
+ #endif
printf ("\n");
exit (0);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1993-04-02 20:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-04-02 20:28 Patches for bash on DEC Alpha Arne Henrik Juul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox