🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by wbader Wed, 27 Jan 1993 03:19
bash, sco unix and sco xenix
#1002
Author: wbader
Date: Wed, 27 Jan 1993 03:19
93 lines
2984 bytes
Changes to build bash-1.12 under SCO Unix 3.2v4.0:

In the M_UNIX section of machines.h:

#    if !defined (HAVE_GCC)
#      define REQUIRED_LIBRARIES -lPW -lmalloc -lc_s
#    endif /* !HAVE_GCC */

SCO Unix has alloca() in -lPW.
malloc pulls in a faster malloc than the one in -lc
-lc_s uses a shared library version of the c runtimes

jobs.c:

The ' #if defined (SCO) ' sections make bash hang on the call to waitpid.
I removed the SCO conditional code, and bash no longer hangs.
Apparently, SCO fixed the sigsuspend() call in 3.2v4.0, and somehow broke
something that the workaround uses.

lib/readline/readline.c:

*** readline.c-	Mon Jan 25 15:21:13 1993
--- readline.c	Tue Jan 26 14:29:50 1993
***************
*** 4530,4533 ****
--- 4530,4537 ----
    int reverse = (direction < 0);
  
+ #if 1
+   int pre_search = 0;
+ #endif
+ 
    /* Create an arrary of pointers to the lines that we want to search. */
    maybe_replace_line ();
***************
*** 4560,4565 ****
--- 4564,4576 ----
  
    /* Initialize search parameters. */
+ #if 1
+   strncpy(search_string, the_line, 127);
+   search_string[127] = '\0';
+   search_string_index = strlen(search_string);
+   if (direction < 0 && rl_point > 0) { pre_search = 1; rl_point = 0; }
+ #else
    *search_string = '\0';
    search_string_index = 0;
+ #endif
  
    /* Normalize DIRECTION into 1 or -1. */
***************
*** 4576,4579 ****
--- 4587,4593 ----
    while (!done)
      {
+ #if 1
+       if (pre_search) { c = -1; pre_search = 0; } else
+ #endif
        c = rl_read_key ();
  
So history searches start with the text already on the line as the pattern.


changes for SCO Xenix 2.3.3:

machines.h:

Xenix 2.3 should not use -DREVERSED_SETVBUF_ARGS.
Only Xenix 2.2 has them reversed.

Xenix 2.3 does not have getwd(), and should #undef HAVE_GETWD.

readline.c:

Added Xenix to list of systems that #undef HAVE_BSD_SIGNALS.

----------------------------------------

How hard would it be to add
((...))  (for quoted expressions, equivalent to let "...") and
[[...]]  (shorthand for test. evaluates an expression and returns 0 for true)
These two changes would allow bash to run more ksh scripts.


William Bader
Software Consulting Services
3162 Bath Pike
Nazareth, PA  18064
phone: 215-837-8485
fax:   215-837-8080
email: wbader@scarecrow.csee.lehigh.edu,
       wbader@einstein.mse.lehigh.edu,
       lehi3b15.csee.lehigh.edu!batman!bader
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads