home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 2 / FFMCD02.bin / useful / dist / gnu / bash / bash-1.12.diffs next >
Encoding:
Text File  |  1993-12-14  |  31.7 KB  |  1,124 lines

  1. diff -rc bash-1.12-fsf/Makefile bash-1.12-amiga/Makefile
  2. *** bash-1.12-fsf/Makefile    Sat Jan 18 15:43:12 1992
  3. --- bash-1.12-amiga/Makefile    Sat Nov 20 01:20:30 1993
  4. ***************
  5. *** 17,25 ****
  6.   GAWK     = awk
  7.   # GAWK     = gawk
  8.   
  9. ! CPPNAME = /lib/cpp
  10.   CPP     = $(CPPNAME) `$(CPPMAGIC) $(GETCPPSYMS) $(CPPNAME)` -P
  11. ! # CPP     = $(CC) -E
  12.   
  13.   CPP_MAKEFILE = cpp-Makefile
  14.   
  15. --- 17,25 ----
  16.   GAWK     = awk
  17.   # GAWK     = gawk
  18.   
  19. ! CPPNAME = /gcc/lib/gcc-lib/amigados/2.5.7/cpp
  20.   CPP     = $(CPPNAME) `$(CPPMAGIC) $(GETCPPSYMS) $(CPPNAME)` -P
  21. ! #CPP     = $(CC) -E
  22.   
  23.   CPP_MAKEFILE = cpp-Makefile
  24.   
  25. ***************
  26. *** 39,47 ****
  27.   # much trouble with this, just forget it.  It is for making
  28.   # bash-Makefile pretty and readable; something that isn't strictly
  29.   # necessary.
  30. ! # SQUASH_BLANKS = cat -s
  31.   #
  32. ! SQUASH_BLANKS = $(GAWK) -f $(CAT_S)
  33.   
  34.   all:    .notified bash-Makefile
  35.       $(MAKE) $(MFLAGS) $(MAKEARGS) -f bash-Makefile
  36. --- 39,47 ----
  37.   # much trouble with this, just forget it.  It is for making
  38.   # bash-Makefile pretty and readable; something that isn't strictly
  39.   # necessary.
  40. ! SQUASH_BLANKS = cat -s
  41.   #
  42. ! #SQUASH_BLANKS = $(GAWK) -f $(CAT_S)
  43.   
  44.   all:    .notified bash-Makefile
  45.       $(MAKE) $(MFLAGS) $(MAKEARGS) -f bash-Makefile
  46. diff -rc bash-1.12-fsf/alias.h bash-1.12-amiga/alias.h
  47. *** bash-1.12-fsf/alias.h    Sun Jul  7 14:35:44 1991
  48. --- bash-1.12-amiga/alias.h    Sat Nov 20 01:55:30 1993
  49. ***************
  50. *** 21,27 ****
  51.   #if !defined (_ALIAS_)
  52.   #define _ALIAS_
  53.   
  54. ! extern char *xmalloc (), *malloc ();
  55.   
  56.   #ifndef whitespace
  57.   #define whitespace(c) (((c) == ' ') || ((c) == '\t'))
  58. --- 21,28 ----
  59.   #if !defined (_ALIAS_)
  60.   #define _ALIAS_
  61.   
  62. ! extern char *xmalloc ();
  63. ! extern void *malloc ();
  64.   
  65.   #ifndef whitespace
  66.   #define whitespace(c) (((c) == ' ') || ((c) == '\t'))
  67. diff -rc bash-1.12-fsf/bashline.c bash-1.12-amiga/bashline.c
  68. *** bash-1.12-fsf/bashline.c    Mon Jan 20 04:49:52 1992
  69. --- bash-1.12-amiga/bashline.c    Fri Nov 19 01:36:57 1993
  70. ***************
  71. *** 42,49 ****
  72.   
  73.   /* Externally defined functions used by this file. */
  74.   extern char
  75. !   *get_string_value (), *filename_completion_function (),
  76. !   *username_completion_function ();
  77.   
  78.   extern int show_shell_version ();
  79.   
  80. --- 42,51 ----
  81.   
  82.   /* Externally defined functions used by this file. */
  83.   extern char
  84. !   *get_string_value (), *filename_completion_function ();
  85. ! #ifndef amigados
  86. ! extern char *username_completion_function ();
  87. ! #endif /* amigados */
  88.   
  89.   extern int show_shell_version ();
  90.   
  91. ***************
  92. *** 550,556 ****
  93. --- 552,562 ----
  94.     /* If the word starts in `~', and there is no slash in the word, then
  95.        try completing this word as a username. */
  96.     if (!matches && *text == '~' && !index (text, '/'))
  97. + #ifdef amigados
  98. +     matches = (char **)NULL;
  99. + #else
  100.       matches = completion_matches (text, username_completion_function);
  101. + #endif /* amigados */
  102.   
  103.     /* Another one.  Why not?  If the word starts in '@', then look through
  104.        the world of known hostnames for completion first. */
  105. ***************
  106. *** 1238,1245 ****
  107. --- 1244,1253 ----
  108.   bash_complete_username_internal (what_to_do)
  109.        int what_to_do;
  110.   {
  111. + #ifndef amigados
  112.     bash_specific_completion
  113.       (what_to_do, (Function *)username_completion_function);
  114. + #endif /* amigados */
  115.   }
  116.   
  117.   static void
  118. diff -rc bash-1.12-fsf/builtins/Makefile bash-1.12-amiga/builtins/Makefile
  119. *** bash-1.12-fsf/builtins/Makefile    Thu Nov  7 15:46:32 1991
  120. --- bash-1.12-amiga/builtins/Makefile    Sat Nov 20 14:17:30 1993
  121. ***************
  122. *** 58,65 ****
  123.   
  124.   builtext.h builtins.c: $(MKBUILTINS) $(DEFS)
  125.       $(RM) builtext.h builtins.c
  126. !     ./$(MKBUILTINS) -externfile builtext.h -structfile builtins.c \
  127. !     -noproduction $(DEFS)
  128.   
  129.   mkbuiltins: mkbuiltins.c
  130.       $(CC) $(CFLAGS) -o $(MKBUILTINS) mkbuiltins.c
  131. --- 58,65 ----
  132.   
  133.   builtext.h builtins.c: $(MKBUILTINS) $(DEFS)
  134.       $(RM) builtext.h builtins.c
  135. !     ./$(MKBUILTINS) -externfile - -noproduction $(DEFS) >builtext.h
  136. !     ./$(MKBUILTINS) -structfile builtins.c -noproduction $(DEFS)
  137.   
  138.   mkbuiltins: mkbuiltins.c
  139.       $(CC) $(CFLAGS) -o $(MKBUILTINS) mkbuiltins.c
  140. diff -rc bash-1.12-fsf/builtins/mkbuiltins.c bash-1.12-amiga/builtins/mkbuiltins.c
  141. *** bash-1.12-fsf/builtins/mkbuiltins.c    Tue Nov  5 23:54:21 1991
  142. --- bash-1.12-amiga/builtins/mkbuiltins.c    Sat Nov 20 14:13:34 1993
  143. ***************
  144. *** 158,164 ****
  145.   
  146.         if (extern_filename)
  147.       {
  148. !       externfile = fopen (extern_filename, "w");
  149.   
  150.         if (!externfile)
  151.           file_error (extern_filename);
  152. --- 158,167 ----
  153.   
  154.         if (extern_filename)
  155.       {
  156. !       if (strcmp (extern_filename, "-") == 0)
  157. !         externfile = stdout;
  158. !       else
  159. !         externfile = fopen (extern_filename, "w");
  160.   
  161.         if (!externfile)
  162.           file_error (extern_filename);
  163. ***************
  164. *** 199,205 ****
  165.         unlink (temp_struct_filename);
  166.       }
  167.   
  168. !       if (externfile)
  169.       fclose (externfile);
  170.       }
  171.   
  172. --- 202,208 ----
  173.         unlink (temp_struct_filename);
  174.       }
  175.   
  176. !       if (externfile && externfile != stdout)
  177.       fclose (externfile);
  178.       }
  179.   
  180. ***************
  181. *** 1001,1006 ****
  182. --- 1004,1010 ----
  183.             /* Write the extern definition. */
  184.             if (externfile)
  185.           {
  186. +           fprintf (externfile, "/* %s */\n", defs -> filename);
  187.             if (builtin->function)
  188.               fprintf (externfile, "extern int %s ();\n",
  189.                    builtin->function);
  190. diff -rc bash-1.12-fsf/builtins/psize.sh bash-1.12-amiga/builtins/psize.sh
  191. *** bash-1.12-fsf/builtins/psize.sh    Sun Jul  7 14:37:15 1991
  192. --- bash-1.12-amiga/builtins/psize.sh    Sat Nov 20 02:41:23 1993
  193. ***************
  194. *** 11,17 ****
  195.   echo " */"
  196.   echo ""
  197.   
  198. ! ./psize.aux 2>/tmp/pipesize | sleep 3
  199.   
  200.   echo "#define PIPESIZE `cat /tmp/pipesize`"
  201.   
  202. --- 11,20 ----
  203.   echo " */"
  204.   echo ""
  205.   
  206. ! #./psize.aux 2>/tmp/pipesize | sleep 3
  207. ! # Begin Amiga hack
  208. ! echo 5120 >/tmp/pipesize
  209. ! #endif Amiga hack
  210.   
  211.   echo "#define PIPESIZE `cat /tmp/pipesize`"
  212.   
  213. diff -rc bash-1.12-fsf/config.h bash-1.12-amiga/config.h
  214. *** bash-1.12-fsf/config.h    Mon Nov  4 01:21:13 1991
  215. --- bash-1.12-amiga/config.h    Fri Nov 19 01:36:57 1993
  216. ***************
  217. *** 59,65 ****
  218. --- 59,67 ----
  219.   
  220.   /* Define JOB_CONTROL if your operating system supports
  221.      BSD-like job control. */
  222. + #ifndef amigados
  223.   #define JOB_CONTROL
  224. + #endif /* amigados */
  225.   
  226.   /* Note that vanilla System V machines don't support BSD job control,
  227.      although some do support Posix job control. */
  228. ***************
  229. *** 87,99 ****
  230. --- 89,111 ----
  231.   #endif /* READLINE */
  232.   
  233.   /* The default value of the PATH variable. */
  234. + #ifdef amigados
  235.   #define DEFAULT_PATH_VALUE \
  236. +   ":/c:/gcc:/usr/bin:/bin:/usr/local/bin:.:/local/bin"
  237. + #else
  238. + #define DEFAULT_PATH_VALUE \
  239.     ":/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:/etc:/usr/etc"
  240. + #endif /* amigados */
  241.   
  242.   /* The value for PATH when invoking `command -p'.  This is only used when
  243.      the Posix.2 confstr () function, or CS_PATH define are not present. */
  244. + #ifdef amigados
  245. + #define STANDARD_UTILS_PATH \
  246. +   "/c:/gcc:/usr/bin:/bin:/usr/local/bin:.:/local/bin"
  247. + #else
  248.   #define STANDARD_UTILS_PATH \
  249.     "/bin:/usr/bin:/usr/ucb:/usr/sbin:/etc:/usr/etc"
  250. + #endif /* amigados */
  251.   
  252.   /* Define V9_ECHO if you want to give the echo builtin backslash-escape
  253.      interpretation using the -e option, in the style of the Bell Labs 9th
  254. ***************
  255. *** 120,124 ****
  256. --- 132,156 ----
  257.   /* Define DISABLED_BUILTINS if you want "builtin foo" to always run the
  258.      shell builtin "foo", even if it has been disabled with "enable -n foo". */
  259.   /* #define DISABLED_BUILTINS */
  260. + #ifdef amigados
  261. + #define SYSTEM_NAME "amiga"
  262. + #define OS_NAME "Bsd"
  263. + #define PPROMPT "bash$ "
  264. + #define SPROMPT "> "
  265. + #ifdef HOSTTYPE
  266. + # undef HOSTTYPE
  267. + #endif /* HOSTTYPE */
  268. + #define HOSTTYPE "amiga"
  269. + #ifndef MAINTAINER
  270. + # define MAINTAINER "phb@colombo.telesys-innov.fr"
  271. + #endif /* MAINTAINER */
  272. + #ifdef JOB_CONTROL
  273. + # undef JOB_CONTROL
  274. + #endif /* JOB_CONTROL */
  275. + #ifdef HAVE_BSD_SIGNALS
  276. + # undef HAVE_BSD_SIGNALS
  277. + #endif
  278. + #endif /* amigados */
  279.   
  280.   #endif    /* _CONFIG_ */
  281. diff -rc bash-1.12-fsf/cpp-Makefile bash-1.12-amiga/cpp-Makefile
  282. *** bash-1.12-fsf/cpp-Makefile    Sat Jan 25 22:16:31 1992
  283. --- bash-1.12-amiga/cpp-Makefile    Fri Nov 19 01:36:58 1993
  284. ***************
  285. *** 192,198 ****
  286.   SYSTEM_FLAGS = $(LINEBUF) $(VPRINTF) $(UNISTD) $(GROUPS) $(RESOURCE) \
  287.          $(SIGHANDLER) $(SYSDEP) $(WAITH) $(GETWD) $(DUP2) $(STRERROR) \
  288.          -D$(MACHINE) -D$(OS)
  289. ! DEBUG_FLAGS = $(PROFILE_FLAGS) -g
  290.   LDFLAGS    = $(NOSHARE) $(SYSDEP_LD) $(EXTRA_LD_PATH) $(DEBUG_FLAGS)
  291.   CFLAGS    = $(DEBUG_FLAGS) $(SYSTEM_FLAGS) -DSHELL $(ALLOCA_CFLAGS)
  292.   CPPFLAGS= -I$(LIBSRC)
  293. --- 192,198 ----
  294.   SYSTEM_FLAGS = $(LINEBUF) $(VPRINTF) $(UNISTD) $(GROUPS) $(RESOURCE) \
  295.          $(SIGHANDLER) $(SYSDEP) $(WAITH) $(GETWD) $(DUP2) $(STRERROR) \
  296.          -D$(MACHINE) -D$(OS)
  297. ! DEBUG_FLAGS = $(PROFILE_FLAGS)
  298.   LDFLAGS    = $(NOSHARE) $(SYSDEP_LD) $(EXTRA_LD_PATH) $(DEBUG_FLAGS)
  299.   CFLAGS    = $(DEBUG_FLAGS) $(SYSTEM_FLAGS) -DSHELL $(ALLOCA_CFLAGS)
  300.   CPPFLAGS= -I$(LIBSRC)
  301. ***************
  302. *** 224,230 ****
  303.       ($(LIBINC_DECL); cd directory; \
  304.        $(MAKE) $(MFLAGS) CPPFLAGS='$(CPPFLAGS)' \
  305.        CFLAGS='$(CFLAGS) '$(LIBINC_USAGE)' -I.' LDFLAGS='$(LDFLAGS)' \
  306. !      RANLIB='$(RANLIB)' AR='$(AR)' CC='$(CC)' DIRECTDEFINE='-D 'directory)
  307.   
  308.   /* Flags used when building libraries. */
  309.   LIBRARY_CFLAGS  = $(DEBUG_FLAGS) $(SIGHANDLER) $(ALLOCA_CFLAGS) \
  310. --- 224,230 ----
  311.       ($(LIBINC_DECL); cd directory; \
  312.        $(MAKE) $(MFLAGS) CPPFLAGS='$(CPPFLAGS)' \
  313.        CFLAGS='$(CFLAGS) '$(LIBINC_USAGE)' -I.' LDFLAGS='$(LDFLAGS)' \
  314. !      RANLIB='$(RANLIB)' AR='$(AR)' CC='$(CC)')
  315.   
  316.   /* Flags used when building libraries. */
  317.   LIBRARY_CFLAGS  = $(DEBUG_FLAGS) $(SIGHANDLER) $(ALLOCA_CFLAGS) \
  318. ***************
  319. *** 252,269 ****
  320.             -DMachineSystem="$(MachineSystem)"
  321.   #endif /* NotYet */
  322.   
  323. - /**/# The default primary and secondary prompts.
  324. - PPROMPT = '"${PROGRAM}\\$$ "'
  325. - SPROMPT = '"> "'
  326.   #if defined (MAINTAINER)
  327.   bash_maintainer = MAINTAINER
  328.   MAINTAIN_DEFINE = -DMAINTAINER='"$(bash_maintainer)"'
  329.   #endif
  330.   
  331.   /**/# The group of configuration flags.  These are for shell.c
  332. ! CFG_FLAGS = -DPPROMPT=$(PPROMPT) -DSPROMPT=$(SPROMPT) -DOS_NAME='"$(OS_NAME)"'\
  333. !         -DSYSTEM_NAME='$(SYSTEM_NAME)' $(SIGLIST_FLAG) $(MAINTAIN_DEFINE)
  334.   
  335.   /**/# The directory which contains the source for malloc.  The name must
  336.   /**/# end in a slash, as in "./lib/malloc/".
  337. --- 252,264 ----
  338.             -DMachineSystem="$(MachineSystem)"
  339.   #endif /* NotYet */
  340.   
  341.   #if defined (MAINTAINER)
  342.   bash_maintainer = MAINTAINER
  343.   MAINTAIN_DEFINE = -DMAINTAINER='"$(bash_maintainer)"'
  344.   #endif
  345.   
  346.   /**/# The group of configuration flags.  These are for shell.c
  347. ! CFG_FLAGS = $(SIGLIST_FLAG)
  348.   
  349.   /**/# The directory which contains the source for malloc.  The name must
  350.   /**/# end in a slash, as in "./lib/malloc/".
  351. diff -rc bash-1.12-fsf/general.h bash-1.12-amiga/general.h
  352. *** bash-1.12-fsf/general.h    Tue Jan 21 13:20:56 1992
  353. --- bash-1.12-amiga/general.h    Sat Nov 20 01:45:55 1993
  354. ***************
  355. *** 76,82 ****
  356.   #define FS_EXEC_PREFERRED 0x4
  357.   #define FS_EXEC_ONLY      0x8
  358.   
  359. ! extern char *xmalloc (), *malloc (), *xrealloc (), *realloc ();
  360.   extern char *itos ();
  361.   
  362.   #endif    /* _GENERAL_ */
  363. --- 76,83 ----
  364.   #define FS_EXEC_PREFERRED 0x4
  365.   #define FS_EXEC_ONLY      0x8
  366.   
  367. ! extern char *xmalloc (), *xrealloc ();
  368. ! extern void *malloc (), *realloc ();
  369.   extern char *itos ();
  370.   
  371.   #endif    /* _GENERAL_ */
  372. diff -rc bash-1.12-fsf/lib/glob/tilde.c bash-1.12-amiga/lib/glob/tilde.c
  373. *** bash-1.12-fsf/lib/glob/tilde.c    Thu Oct  3 16:22:17 1991
  374. --- bash-1.12-amiga/lib/glob/tilde.c    Sat Nov 20 14:57:16 1993
  375. ***************
  376. *** 30,35 ****
  377. --- 30,36 ----
  378.   #include <pwd.h>
  379.   
  380.   #ifndef savestring
  381. + extern char *strcpy();
  382.   #define savestring(x) (char *)strcpy (xmalloc (1 + strlen (x)), (x))
  383.   #endif
  384.   
  385. ***************
  386. *** 208,213 ****
  387. --- 209,219 ----
  388.       {
  389.         /* Prepend $HOME to the rest of the string. */
  390.         char *temp_home = (char *)getenv ("HOME");
  391. + #ifdef amigados
  392. +       /* Default $HOME to s:, which is the semi-traditional place
  393. +          for reconfiguration files and whatnot.  -fnf */
  394. +       temp_home = temp_home ? temp_home : "/s";
  395. + #endif
  396.   
  397.         temp_name = (char *)alloca (1 + strlen (&dirname[1])
  398.                         + (temp_home? strlen (temp_home) : 0));
  399. diff -rc bash-1.12-fsf/lib/readline/Makefile bash-1.12-amiga/lib/readline/Makefile
  400. *** bash-1.12-fsf/lib/readline/Makefile    Sun Nov  3 14:45:05 1991
  401. --- bash-1.12-amiga/lib/readline/Makefile    Fri Nov 19 01:36:59 1993
  402. ***************
  403. *** 6,11 ****
  404. --- 6,12 ----
  405.   
  406.   # Here is a rule for making .o files from .c files that doesn't force
  407.   # the type of the machine (like -sun3) into the flags.
  408.   .c.o:
  409.       $(CC) -c $(CFLAGS) $(LOCAL_INCLUDES) \
  410.           $(READLINE_DEFINES) $(CPPFLAGS) $*.c
  411. ***************
  412. *** 44,49 ****
  413. --- 45,53 ----
  414.   AR = ar
  415.   RM = rm
  416.   CP = cp
  417. + CC=gcc
  418. + CFLAGS=-O2 -DHAVE_UNISTD_H
  419.   
  420.   LOCAL_INCLUDES = -I../
  421.   
  422. diff -rc bash-1.12-fsf/lib/readline/readline.c bash-1.12-amiga/lib/readline/readline.c
  423. *** bash-1.12-fsf/lib/readline/readline.c    Sat Jan 25 17:47:30 1992
  424. --- bash-1.12-amiga/lib/readline/readline.c    Fri Nov 19 01:37:01 1993
  425. ***************
  426. *** 70,76 ****
  427.   #endif /* !_POSIX_VERSION */
  428.   
  429.   /* Posix systems use termios and the Posix signal functions. */
  430. ! #if defined (_POSIX_VERSION)
  431.   #  if !defined (TERMIOS_MISSING)
  432.   #    undef NEW_TTY_DRIVER
  433.   #    define TERMIOS_TTY_DRIVER
  434. --- 70,76 ----
  435.   #endif /* !_POSIX_VERSION */
  436.   
  437.   /* Posix systems use termios and the Posix signal functions. */
  438. ! #if defined (_POSIX_VERSION) && !defined (amigados)
  439.   #  if !defined (TERMIOS_MISSING)
  440.   #    undef NEW_TTY_DRIVER
  441.   #    define TERMIOS_TTY_DRIVER
  442. ***************
  443. *** 276,282 ****
  444. --- 276,286 ----
  445.   static FILE *in_stream, *out_stream;
  446.   
  447.   /* The names of the streams that we do input and output to. */
  448. + #ifdef amigados
  449. + FILE *rl_instream, *rl_outstream;
  450. + #else
  451.   FILE *rl_instream = stdin, *rl_outstream = stdout;
  452. + #endif /* amigados */
  453.   
  454.   /* Non-zero means echo characters as they are read. */
  455.   int readline_echoing_p = 1;
  456. ***************
  457. *** 4007,4012 ****
  458. --- 4011,4017 ----
  459.     return (strcmp (*s1, *s2));
  460.   }
  461.   
  462. + #ifndef amigados
  463.   /* A completion function for usernames.
  464.      TEXT contains a partial username preceded by a random
  465.      character (usually `~').  */
  466. ***************
  467. *** 4061,4066 ****
  468. --- 4066,4072 ----
  469.         return (value);
  470.       }
  471.   }
  472. + #endif /* amigados */
  473.   
  474.   /* **************************************************************** */
  475.   /*                                    */
  476. diff -rc bash-1.12-fsf/machines.h bash-1.12-amiga/machines.h
  477. *** bash-1.12-fsf/machines.h    Fri Jan 17 17:42:24 1992
  478. --- bash-1.12-amiga/machines.h    Fri Nov 19 01:37:02 1993
  479. ***************
  480. *** 817,828 ****
  481.   #undef    USE_GNU_MALLOC
  482.   #endif /* drs6000 */
  483.   
  484.   /* ******************************************** */
  485.   /*                        */
  486.   /*  System V Release 4 on the Commodore Amiga   */
  487.   /*                        */
  488.   /* ******************************************** */
  489. ! #if defined (amiga)
  490.   #define M_MACHINE "amiga"
  491.   #define M_OS USG
  492.   #define SYSDEP_CFLAGS -DUSGr4
  493. --- 817,852 ----
  494.   #undef    USE_GNU_MALLOC
  495.   #endif /* drs6000 */
  496.   
  497. + /* **************************************************************** */
  498. + /*                                    */
  499. + /*  Commodore Amiga running AmigaDOS                       */
  500. + /*                                    */
  501. + /* **************************************************************** */
  502. + #if defined(amigados)
  503. + #define M_MACHINE "amiga"
  504. + #define M_OS Bsd
  505. + #if !defined (HAVE_GCC)
  506. + # define HAVE_GCC
  507. + #endif /* HAVE_GCC */
  508. + #define SYSDEP_CFLAGS -O2
  509. + #define REQUIRED_LIBRARIES
  510. + #define HAVE_SYS_SIGLIST
  511. + #define HAVE_ALLOCA
  512. + #undef USE_GNU_MALLOC
  513. + #undef  HAVE_SETLINEBUF
  514. + #define HAVE_VFPRINTF
  515. + #if !defined (HAVE_RESOURCE)
  516. + #  define HAVE_RESOURCE
  517. + #endif
  518. + #endif  /* Commodore Amiga running AmigaDOS */
  519.   /* ******************************************** */
  520.   /*                        */
  521.   /*  System V Release 4 on the Commodore Amiga   */
  522.   /*                        */
  523.   /* ******************************************** */
  524. ! #if defined (amiga) && !defined(amigados)
  525.   #define M_MACHINE "amiga"
  526.   #define M_OS USG
  527.   #define SYSDEP_CFLAGS -DUSGr4
  528. diff -rc bash-1.12-fsf/nojobs.c bash-1.12-amiga/nojobs.c
  529. *** bash-1.12-fsf/nojobs.c    Tue Jan 21 00:27:03 1992
  530. --- bash-1.12-amiga/nojobs.c    Sat Nov 20 14:28:23 1993
  531. ***************
  532. *** 54,60 ****
  533.   #  define siginterrupt(sig, code)
  534.   #endif /* USG */
  535.   
  536. ! #if defned (_POSIX_VERSION)
  537.   #  define WAITPID(pid, statusp, options) waitpid (pid, statusp, options)
  538.   #else
  539.   #  define WAITPID(pid, statusp, options) wait (statusp)
  540. --- 54,60 ----
  541.   #  define siginterrupt(sig, code)
  542.   #endif /* USG */
  543.   
  544. ! #if defined (_POSIX_VERSION)
  545.   #  define WAITPID(pid, statusp, options) waitpid (pid, statusp, options)
  546.   #else
  547.   #  define WAITPID(pid, statusp, options) wait (statusp)
  548. ***************
  549. *** 130,143 ****
  550.     retry_fork:
  551.   #endif /* _POSIX_VERSION */
  552.   
  553.     if ((pid = fork ()) < 0)
  554.       {
  555.   #if defined (_POSIX_VERSION)
  556.         /* Posix systems with a non-blocking waitpid () system call available
  557.        get another chance after zombies are reaped. */
  558.         if (errno == EAGAIN && retry)
  559.       {
  560. !       reap_zombie_chilren ();
  561.         retry = 0;
  562.         goto retry_fork;
  563.       }
  564. --- 130,148 ----
  565.     retry_fork:
  566.   #endif /* _POSIX_VERSION */
  567.   
  568. + #ifdef amigados
  569. +   if ((pid = vfork ()) < 0)
  570. + #else
  571.     if ((pid = fork ()) < 0)
  572. + #endif /* amigados */
  573.       {
  574.   #if defined (_POSIX_VERSION)
  575.         /* Posix systems with a non-blocking waitpid () system call available
  576.        get another chance after zombies are reaped. */
  577.         if (errno == EAGAIN && retry)
  578.       {
  579. !       reap_zombie_children ();
  580.         retry = 0;
  581.         goto retry_fork;
  582.       }
  583. diff -rc bash-1.12-fsf/support/getcppsyms.c bash-1.12-amiga/support/getcppsyms.c
  584. *** bash-1.12-fsf/support/getcppsyms.c    Thu Jan  9 04:33:05 1992
  585. --- bash-1.12-amiga/support/getcppsyms.c    Sat Nov 20 01:38:43 1993
  586. ***************
  587. *** 305,310 ****
  588. --- 305,316 ----
  589.   #if defined (vax)
  590.     printf (" -Dvax");
  591.   #endif /* vax */
  592. + #if defined (amiga)
  593. +   printf (" -Damiga");
  594. + #endif
  595. + #if defined (amigados)
  596. +   printf (" -Damigados");
  597. + #endif
  598.   
  599.     printf ("\n");
  600.     exit (0);
  601. diff -rc bash-1.12-fsf/support/mksysdefs bash-1.12-amiga/support/mksysdefs
  602. *** bash-1.12-fsf/support/mksysdefs    Thu Jan  9 03:45:08 1992
  603. --- bash-1.12-amiga/support/mksysdefs    Sat Nov 20 01:34:36 1993
  604. ***************
  605. *** 43,62 ****
  606.   fi
  607.   
  608.   # Get name of maintainer.
  609. ! if (whoami) >/dev/null 2>&1 && (hostname) >/dev/null 2>&1; then
  610. !   WHOAMI=`whoami`@`hostname`;
  611. ! else
  612. !   WHOAMI=`who am i | awk '{ print $1; }'`
  613. ! fi
  614. ! if [ "$WHOAMI" = "" ]; then 
  615. !   WHOAMI=`id | sed 's/uid=[01-9]*(//' | sed 's/) [) A-Za-z01-9(=,]*//'`
  616. !   if (hostname) >/dev/null 2>&1; then
  617. !     WHOAMI=$WHOAMI@`hostname`
  618. !   elif test -f /usr/bin/uuname -o -f /bin/uuname; then
  619. !     WHOAMI=`uuname -l`!$WHOAMI
  620. !   fi
  621. ! fi
  622.   
  623.   if [ "$WHOAMI" = "" ]; then
  624.     WHOAMI=root
  625. --- 43,62 ----
  626.   fi
  627.   
  628.   # Get name of maintainer.
  629. ! # if (whoami) >/dev/null 2>&1 && (hostname) >/dev/null 2>&1; then
  630. ! #   WHOAMI=`whoami`@`hostname`;
  631. ! # else
  632. ! #   WHOAMI=`who am i | awk '{ print $1; }'`
  633. ! # fi
  634. ! # 
  635. ! # if [ "$WHOAMI" = "" ]; then 
  636. ! #   WHOAMI=`id | sed 's/uid=[01-9]*(//' | sed 's/) [) A-Za-z01-9(=,]*//'`
  637. ! #   if (hostname) >/dev/null 2>&1; then
  638. ! #     WHOAMI=$WHOAMI@`hostname`
  639. ! #   elif test -f /usr/bin/uuname -o -f /bin/uuname; then
  640. ! #     WHOAMI=`uuname -l`!$WHOAMI
  641. ! #   fi
  642. ! # fi
  643.   
  644.   if [ "$WHOAMI" = "" ]; then
  645.     WHOAMI=root
  646. diff -rc bash-1.12-fsf/trap.c bash-1.12-amiga/trap.c
  647. *** bash-1.12-fsf/trap.c    Mon Jan 20 04:35:49 1992
  648. --- bash-1.12-amiga/trap.c    Fri Nov 19 01:37:05 1993
  649. ***************
  650. *** 289,295 ****
  651.   /* Non-zero when we catch a trapped signal. */
  652.   static int catch_flag = 0;
  653.   
  654. ! #if !defined (USG) && !defined (USGr4)
  655.   #define HAVE_BSD_SIGNALS
  656.   #endif
  657.   
  658. --- 289,295 ----
  659.   /* Non-zero when we catch a trapped signal. */
  660.   static int catch_flag = 0;
  661.   
  662. ! #if !defined (USG) && !defined (USGr4) && !defined(amigados)
  663.   #define HAVE_BSD_SIGNALS
  664.   #endif
  665.   
  666. diff -rc bash-1.12-fsf/y.tab.c bash-1.12-amiga/y.tab.c
  667. *** bash-1.12-fsf/y.tab.c    Sat Jan 25 18:52:54 1992
  668. --- bash-1.12-amiga/y.tab.c    Fri Nov 19 01:37:07 1993
  669. ***************
  670. *** 1,6 ****
  671. --- 1,8 ----
  672.   
  673.   /*  A Bison parser, made from parse.y  */
  674.   
  675. + #define YYBISON 1  /* Identify Bison output.  */
  676.   #define    IF    258
  677.   #define    THEN    259
  678.   #define    ELSE    260
  679. ***************
  680. *** 233,246 ****
  681.      473,   480,   489,   491,   493,   495,   497,   499,   506,   509
  682.   };
  683.   
  684. ! static const char * const yytname[] = {   "$",
  685. ! "error","$illegal.","IF","THEN","ELSE","ELIF","FI","CASE","ESAC","FOR",
  686. ! "WHILE","UNTIL","DO","DONE","FUNCTION","IN","BANG","WORD","NUMBER","AND_AND",
  687. ! "OR_OR","GREATER_GREATER","LESS_LESS","LESS_AND","GREATER_AND","SEMI_SEMI","LESS_LESS_MINUS","AND_GREATER","LESS_GREATER","GREATER_BAR",
  688. ! "'&'","';'","'\\n'","yacc_EOF","'|'","'>'","'<'","'-'","'{'","'}'",
  689. ! "'('","')'","inputunit","words","redirection","simple_command_element","redirections","simple_command","command","shell_command",
  690. ! "shell_command_1","if_command","group_command","elif_clause","case_clause_1","pattern_list_1","case_clause_sequence","pattern_list","pattern","list",
  691. ! "list0","list1","list_terminator","newlines","simple_list","simple_list1","pipeline",""
  692.   };
  693.   #endif
  694.   
  695. --- 235,250 ----
  696.      473,   480,   489,   491,   493,   495,   497,   499,   506,   509
  697.   };
  698.   
  699. ! static const char * const yytname[] = {   "$","error","$illegal.","IF","THEN",
  700. ! "ELSE","ELIF","FI","CASE","ESAC","FOR","WHILE","UNTIL","DO","DONE","FUNCTION",
  701. ! "IN","BANG","WORD","NUMBER","AND_AND","OR_OR","GREATER_GREATER","LESS_LESS",
  702. ! "LESS_AND","GREATER_AND","SEMI_SEMI","LESS_LESS_MINUS","AND_GREATER","LESS_GREATER",
  703. ! "GREATER_BAR","'&'","';'","'\\n'","yacc_EOF","'|'","'>'","'<'","'-'","'{'","'}'",
  704. ! "'('","')'","inputunit","words","redirection","simple_command_element","redirections",
  705. ! "simple_command","command","shell_command","shell_command_1","if_command","group_command",
  706. ! "elif_clause","case_clause_1","pattern_list_1","case_clause_sequence","pattern_list",
  707. ! "pattern","list","list0","list1","list_terminator","newlines","simple_list",
  708. ! "simple_list1","pipeline",""
  709.   };
  710.   #endif
  711.   
  712. ***************
  713. *** 448,454 ****
  714.       -1,    36,    37
  715.   };
  716.   /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
  717. ! #line 3 "/usr/gnu/lib/bison.simple"
  718.   
  719.   /* Skeleton output parser for bison,
  720.      Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman
  721. --- 452,458 ----
  722.       -1,    36,    37
  723.   };
  724.   /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
  725. ! #line 3 "bison.simple"
  726.   
  727.   /* Skeleton output parser for bison,
  728.      Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman
  729. ***************
  730. *** 471,485 ****
  731.   #ifndef alloca
  732.   #ifdef __GNUC__
  733.   #define alloca __builtin_alloca
  734. ! #else /* Not GNU C.  */
  735.   #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__)
  736.   #include <alloca.h>
  737. ! #else /* Not sparc */
  738. ! #ifdef MSDOS
  739.   #include <malloc.h>
  740. ! #endif /* MSDOS */
  741. ! #endif /* Not sparc.  */
  742. ! #endif /* Not GNU C.  */
  743.   #endif /* alloca not defined.  */
  744.   
  745.   /* This is the parser code that is written into each bison parser
  746. --- 475,494 ----
  747.   #ifndef alloca
  748.   #ifdef __GNUC__
  749.   #define alloca __builtin_alloca
  750. ! #else /* not GNU C.  */
  751.   #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__)
  752.   #include <alloca.h>
  753. ! #else /* not sparc */
  754. ! #if defined (MSDOS) && !defined (__TURBOC__)
  755. ! #include <malloc.h>
  756. ! #else /* not MSDOS, or __TURBOC__ */
  757. ! #if defined(_AIX)
  758.   #include <malloc.h>
  759. !  #pragma alloca
  760. ! #endif /* not _AIX */
  761. ! #endif /* not MSDOS, or __TURBOC__ */
  762. ! #endif /* not sparc.  */
  763. ! #endif /* not GNU C.  */
  764.   #endif /* alloca not defined.  */
  765.   
  766.   /* This is the parser code that is written into each bison parser
  767. ***************
  768. *** 491,496 ****
  769. --- 500,749 ----
  770.      It is replaced by the list of actions, each action
  771.      as one case of the switch.  */
  772.   
  773. + #ifdef AMIGA
  774. + #define bzero(b, length) memset((b),'\0',(length))
  775. + #define bcopy(b1, b2, length) memcpy((b1),(b2),(length))
  776. + #define bcmp(b1, b2, length)  memcmp((b1),(b2),(length))
  777. + #include <stdlib.h>
  778. + /* extern char *calloc();*/
  779. + /* extern void done();*/
  780. + /* extern char *program_name;*/
  781. + #ifdef Phil.B_not_to_be_included
  782. + char *
  783. + mallocate(n)
  784. + register unsigned n;
  785. + {
  786. +   register char *block;
  787. +   /* Avoid uncertainty about what an arg of 0 will do.  */
  788. +   if (n == 0)
  789. +     n = 1;
  790. +   block = calloc(n,1);
  791. +   if (block == NULL)
  792. +     {
  793. +       fprintf(stderr, "Bison: memory exhausted\n");
  794. +       /*done(1);*/ exit(1);
  795. +     }
  796. +   return (block);
  797. + }
  798. + /* This name is used by alloca.c.  */
  799. + char *
  800. + xmalloc (n)
  801. +      unsigned int n;
  802. + {
  803. +   return mallocate (n);
  804. + }
  805. + #endif
  806. + /*
  807. +     alloca -- (mostly) portable public-domain implementation -- D A Gwyn
  808. +     last edit:    86/05/30    rms
  809. +        include config.h, since on VMS it renames some symbols.
  810. +        Use xmalloc instead of malloc.
  811. +     This implementation of the PWB library alloca() function,
  812. +     which is used to allocate space off the run-time stack so
  813. +     that it is automatically reclaimed upon procedure exit, 
  814. +     was inspired by discussions with J. Q. Johnson of Cornell.
  815. +     It should work under any C implementation that uses an
  816. +     actual procedure stack (as opposed to a linked list of
  817. +     frames).  There are some preprocessor constants that can
  818. +     be defined when compiling for your specific system, for
  819. +     improved efficiency; however, the defaults should be okay.
  820. +     The general concept of this implementation is to keep
  821. +     track of all alloca()-allocated blocks, and reclaim any
  822. +     that are found to be deeper in the stack than the current
  823. +     invocation.  This heuristic does not reclaim storage as
  824. +     soon as it becomes invalid, but it will do so eventually.
  825. +     As a special case, alloca(0) reclaims storage without
  826. +     allocating any.  It is a good idea to use alloca(0) in
  827. +     your main control loop, etc. to force garbage collection.
  828. + */
  829. + #ifndef lint
  830. + static char    SCCSid[] = "@(#)alloca.c    1.1";    /* for the "what" utility */
  831. + #endif
  832. + #ifdef emacs
  833. + #include "config.h"
  834. + #ifdef static
  835. + /* actually, only want this if static is defined as ""
  836. +    -- this is for usg, in which emacs must undefine static
  837. +    in order to make unexec workable
  838. +    */
  839. + #ifndef STACK_DIRECTION
  840. + you
  841. + lose
  842. + -- must know STACK_DIRECTION at compile-time
  843. + #endif /* STACK_DIRECTION undefined */
  844. + #endif /* static */
  845. + #endif /* emacs */
  846. + #ifdef __STDC__
  847. + typedef void    *pointer;        /* generic pointer type */
  848. + #else
  849. + typedef char    *pointer;        /* generic pointer type */
  850. + #endif
  851. + extern void    free();
  852. + /* extern pointer    xmalloc();*/
  853. + /*
  854. +     Define STACK_DIRECTION if you know the direction of stack
  855. +     growth for your system; otherwise it will be automatically
  856. +     deduced at run-time.
  857. +     STACK_DIRECTION > 0 => grows toward higher addresses
  858. +     STACK_DIRECTION < 0 => grows toward lower addresses
  859. +     STACK_DIRECTION = 0 => direction of growth unknown
  860. + */
  861. + #ifndef STACK_DIRECTION
  862. + #define    STACK_DIRECTION    0        /* direction unknown */
  863. + #endif
  864. + #if STACK_DIRECTION != 0
  865. + #define    STACK_DIR    STACK_DIRECTION    /* known at compile-time */
  866. + #else    /* STACK_DIRECTION == 0; need run-time code */
  867. + static int    stack_dir;        /* 1 or -1 once known */
  868. + #define    STACK_DIR    stack_dir
  869. + static void
  870. + find_stack_direction (/* void */)
  871. + {
  872. +   static char    *addr = NULL;    /* address of first
  873. +                    `dummy', once known */
  874. +   auto char    dummy;        /* to get stack address */
  875. +   if (addr == NULL)
  876. +     {                /* initial entry */
  877. +       addr = &dummy;
  878. +       find_stack_direction ();    /* recurse once */
  879. +     }
  880. +   else                /* second entry */
  881. +     if (&dummy > addr)
  882. +       stack_dir = 1;        /* stack grew upward */
  883. +     else
  884. +       stack_dir = -1;        /* stack grew downward */
  885. + }
  886. + #endif    /* STACK_DIRECTION == 0 */
  887. + /*
  888. +     An "alloca header" is used to:
  889. +     (a) chain together all alloca()ed blocks;
  890. +     (b) keep track of stack depth.
  891. +     It is very important that sizeof(header) agree with malloc()
  892. +     alignment chunk size.  The following default should work okay.
  893. + */
  894. + #ifndef    ALIGN_SIZE
  895. + #define    ALIGN_SIZE    sizeof(double)
  896. + #endif
  897. + typedef union hdr
  898. + {
  899. +   char    align[ALIGN_SIZE];    /* to force sizeof(header) */
  900. +   struct
  901. +     {
  902. +       union hdr *next;        /* for chaining headers */
  903. +       char *deep;        /* for stack depth measure */
  904. +     } h;
  905. + } header;
  906. + /*
  907. +     alloca( size ) returns a pointer to at least `size' bytes of
  908. +     storage which will be automatically reclaimed upon exit from
  909. +     the procedure that called alloca().  Originally, this space
  910. +     was supposed to be taken from the current stack frame of the
  911. +     caller, but that method cannot be made to work for some
  912. +     implementations of C, for example under Gould's UTX/32.
  913. + */
  914. + static header *last_alloca_header = NULL; /* -> last alloca header */
  915. + pointer
  916. + alloca (size)            /* returns pointer to storage */
  917. +      unsigned    size;        /* # bytes to allocate */
  918. + {
  919. +   auto char    probe;        /* probes stack depth: */
  920. +   register char    *depth = &probe;
  921. + #if STACK_DIRECTION == 0
  922. +   if (STACK_DIR == 0)        /* unknown growth direction */
  923. +     find_stack_direction ();
  924. + #endif
  925. +                 /* Reclaim garbage, defined as all alloca()ed storage that
  926. +                    was allocated from deeper in the stack than currently. */
  927. +   {
  928. +     register header    *hp;    /* traverses linked list */
  929. +     for (hp = last_alloca_header; hp != NULL;)
  930. +       if ((STACK_DIR > 0 && hp->h.deep > depth)
  931. +       || (STACK_DIR < 0 && hp->h.deep < depth))
  932. +     {
  933. +       register header    *np = hp->h.next;
  934. +       free ((pointer) hp);    /* collect garbage */
  935. +       hp = np;        /* -> next header */
  936. +     }
  937. +       else
  938. +     break;            /* rest are not deeper */
  939. +     last_alloca_header = hp;    /* -> last valid storage */
  940. +   }
  941. +   if (size == 0)
  942. +     return NULL;        /* no allocation required */
  943. +   /* Allocate combined header + user data storage. */
  944. +   {
  945. +     register pointer    new = xmalloc (sizeof (header) + size);
  946. +     /* address of header */
  947. +     ((header *)new)->h.next = last_alloca_header;
  948. +     ((header *)new)->h.deep = depth;
  949. +     last_alloca_header = (header *)new;
  950. +     /* User storage begins just after header. */
  951. +     return (pointer)((char *)new + sizeof(header));
  952. +   }
  953. + }
  954. + #endif
  955.   #define yyerrok        (yyerrstatus = 0)
  956.   #define yyclearin    (yychar = YYEMPTY)
  957.   #define YYEMPTY        -2
  958. ***************
  959. *** 570,575 ****
  960. --- 823,831 ----
  961.   #define YYMAXDEPTH 10000
  962.   #endif
  963.   
  964. + #if __GNUC__ > 1        /* GNU C and GNU C++ define this.  */
  965. + #define __yy_bcopy(FROM,TO,COUNT)    __builtin_memcpy(TO,FROM,COUNT)
  966. + #else                /* not GNU C or C++ */
  967.   #ifndef __cplusplus
  968.   
  969.   /* This is the most reliable way to avoid incompatibilities
  970. ***************
  971. *** 604,611 ****
  972.   }
  973.   
  974.   #endif
  975.   
  976. ! #line 160 "/usr/gnu/lib/bison.simple"
  977.   int
  978.   yyparse()
  979.   {
  980. --- 860,868 ----
  981.   }
  982.   
  983.   #endif
  984. + #endif
  985.   
  986. ! #line 169 "bison.simple"
  987.   int
  988.   yyparse()
  989.   {
  990. ***************
  991. *** 623,631 ****
  992.     YYSTYPE *yyvs = yyvsa;    /*  to allow yyoverflow to reallocate them elsewhere */
  993.   
  994.   #ifdef YYLSP_NEEDED
  995.     YYLTYPE *yyls = yylsa;
  996.     YYLTYPE *yylsp;
  997. -   YYLTYPE yylsa[YYINITDEPTH];    /*  the location stack            */
  998.   
  999.   #define YYPOPSTACK   (yyvsp--, yysp--, yylsp--)
  1000.   #else
  1001. --- 880,888 ----
  1002.     YYSTYPE *yyvs = yyvsa;    /*  to allow yyoverflow to reallocate them elsewhere */
  1003.   
  1004.   #ifdef YYLSP_NEEDED
  1005. +   YYLTYPE yylsa[YYINITDEPTH];    /*  the location stack            */
  1006.     YYLTYPE *yyls = yylsa;
  1007.     YYLTYPE *yylsp;
  1008.   
  1009.   #define YYPOPSTACK   (yyvsp--, yysp--, yylsp--)
  1010.   #else
  1011. ***************
  1012. *** 788,794 ****
  1013.   
  1014.   #if YYDEBUG != 0
  1015.         if (yydebug)
  1016. !     fprintf(stderr, "Next token is %d (%s)\n", yychar, yytname[yychar1]);
  1017.   #endif
  1018.       }
  1019.   
  1020. --- 1045,1059 ----
  1021.   
  1022.   #if YYDEBUG != 0
  1023.         if (yydebug)
  1024. !     {
  1025. !       fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
  1026. !       /* Give the individual parser a way to print the precise meaning
  1027. !          of a token, for further debugging info.  */
  1028. ! #ifdef YYPRINT
  1029. !       YYPRINT (stderr, yychar, yylval);
  1030. ! #endif
  1031. !       fprintf (stderr, ")\n");
  1032. !     }
  1033.   #endif
  1034.       }
  1035.   
  1036. ***************
  1037. *** 1386,1392 ****
  1038.       break;}
  1039.   }
  1040.      /* the action file gets copied in in place of this dollarsign */
  1041. ! #line 423 "/usr/gnu/lib/bison.simple"
  1042.   
  1043.     yyvsp -= yylen;
  1044.     yyssp -= yylen;
  1045. --- 1651,1657 ----
  1046.       break;}
  1047.   }
  1048.      /* the action file gets copied in in place of this dollarsign */
  1049. ! #line 440 "bison.simple"
  1050.   
  1051.     yyvsp -= yylen;
  1052.     yyssp -= yylen;
  1053.