jjc@UUNET.UU.NET (James Clark) (06/14/89)
I had to make a few changes to get bash 0.99 to compile and run on a 386 PC running 386/ix 2.0.1 (a derivative of System V/386 3.2). I was compiling with cc rather than gcc. I renamed malloc-rcheck.c to malloc-check.c and unwind_protect.c to unwind_prot.c. I had to comment out the hostname completion stuff. diff -rc2H dist-bash/Makefile bash/Makefile *** dist-bash/Makefile Thu Jun 1 15:22:11 1989 --- bash/Makefile Tue Jun 13 14:22:33 1989 *************** *** 28,36 **** # The mailing address of you, the local maintainer. This *must* be # enclosed in double quotes. Until I make a better Makefile. ! MAINTAINER = '"bfox@ai.mit.edu"' # Destination installation directory. The shell is copied here if # you do a `make install'. The directory name does NOT end in a slash. ! DESTDIR = /usr/gnu/bin # The name of the target hardware. It makes a difference. If your --- 28,36 ---- # The mailing address of you, the local maintainer. This *must* be # enclosed in double quotes. Until I make a better Makefile. ! MAINTAINER = '"jjc@jclark.uucp"' # Destination installation directory. The shell is copied here if # you do a `make install'. The directory name does NOT end in a slash. ! DESTDIR = /usr/local/bin # The name of the target hardware. It makes a difference. If your *************** *** 43,47 **** # difference between SUNOS3 and Bsd. But there might be in the future. # SUNOS3, SUNOS4, SYSV, Bsd, HPUX ! OS = SUNOS4 # You only need this if you are hacking the shell in a location --- 43,47 ---- # difference between SUNOS3 and Bsd. But there might be in the future. # SUNOS3, SUNOS4, SYSV, Bsd, HPUX ! OS = SYSV # You only need this if you are hacking the shell in a location *************** *** 63,69 **** # HP-UX compilation requires the BSD library. ! #LOCAL_LIBS = -lBSD ! GCC_SUNOS4_FLAG = -Bstatic DEBUG_FLAGS = $(PROFILE_FLAGS) -g $(GCC_SUNOS4_FLAG) LDFLAGS = $(DEBUG_FLAGS) --- 63,69 ---- # HP-UX compilation requires the BSD library. ! LOCAL_LIBS = -lPW ! GCC_SUNOS4_FLAG = DEBUG_FLAGS = $(PROFILE_FLAGS) -g $(GCC_SUNOS4_FLAG) LDFLAGS = $(DEBUG_FLAGS) *************** *** 77,85 **** # If you don't have Gcc use cc. ! GCC = gcc # Make TRADITIONAL be `-traditional' if you are using Gcc 1.2x # or greater. ! TRADITIONAL = -traditional # #################################################################### --- 77,85 ---- # If you don't have Gcc use cc. ! GCC = cc # Make TRADITIONAL be `-traditional' if you are using Gcc 1.2x # or greater. ! TRADITIONAL = # #################################################################### *************** *** 110,114 **** # Our malloc. Use alloc-files/malloc-rcheck.o for debugging, or # alloc-files/malloc.o if not. ! MALLOC = $(ALLOC_SOURCE)malloc-rcheck.o #MALLOC= $(ALLOC_SOURCE)malloc.o #ALLOCA= $(ALLOC_SOURCE)alloca.o --- 110,114 ---- # Our malloc. Use alloc-files/malloc-rcheck.o for debugging, or # alloc-files/malloc.o if not. ! MALLOC = $(ALLOC_SOURCE)malloc-check.o #MALLOC= $(ALLOC_SOURCE)malloc.o #ALLOCA= $(ALLOC_SOURCE)alloca.o *************** *** 116,120 **** ALLOC_HEADERS = $(ALLOC_SOURCE)getpagesize.h ALLOC_FILES = $(ALLOC_SOURCE)malloc.c $(ALLOC_SOURCE)alloca.c\ ! $(ALLOC_SOURCE)i386-alloca.s $(ALLOC_SOURCE)malloc-rcheck.c CSOURCES = shell.c parse.y general.c make_cmd.c print_cmd.c\ --- 116,120 ---- ALLOC_HEADERS = $(ALLOC_SOURCE)getpagesize.h ALLOC_FILES = $(ALLOC_SOURCE)malloc.c $(ALLOC_SOURCE)alloca.c\ ! $(ALLOC_SOURCE)i386-alloca.s $(ALLOC_SOURCE)malloc-check.c CSOURCES = shell.c parse.y general.c make_cmd.c print_cmd.c\ *************** *** 123,127 **** test.c readline.c trap.c history.c jobs.c nojobs.c $(ALLOC_FILES)\ keymaps.c emacs_keymap.c vi_keymap.c funmap.c braces.c\ ! unwind_protect.c HSOURCES = history.h shell.h flags.h trap.h hash.h jobs.h readline.h\ --- 123,127 ---- test.c readline.c trap.c history.c jobs.c nojobs.c $(ALLOC_FILES)\ keymaps.c emacs_keymap.c vi_keymap.c funmap.c braces.c\ ! unwind_prot.c HSOURCES = history.h shell.h flags.h trap.h hash.h jobs.h readline.h\ *************** *** 135,139 **** flags.o jobs.o subst.o glob.o hash.o mailcheck.o test.o\ readline.o trap.o history.o alias.o $(MALLOC) $(ALLOCA)\ ! braces.o unwind_protect.o # Documentation for the shell. --- 135,139 ---- flags.o jobs.o subst.o glob.o hash.o mailcheck.o test.o\ readline.o trap.o history.o alias.o $(MALLOC) $(ALLOCA)\ ! braces.o unwind_prot.o # Documentation for the shell. Only in bash/alloc-files: malloc-check.c Only in dist-bash/alloc-files: malloc-rcheck. diff -rc2H dist-bash/builtins.c bash/builtins.c *** dist-bash/builtins.c Sat Jun 3 18:32:24 1989 --- bash/builtins.c Tue Jun 13 15:06:54 1989 *************** *** 10,14 **** --- 10,16 ---- #include <sys/param.h> #include <sys/time.h> + #ifndef SYSV #include <sys/resource.h> + #endif #include <sys/types.h> #include <sys/stat.h> *************** *** 361,371 **** { "type", type_builtin, 1, "type [-type | -path] [name ...]", " For each NAME, indicate how it would be interpreted if used as a\n\ ! command name. ! If the -type flag is used, returns a single word which is one of\n\ `alias', `function', `builtin', `file' or `', if NAME is an\n\ alias, shell function, shell builtin, disk file, or unfound,\n\ ! respectively. ! If the -path flag is used, either returns the name of the disk file\n\ that would be exec'ed, or nothing if -type wouldn't return `file'" }, --- 363,373 ---- { "type", type_builtin, 1, "type [-type | -path] [name ...]", " For each NAME, indicate how it would be interpreted if used as a\n\ ! command name.\n\ ! \n\ If the -type flag is used, returns a single word which is one of\n\ `alias', `function', `builtin', `file' or `', if NAME is an\n\ alias, shell function, shell builtin, disk file, or unfound,\n\ ! respectively.\n\ ! \n\ If the -path flag is used, either returns the name of the disk file\n\ that would be exec'ed, or nothing if -type wouldn't return `file'" }, *************** *** 2352,2357 **** long newlim; { struct rlimit limit; ! switch (which) { --- 2354,2360 ---- long newlim; { + #ifndef SYSV struct rlimit limit; ! #endif switch (which) { *************** *** 2361,2365 **** { #ifdef SYSV ! return (ulimit (1, limit.rlim_max)); #else if (getrlimit (RLIMIT_FSIZE, &limit) != 0 ) --- 2364,2368 ---- { #ifdef SYSV ! return (ulimit (1, 0L)); #else if (getrlimit (RLIMIT_FSIZE, &limit) != 0 ) diff -rc2H dist-bash/general.c bash/general.c *** dist-bash/general.c Thu May 25 01:16:07 1989 --- bash/general.c Tue Jun 13 14:36:39 1989 *************** *** 341,345 **** extern int errno; #include <sys/errno.h> ! bcopy(s,d,n) char *d,*s; { while(n--) *d++ = *s++; } char *getwd(s) char *s; { getcwd(s,MAXPATHLEN); return s; } --- 341,346 ---- extern int errno; #include <sys/errno.h> ! #undef index ! #undef rindex bcopy(s,d,n) char *d,*s; { while(n--) *d++ = *s++; } char *getwd(s) char *s; { getcwd(s,MAXPATHLEN); return s; } diff -rc2H dist-bash/jobs.h bash/jobs.h *** dist-bash/jobs.h Sun May 21 16:04:27 1989 --- bash/jobs.h Tue Jun 13 14:55:49 1989 *************** *** 7,11 **** #ifdef i386 ! union wait { struct { char high; char low; } bytes; short word; }; #define WSTOPPED 0177 #define w_status word --- 7,11 ---- #ifdef i386 ! union wait { struct { char low; char high; } bytes; short word; }; #define WSTOPPED 0177 #define w_status word diff -rc2H dist-bash/readline.c bash/readline.c *** dist-bash/readline.c Tue Jun 6 23:31:12 1989 --- bash/readline.c Tue Jun 13 14:18:20 1989 *************** *** 236,239 **** --- 236,240 ---- struct sigcontext *scp; { + extern char *get_string_value (); if (readline_echoing_p) { *************** *** 926,929 **** --- 927,932 ---- register char *ofd, *ols, *oe, *nfd, *nls, *ne; int i, lendiff, wsatend; + static void move_cursor_relative (); + static void output_some_chars (); /* Find first difference. */ *************** *** 2314,2318 **** /* Another one. Why not? If the word starts in '@', then look through the world of known hostnames for completion first. */ ! if (*text == '@') { --- 2317,2321 ---- /* Another one. Why not? If the word starts in '@', then look through the world of known hostnames for completion first. */ ! #if 0 if (*text == '@') { *************** *** 2326,2330 **** } } ! /* And last, (but not least) if this word is in a command position, then complete over possible command names, including aliases, functions, --- 2329,2333 ---- } } ! #endif /* And last, (but not least) if this word is in a command position, then complete over possible command names, including aliases, functions, *************** *** 2778,2781 **** --- 2781,2785 ---- } + #if 0 /* How about a completion function for hostnames? */ #include <sys/socket.h> *************** *** 2815,2818 **** --- 2819,2823 ---- } } + #endif #endif /* SHELL */ diff -rc2H dist-bash/shell.c bash/shell.c *** dist-bash/shell.c Thu May 25 16:02:02 1989 --- bash/shell.c Tue Jun 13 14:29:30 1989 *************** *** 733,737 **** SIGXFSZ, #endif ! SIGVTALRM, SIGPROF, #ifdef SIGLOST SIGLOST, --- 733,742 ---- SIGXFSZ, #endif ! #ifdef SIGVTALRM ! SIGVTALRM, ! #endif ! #ifdef SIGPROF ! SIGPROF, ! #endif #ifdef SIGLOST SIGLOST, James Clark jjc@jclark.uucp