🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by keith%tira Tue, 13 Jun 1989 17:22
Some bash bugs
#63
Author: keith%tira
Date: Tue, 13 Jun 1989 17:22
110 lines
4544 bytes
Hi!

I've found a number of bugs in bash -- compile-time problems actually.
I'm compiling for SunOS 4.0 on a Sun 4 (sparc) using Sun's cc.  I'm
enclosing the relevant parts of the Makefile at the end of this list.
I'm not sending you diffs because I cheated in my fixes (I just
commented out one or the other of the inconsistencies at random to
get it to compile).  So far, bash looks like it works fine.  I have to
say that it looks pretty much like the best of all three (sh/csh/ksh)
worlds.  Thanks!

[If you want more info or actual diffs or something, let me know.]

Most of the problems have to do with inconsistent declarations of functions.

1. get_string_value used (and implicitly declared int ()) prior to the
inclusion of variables.h, which declares it char *():

    $ egrep -n 'get_string_value|variables\.h' readline.[ch]
    readline.c:241:      rl_reset_terminal (get_string_value ("TERM"));
    readline.c:2152:#include "variables.h"
    readline.c:2582:      path = get_string_value ("PATH");
    readline.c:2840:          /* KDW: char *get_string_value (); */
    readline.c:2841:          temp_home = get_string_value ("HOME");
    readline.c:2873:              /* KDW: char *get_string_value (); */
    readline.c:2877:                tp = get_string_value ("PWD");
    readline.c:2879:                tp = get_string_value ("OLDPWD");

2. A couple missing \n\'s in builtins.c causes a newline in string
constant error, near line 364.

3. rl_handle_sigwinch forward-declared static near line 68 in readline.c
Can you do this in ANSI C??

4. move_cursor_relative forward-declared static near line 726 in
readline.c.

5. throw_to_top_level forward-declared Sighandler on line 528 in
shell.c and implicitly declared int later.

6. termination_unwind_protect forward-declared Sighandler on line 756 in
shell.c and implicitly declared int later.

The pertinent parts of my makefile follow:

----- Makefile (extracts) -----
# Of course, you cannot do this the first time through...
#SHELL=/usr/gnu/bin/bash
SHELL=/bin/sh

MAINTAINER = '"keith@curry.uchicago.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/local/bin

# The name of the target hardware.  It makes a difference.  If your
# machine doesn't seem to be represented by one of the machines here,
# try one and see how well you do.
# SUN3, SUN4, VAX, SONY, CONVEX, HP, HP9KS300
TARGET = SUN4

# The name of the target operating system.  There isn't such a big
# 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
# that doesn't do enough backups, or does a poor job.  In that
# case, BACKUP_DIR should be the name of a directory on another
# device (i.e. different than the one you are building the shell
# on), and you should do `make backup' at least once a day.
BACKUP_DIR = /usr/gnu/backups

# PROFILE_FLAGS is either -pg, to generate profiling info for use
# with gprof, or nothing (the default).
PROFILE_FLAGS=

# 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) 
CFLAGS = $(DEBUG_FLAGS) -D${TARGET} -DTARGET=${TARGET} -D${OS}

# The name of the termcap library.  /usr/local/lib/gnutermcap?
TERMCAP = termcap

# If you don't have Bison use "yacc".  Otherwise use "bison -y".
BISON = yacc

# If you don't have Gcc use cc.
GCC = cc

# Make TRADITIONAL be `-traditional' if you are using Gcc 1.2x
# or greater.
TRADITIONAL = 
#
####################################################################

# Don't change this one, change the one above it.
CC = $(GCC)
----- End of Makefile extracts -----



Keith Waclena                             keith@curry.uchicago.edu
TIRA / U of Chicago	                  keith%curry@uchimvs1.bitnet
1100 E.57th.St Chi IL 60637               ...uunet!curry.uchicago.edu!keith
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