Thread View: gnu.bash.bug
1 messages
1 total messages
Started by Martin Walker
Sat, 12 Dec 1992 19:01
Patches for SCO ODT 2.0.0 and Unix 3.2.4
Author: Martin Walker
Date: Sat, 12 Dec 1992 19:01
Date: Sat, 12 Dec 1992 19:01
1029 lines
38286 bytes
38286 bytes
How to get BASH 1.12 working on SCO Unix 3.2.4 and SCO ODT 2.0.0
----------------------------------------------------------------
You will need:
a) GCC 2.3.2 with sources
b) GDB 4.7 with sources
c) Bash 1.12 with sources (no kidding?)
How to do it:
a) Unshar the shell archive below. This will result in 5 files:
1) i386sco4.h
2) bash.scodiff
3) readline.scodiff
4) include.scodiff
5) gdb47.scodiff
b) Copy the following header files from /usr/include to /usr/local/include,
or where-ever your local include directory is for GCC:
regex.h stdio.h string.h termios.h tinfo.h unistd.h sys/times.h sys/types.h
Apply the patch in include.scodiff to these include files. This will
fix a few problems which I have encountered when using GCC. A new file
called sys/ptrace.h will be created. This is used for GDB. Read on ...
c) Make GCC using my replacement i386sco4.h. I know that RMS did not like
the patches that I made to this file, because it sets the __STDC__ value
directly. However, this file has worked perfectly for me, and I have
compiled just about every GNU product using it. Although it might not
be wise to have GCC working differently from one machine to another,
I *do* think it is wise to have it working at all. With this header file
I do not need to specify any weird and wonderful flags to GCC. I just
make all GNU products using gcc -O5 -s. I am busy trying to figure out
a more ideal solution to the SCO problem, and as soon as I have worked
around all of SCO's include file bugs and funnies, I will give RMS a
more suitable patch for GCC.
You are in a maze of pre-processor conditionals, all alike ...
Use: ./configure i386-sco3.2v4
d) While you have GDB's source unpacked, apply the patch in gdb47.scodiff
and compile GDB. This patch adds SCO core file support, and the ability
to attach to processes. Next, apply readline.scodiff in the readline
directory. This will enable the home/end keys in readline, which will
move to the beginning and end of the current line, respectively. It also
maps C-x-R to and C-x-S to rl_reverse_search_history and
rl_forward_search_history. This is because the default for the forward
search is C-s, which is the XOFF character, and stops input from your
terminal.
Use: ./configure i386-sco3.2v4
e) Copy the entire readline tree from GDB to where-ever the bash source is
installed. This is not strictly necessary, but the readline library in
GDB 4.7 is later than the one provided in bash, and has a few bugs fixed.
Copy glob.c, tilde.c and sysdep-sco.h to the lib/glob directory in bash.
This also updates the versions of these files. Move sysdep-sco.h to
sysdep.h. Be sure to remove all the files in the original readline
directory before you copy the new one from GDB across.
f) Apply the patch bash.scodiff in the bash source tree. Now simply do a
make, and everything should work.
make CC="gcc -O5 -s"
I personally stopped the make just after bash-Makefile was generated and
removed the -g from the compile command line. I don't need debugging
info in *my* shell thank you very much!
A note about the BASH patches:
------------------------------
This patch is really very simple. All it does is enable job control in
the shell, and modifies the prompt display format a little. I have always
had my Korn shell set up to display PWD as part of my prompt. In the Korn
shell, this is a bit difficult. However, it had one nice feature: if PWD
was longer than 20 characters, it abbreviated the prompt to have ... in
front of the path. This is especially nice if you have very deep directory
structures. The way bash was handling this by default, meant that my prompt
was longer than 60 characters at times, and then the rest of the command
line becomes totally obfuscate by the prompt. This patch puts in a check
for long prompts, and if the PWD is longer than 20 characters, it will
chop off the excess characters and precede the prompt with ....
If you don't want this "feature" enabled, simply copy general.c.orig
back over general.c.
You do not have to use the GDB readline library if you don't want to. The
one provided with BASH works, but has a few bugs (notably when processing
.inputrc).
The only other mod made was to ensure that .bashrc DOES get executed on
login, as the comments in the code say it should.
I hope these patches help all who are trying to use bash. If you are
running SCO and you do NOT use bash, you should have your head read. It
is very much better than any of the standard shells.
If you have any queries about these patches, please address them to me
at maw@netcom.netcom.com, or phone me on:
+27-12-342-1145 (W) GMT-2
+27-12-803-7036 (H) GMT-2
Regards,
Kean Johnston
----------------------------> cut here < ---------------------------------
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# The tool that generated this appeared in the comp.sources.unix newsgroup;
# send mail to comp-sources-unix@uunet.uu.net if you want that tool.
# Contents: bash.scodiff gdb47.scodiff i386sco4.h include.scodiff
# readline.scodiff
# Wrapped by jkj@parst17 on Sat Dec 12 20:49:54 1992
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive."'
if test -f 'bash.scodiff' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'bash.scodiff'\"
else
echo shar: Extracting \"'bash.scodiff'\" \(3381 characters\)
sed "s/^X//" >'bash.scodiff' <<'END_OF_FILE'
Xdiff -rc2 bash-1.12/config.h mybash/config.h
X*** bash-1.12/config.h Mon Nov 4 07:21:13 1991
X--- mybash/config.h Thu Dec 10 14:04:41 1992
X***************
X*** 64,70 ****
X /* Note that vanilla System V machines don't support BSD job control,
X although some do support Posix job control. */
X- #if defined (USG) && !defined (_POSIX_JOB_CONTROL)
X- #undef JOB_CONTROL
X- #endif /* USG */
X
X /* Define ALIAS if you want the alias features. */
X--- 64,67 ----
X***************
X*** 89,93 ****
X /* The default value of the PATH variable. */
X #define DEFAULT_PATH_VALUE \
X! ":/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:/etc:/usr/etc"
X
X /* The value for PATH when invoking `command -p'. This is only used when
X--- 86,90 ----
X /* The default value of the PATH variable. */
X #define DEFAULT_PATH_VALUE \
X! "/usr/local/bin:/bin:/usr/bin:/etc:/usr/bin/X11:"
X
X /* The value for PATH when invoking `command -p'. This is only used when
X***************
X*** 94,98 ****
X the Posix.2 confstr () function, or CS_PATH define are not present. */
X #define STANDARD_UTILS_PATH \
X! "/bin:/usr/bin:/usr/ucb:/usr/sbin:/etc:/usr/etc"
X
X /* Define V9_ECHO if you want to give the echo builtin backslash-escape
X--- 91,95 ----
X the Posix.2 confstr () function, or CS_PATH define are not present. */
X #define STANDARD_UTILS_PATH \
X! "/bin:/usr/bin:/etc"
X
X /* Define V9_ECHO if you want to give the echo builtin backslash-escape
Xdiff -rc2 bash-1.12/general.c mybash/general.c
X*** bash-1.12/general.c Tue Jan 21 06:35:27 1992
X--- mybash/general.c Sat Dec 12 18:00:35 1992
X***************
X*** 796,799 ****
X--- 796,800 ----
X char *home = get_string_value ("HOME");
X int l = home ? strlen (home) : 0;
X+ char *ret;
X
X if (l > 1 && strncmp (home, name, l) == 0 && (!name[l] || name[l] == '/'))
X***************
X*** 801,808 ****
X strcpy (tdir + 1, name + l);
X tdir[0] = '~';
X! return (tdir);
X }
X else
X! return (name);
X }
X
X--- 802,818 ----
X strcpy (tdir + 1, name + l);
X tdir[0] = '~';
X! ret = tdir;
X }
X else
X! ret = name;
X!
X! /* If the displayed path length is > 20, put ... in front */
X! l = strlen(ret);
X! if (l > 20)
X! {
X! ret = ret+l-21;
X! ret[0] = ret[1] = ret[2] = '.';
X! }
X! return ret;
X }
X
Xdiff -rc2 bash-1.12/jobs.c mybash/jobs.c
X*** bash-1.12/jobs.c Fri Jan 17 23:36:11 1992
X--- mybash/jobs.c Thu Dec 10 13:17:50 1992
X***************
X*** 1248,1251 ****
X--- 1248,1252 ----
X ((job != NO_JOB) && (JOBSTATE (job) == JRUNNING)))
X {
X+ #undef SCO
X #if !defined (SCO)
X sigset_t set;
X***************
X*** 1264,1268 ****
X sigaction (SIGCHLD, &oact, (struct sigaction *)NULL);
X #endif /* !SCO */
X!
X goto wait_loop;
X }
X--- 1265,1269 ----
X sigaction (SIGCHLD, &oact, (struct sigaction *)NULL);
X #endif /* !SCO */
X! #define SCO
X goto wait_loop;
X }
Xdiff -rc2 bash-1.12/shell.c mybash/shell.c
X*** bash-1.12/shell.c Tue Jan 21 07:52:37 1992
X--- mybash/shell.c Thu Dec 10 14:29:07 1992
X***************
X*** 523,527 ****
X {
X /* We don't execute .bashrc for login shells. */
X! no_rc++;
X #if defined (NOTDEF)
X if (getenv ("POSIXLY_CORRECT"))
X--- 523,527 ----
X {
X /* We don't execute .bashrc for login shells. */
X! /* no_rc++; */
X #if defined (NOTDEF)
X if (getenv ("POSIXLY_CORRECT"))
X
END_OF_FILE
if test 3381 -ne `wc -c <'bash.scodiff'`; then
echo shar: \"'bash.scodiff'\" unpacked with wrong size!
fi
# end of 'bash.scodiff'
fi
if test -f 'gdb47.scodiff' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'gdb47.scodiff'\"
else
echo shar: Extracting \"'gdb47.scodiff'\" \(9065 characters\)
sed "s/^X//" >'gdb47.scodiff' <<'END_OF_FILE'
Xdiff -r -c -N -C 2 gdb-4.7/bfd/config/i386-sco.mt gdb-4.7.new/bfd/config/i386-sco.mt
X*** gdb-4.7/bfd/config/i386-sco.mt
X--- gdb-4.7.new/bfd/config/i386-sco.mt Mon Nov 16 18:15:05 1992
X***************
X*** 0 ****
X--- 1,2 ----
X+ # Target: Intel 386 running SCO Unix 3.2.4.
X+ TDEFAULTS = -DDEFAULT_VECTOR=i386coff_vec
Xdiff -r -c -N -C 2 gdb-4.7/bfd/config/i386sco.mh gdb-4.7.new/bfd/config/i386sco.mh
X*** gdb-4.7/bfd/config/i386sco.mh
X--- gdb-4.7.new/bfd/config/i386sco.mh Mon Nov 16 18:15:05 1992
X***************
X*** 0 ****
X--- 1,4 ----
X+ RANLIB = /bin/true
X+ ALLOCA =
X+ HDEFINES=-DUSG -DSCO_CORE=1
X+ HDEPFILES=sco-core.o
Xdiff -r -c -N -C 2 gdb-4.7/bfd/configure.host gdb-4.7.new/bfd/configure.host
X*** gdb-4.7/bfd/configure.host Fri Oct 9 13:38:25 1992
X--- gdb-4.7.new/bfd/configure.host Mon Nov 16 18:15:06 1992
X***************
X*** 26,33 ****
X i[34]86-ncr*-sysv4*) my_host=ncr3000 ;;
X i[34]86-*-go32) my_host=go32 ;;
X i[34]86-*-sysv4*) my_host=i386v4 ;;
X i[34]86-*-sysv*) my_host=i386v ;;
X i[34]86-*-solaris*) my_host=i386v ;;
X- i[34]86-*-sco*) my_host=i386v ;;
X i[34]86-*-mach*) my_host=i386mach ;;
X i[34]86-*-msdos*) my_host=dose ;;
X--- 26,33 ----
X i[34]86-ncr*-sysv4*) my_host=ncr3000 ;;
X i[34]86-*-go32) my_host=go32 ;;
X+ i[34]86-*-sco*) my_host=i386sco ;;
X i[34]86-*-sysv4*) my_host=i386v4 ;;
X i[34]86-*-sysv*) my_host=i386v ;;
X i[34]86-*-solaris*) my_host=i386v ;;
X i[34]86-*-mach*) my_host=i386mach ;;
X i[34]86-*-msdos*) my_host=dose ;;
Xdiff -r -c -N -C 2 gdb-4.7/bfd/configure.in gdb-4.7.new/bfd/configure.in
X*** gdb-4.7/bfd/configure.in Fri Oct 23 10:39:13 1992
X--- gdb-4.7.new/bfd/configure.in Mon Nov 16 18:15:06 1992
X***************
X*** 48,52 ****
X i[34]86-*-sysv4*) bfd_target=i386-elf ;;
X i[34]86-*-sysv*) bfd_target=i386-coff ;;
X! i[34]86-*-sco*) bfd_target=i386-coff ;;
X i[34]86-*-bsd*) bfd_target=i386-bsd ;;
X i[34]86-none-*) bfd_target=i386-coff ;;
X--- 48,52 ----
X i[34]86-*-sysv4*) bfd_target=i386-elf ;;
X i[34]86-*-sysv*) bfd_target=i386-coff ;;
X! i[34]86-*-sco*) bfd_target=i386-sco ;;
X i[34]86-*-bsd*) bfd_target=i386-bsd ;;
X i[34]86-none-*) bfd_target=i386-coff ;;
X***************
X*** 83,87 ****
X *-*-linux*) bfd_target=${target_cpu}-linux ;;
X *-*-sysv*) bfd_target=${target_cpu}-coff ;;
X! *-*-scosysv*) bfd_target=${target_cpu}-coff ;;
X
X *-adobe-*) bfd_target=adobe ;;
X--- 83,87 ----
X *-*-linux*) bfd_target=${target_cpu}-linux ;;
X *-*-sysv*) bfd_target=${target_cpu}-coff ;;
X! *-*-sco*) bfd_target=${target_cpu}-sco ;;
X
X *-adobe-*) bfd_target=adobe ;;
Xdiff -r -c -N -C 2 gdb-4.7/bfd/hosts/i386sco.h gdb-4.7.new/bfd/hosts/i386sco.h
X*** gdb-4.7/bfd/hosts/i386sco.h
X--- gdb-4.7.new/bfd/hosts/i386sco.h Mon Nov 16 18:15:06 1992
X***************
X*** 0 ****
X--- 1,55 ----
X+ #include <fcntl.h>
X+ #include <errno.h>
X+ #include <stdio.h>
X+ #include <sys/types.h>
X+ #include <sys/stat.h>
X+ #include <utime.h>
X+ #include <ctype.h>
X+ #include <string.h>
X+ #include <unistd.h>
X+
X+ #ifndef O_ACCMODE
X+ #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
X+ #endif
X+ #ifndef SEEK_SET
X+ #define SEEK_SET 0
X+ #define SEEK_CUR 1
X+ #endif
X+
X+ #define POSIX_UTIME
X+
X+ /* Some things that need to be defined in order to make code written for
X+ BSD Unix compile under System V Unix. */
X+
X+ /*#include <memory.h>*/
X+ #define bcmp(b1,b2,len) memcmp(b1,b2,len)
X+ #define bcopy(src,dst,len) memcpy(dst,src,len)
X+ #define bzero(s,n) memset(s,0,n)
X+
X+ #include <string.h>
X+ #define index(s,c) strchr(s,c)
X+ #define rindex(s,c) strrchr(s,c)
X+
X+ #ifndef DONTDECLARE_MALLOC
X+ extern PTR EXFUN(malloc,(unsigned));
X+ extern PTR EXFUN(realloc, (PTR, unsigned));
X+ extern void EXFUN(free,(PTR));
X+ #endif
X+
X+ /* EXACT TYPES */
X+ typedef char int8e_type;
X+ typedef unsigned char uint8e_type;
X+ typedef short int16e_type;
X+ typedef unsigned short uint16e_type;
X+ typedef int int32e_type;
X+ typedef unsigned int uint32e_type;
X+
X+ /* CORRECT SIZE OR GREATER */
X+ typedef char int8_type;
X+ typedef unsigned char uint8_type;
X+ typedef short int16_type;
X+ typedef unsigned short uint16_type;
X+ typedef int int32_type;
X+ typedef unsigned int uint32_type;
X+
X+ #include "fopen-same.h"
Xdiff -r -c -N -C 2 gdb-4.7/bfd/sco-core.c gdb-4.7.new/bfd/sco-core.c
X*** gdb-4.7/bfd/sco-core.c Fri Oct 16 21:16:09 1992
X--- gdb-4.7.new/bfd/sco-core.c Mon Nov 16 18:15:06 1992
X***************
X*** 270,273 ****
X--- 270,274 ----
X
X (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
X+ '_', /* symbol prefix */
X ' ', /* ar_pad_char */
X 16, /* ar_max_namelen */
Xdiff -r -c -N -C 2 gdb-4.7/bfd/targets.c gdb-4.7.new/bfd/targets.c
X*** gdb-4.7/bfd/targets.c Thu Oct 8 22:18:08 1992
X--- gdb-4.7.new/bfd/targets.c Mon Nov 16 18:15:07 1992
X***************
X*** 375,379 ****
X--- 375,382 ----
X #define SELECT_VECS &DEFAULT_VECTOR
X #endif
X+ #ifdef SCO_CORE
X+ #define SELECT_VECS &DEFAULT_VECTOR,&sco_core_vec
X #endif
X+ #endif
X
X /* All known xvecs. They are listed a second time below, since
X***************
X*** 400,403 ****
X--- 403,409 ----
X extern bfd_target i386linux_vec;
X extern bfd_target a29kcoff_big_vec;
X+ #ifdef SCO_CORE
X+ extern bfd_target sco_core_vec;
X+ #endif
X extern bfd_target trad_core_vec;
X extern bfd_target rs6000coff_vec;
X***************
X*** 467,470 ****
X--- 473,479 ----
X #ifdef TRAD_CORE
X &trad_core_vec,
X+ #endif
X+ #ifdef SCO_CORE
X+ &sco_core_vec,
X #endif
X NULL, /* end of list marker */
Xdiff -r -c -N -C 2 gdb-4.7/config/mh-sco gdb-4.7.new/config/mh-sco
X*** gdb-4.7/config/mh-sco Thu Oct 22 09:59:45 1992
X--- gdb-4.7.new/config/mh-sco Mon Nov 16 18:15:07 1992
X***************
X*** 3,5 ****
X RANLIB = true
X BISON = yacc -Sm10400
X! CC = gcc -D_POSIX_SOURCE=1
X--- 3,5 ----
X RANLIB = true
X BISON = yacc -Sm10400
X! CC = gcc -O2
Xdiff -r -c -N -C 2 gdb-4.7/gdb/config/i386sco.mh gdb-4.7.new/gdb/config/i386sco.mh
X*** gdb-4.7/gdb/config/i386sco.mh Thu Oct 22 10:07:12 1992
X--- gdb-4.7.new/gdb/config/i386sco.mh Mon Nov 16 18:15:07 1992
X***************
X*** 1,13 ****
X! # Host: Intel 386 running SCO Unix (pre-SVR4)
X! XDEPFILES= i387-tdep.o
X XM_FILE= xm-i386sco.h
X NAT_FILE= nm-i386sco.h
X NATDEPFILES= infptrace.o inftarg.o fork-child.o coredep.o corelow.o i386v-nat.o
X! XM_CLIBS= -lPW
X SYSV_DEFINE=-DSYSV
X REGEX=regex.o
X REGEX1=regex.o
X- #msg The SCO C compiler cannot parse symtab.h when value.h has been included.
X- #msg This is a bug in the compiler; the code is valid.
X- #msg Therefore, you must use GCC to compile GDB on SCO machines.
X- CC=gcc -D_POSIX_SOURCE=1
X--- 1,9 ----
X! # Host: Intel 386 running System V release 3.2
X! XDEPFILES=
X XM_FILE= xm-i386sco.h
X NAT_FILE= nm-i386sco.h
X NATDEPFILES= infptrace.o inftarg.o fork-child.o coredep.o corelow.o i386v-nat.o
X! XM_CLIBS=
X SYSV_DEFINE=-DSYSV
X REGEX=regex.o
X REGEX1=regex.o
Xdiff -r -c -N -C 2 gdb-4.7/gdb/config/i386sco.mt gdb-4.7.new/gdb/config/i386sco.mt
X*** gdb-4.7/gdb/config/i386sco.mt
X--- gdb-4.7.new/gdb/config/i386sco.mt Mon Nov 16 18:15:08 1992
X***************
X*** 0 ****
X--- 1,3 ----
X+ # Target: Intel 386 running System V
X+ TDEPFILES= exec.o i386-tdep.o i386-pinsn.o i387-tdep.o
X+ TM_FILE= tm-i386v.h
Xdiff -r -c -N -C 2 gdb-4.7/gdb/configure.in gdb-4.7.new/gdb/configure.in
X*** gdb-4.7/gdb/configure.in Thu Oct 15 00:50:18 1992
X--- gdb-4.7.new/gdb/configure.in Mon Nov 16 18:15:08 1992
X***************
X*** 25,29 ****
X i[34]86-*-linux) gdb_host=linux ;;
X i[34]86-*-mach) gdb_host=i386mach ;;
X! i[34]86-*-scosysv*) gdb_host=i386sco ;;
X i[34]86-*-solaris*) gdb_host=i386sol2 ;;
X i[34]86-*-sunos*) gdb_host=sun386 ;;
X--- 25,29 ----
X i[34]86-*-linux) gdb_host=linux ;;
X i[34]86-*-mach) gdb_host=i386mach ;;
X! i[34]86-*-sco*) gdb_host=i386sco ;;
X i[34]86-*-solaris*) gdb_host=i386sol2 ;;
X i[34]86-*-sunos*) gdb_host=sun386 ;;
X***************
X*** 86,90 ****
X esac
X
X-
X if [ ! -f ${srcdir}/config/${gdb_host}.mh ]; then
X echo '***' "Gdb does not support host ${host}" 1>&2
X--- 86,89 ----
X***************
X*** 129,133 ****
X i[34]86-*-sunos*) gdb_target=sun386 ;;
X i[34]86-*-sysv4*) gdb_target=i386v4 ;;
X! i[34]86-*-scosysv3*) gdb_target=i386v ;;
X i[34]86-*-sysv*) gdb_target=i386v ;;
X i[34]86-*-linux) gdb_target=linux ;;
X--- 128,132 ----
X i[34]86-*-sunos*) gdb_target=sun386 ;;
X i[34]86-*-sysv4*) gdb_target=i386v4 ;;
X! i[34]86-*-sco*) gdb_target=i386sco ;;
X i[34]86-*-sysv*) gdb_target=i386v ;;
X i[34]86-*-linux) gdb_target=linux ;;
Xdiff -r -c -N -C 2 gdb-4.7/gdb/nm-i386sco.h gdb-4.7.new/gdb/nm-i386sco.h
X*** gdb-4.7/gdb/nm-i386sco.h Thu Oct 22 21:32:06 1992
X--- gdb-4.7.new/gdb/nm-i386sco.h Mon Nov 16 18:52:47 1992
X***************
X*** 40,42 ****
X * (why, I don't know), and we don't need it.
X */
X- #define NO_PTRACE_H
X--- 40,41 ----
Xdiff -r -c -N -C 2 gdb-4.7/gdb/xm-i386sco.h gdb-4.7.new/gdb/xm-i386sco.h
X*** gdb-4.7/gdb/xm-i386sco.h Thu Oct 22 06:47:04 1992
X--- gdb-4.7.new/gdb/xm-i386sco.h Mon Nov 16 18:51:46 1992
X***************
X*** 41,42 ****
X--- 41,43 ----
X /* Use setpgid instead of setpgrp on SCO */
X #define NEED_POSIX_SETPGID
X+ #define ATTACH_DETACH
END_OF_FILE
if test 9065 -ne `wc -c <'gdb47.scodiff'`; then
echo shar: \"'gdb47.scodiff'\" unpacked with wrong size!
fi
# end of 'gdb47.scodiff'
fi
if test -f 'i386sco4.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'i386sco4.h'\"
else
echo shar: Extracting \"'i386sco4.h'\" \(5156 characters\)
sed "s/^X//" >'i386sco4.h' <<'END_OF_FILE'
X/* Definitions for Intel 386 running SCO Unix System V 3.2v4.0
X Written by Kean Johnston.
X Copyright (C) 1992 Free Software Foundation, Inc.
X
XThis file is part of GNU CC.
X
XGNU CC is free software; you can redistribute it and/or modify
Xit under the terms of the GNU General Public License as published by
Xthe Free Software Foundation; either version 2, or (at your option)
Xany later version.
X
XGNU CC is distributed in the hope that it will be useful,
Xbut WITHOUT ANY WARRANTY; without even the implied warranty of
XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
XGNU General Public License for more details.
X
XYou should have received a copy of the GNU General Public License
Xalong with GNU CC; see the file COPYING. If not, write to
Xthe Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
X
X
X/* Mostly it's like SCO UNIX 3.2v2.0 and 3.2v2.1.
X
XThe various flags which affect compatibility with the SCO C compiler from
Xdevelopment system version 3.2v4.0 are:
X
X-scoxpg3 simulates the SCO -xpg3 flag
X-scoplus simulates the SCO -xpg3+ flag
X-posix, -ansi and -svid are the same as their SCO counterparts.
X
X-scointl will enable Internation Supplement features.
X
XPlease note that there is considerable duplication in this file. The oroginal
Xspecs which were set up have been surrounded in comments, and more compact
Xforms are the active definitions. This is to attempt to reduce the command
Xline length, as SCO's brain-dead shells have a rediculously low length.
XI have come across several applications which wont compile because the
Xcommand line was too long.
X
XIf you wish to edit a spec, rather edit the commented one (which should be
Xmore readable), then copy it down and remove all unnecessary whitespace.
X*/
X
X#include "i386sco.h"
X
X/* Use crt1.o as a startup file and crtn.o as a closing file. */
X
X#undef STARTFILE_SPEC
X#define STARTFILE_SPEC \
X"%{scoxpg3:%{p:mcrt1X.o%s}%{!p:crt1X.o%s}}%{!scoxpg3:%{scoplus:\
X%{p:mcrt1X.o%s}%{!p:crt1X.o%s}}%{!scoplus:%{posix:%{p:mcrt1P.o%s}\
X%{!p:crt1P.o%s}}%{!posix:%{svid:%{p:mcrt1P.o%s}%{!p:crt1P.o%s}}\
X%{!svid:%{ansi:%{p:mcrt1A.o%s}%{!p:crt1A.o%s}}%{!ansi:%{pg:gcrt1.o%s}\
X%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}}}} crtbegin.o%s"
X
X/*
X#define STARTFILE_SPEC \
X"%{scoxpg3:%{p:mcrt1X.o%s}%{!p:crt1X.o%s}} \
X %{!scoxpg3:%{scoplus:%{p:mcrt1X.o%s}%{!p:crt1X.o%s}} \
X %{!scoplus:%{posix:%{p:mcrt1P.o%s}%{!p:crt1P.o%s}} \
X %{!posix:%{svid:%{p:mcrt1P.o%s}%{!p:crt1P.o%s}} \
X %{!svid:%{ansi:%{p:mcrt1A.o%s}%{!p:crt1A.o%s}} \
X %{!ansi:%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}}}} \
X crtbegin.o%s"
X*/
X
X#undef ENDFILE_SPEC
X#define ENDFILE_SPEC \
X "crtend.o%s %{scoxpg3:crtnX.o%s}%{!scoxpg3:%{scoplus:crtnX.o%s}\
X%{!scoplus:%{posix:crtnP.o%s}%{!posix:%{svid:crtn.o%s}\
X%{!svid:%{ansi:crtnA.o%s}%{!ansi:crtn.o%s}}}}}"
X
X/*
X#define ENDFILE_SPEC \
X "crtend.o%s \
X %{scoxpg3:crtnX.o%s} \
X %{!scoxpg3:%{scoplus:crtnX.o%s} \
X %{!scoplus:%{posix:crtnP.o%s} \
X %{!posix:%{svid:crtn.o%s} \
X %{!svid:%{ansi:crtnA.o%s} \
X %{!ansi:crtn.o%s}}}}}"
X*/
X
X/* Library spec. */
X
X#undef LIB_SPEC
X#define LIB_SPEC \
X "%{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp} %{scoxpg3:-lcX -lcP -lcA}\
X%{!scoxpg3:%{scoplus:-lcE -lcX -lcP -lcA}%{!scoplus:%{posix:-lcP -lcA}\
X%{!posix:%{svid:-lc}%{!svid:%{ansi:-lcA}%{!ansi:-lc}}}}}"
X
X/*
X#define LIB_SPEC \
X "%{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp} \
X %{scoxpg3:-lcX -lcP -lcA} \
X %{!scoxpg3:%{scoplus:-lcE -lcX -lcP -lcA} \
X %{!scoplus:%{posix:-lcP -lcA} \
X %{!posix:%{svid:-lc} \
X %{!svid:%{ansi:-lcA} \
X %{!ansi:-lc}}}}}"
X*/
X
X/* Macros, macros everywhere:
X Specify predefined symbols in preprocessor. */
X
X#undef CPP_PREDEFINES
X#define CPP_PREDEFINES ""
X
X#undef CPP_SPEC
X#define CPP_SPEC \
X "-D__i386 -D_M_i386 -D_M_I86 -D_M_I86SM -D_M_SDATA -D_M_STEXT \
X-D__unix -D_M_UNIX -D_M_XENIX -D_M_SYS5 -D_M_SYSV -D_M_SYS3 -D_M_SYSIII \
X-D_M_COFF -D_M_BITFIELDS -D_M_WORDSWAP %{scoxpg3:-D_XOPEN_SOURCE \
X-D_M_INTERNAT -D_STRICT_NAMES}%{!scoxpg3:%{scoplus:-D_STRICT_NAMES \
X-D_M_INTERNAT -D__STDC__=0}%{!scoplus:%{posix:-D_POSIX_SOURCE \
X-D_STRICT_NAMES}%{!posix:%{svid:-D_SVID -D__STDC__=0}%{!svid:\
X%{ansi:-D_STRICT_NAMES}%{!ansi:-Di386 -DM_i386 -DM_I86 -DM_I86SM \
X-DM_SDATA -DM_STEXT -Dunix -DM_UNIX -DM_XENIX -DM_SYS5 -DM_SYSV \
X-DM_SYS3 -DM_SYSIII -DM_COFF -DM_BITFIELDS -DM_WORDSWAP -D__STDC__=0}}}}} \
X%{scointl:-DM_INTERNAT %{!scoxpg3:%{!scoplus:-D_M_INTERNAT}}}"
X
X/*
X#define CPP_SPEC \
X "-D__i386 -D_M_i386 -D_M_I86 -D_M_I86SM -D_M_SDATA -D_M_STEXT \
X -D__unix -D_M_UNIX -D_M_XENIX -D_M_SYS5 -D_M_SYSV -D_M_SYS3 -D_M_SYSIII \
X -D_M_COFF -D_M_BITFIELDS -D_M_WORDSWAP \
X %{scoxpg3:-D_XOPEN_SOURCE -D_M_INTERNAT -D_STRICT_NAMES} \
X %{!scoxpg3:%{scoplus:-D_STRICT_NAMES -D_M_INTERNAT -D__STDC__=0} \
X %{!scoplus:%{posix:-D_POSIX_SOURCE -D_STRICT_NAMES} \
X %{!posix:%{svid:-D_SVID -D__STDC__=0} \
X %{!svid:%{ansi:-D_STRICT_NAMES} \
X %{!ansi:-Di386 -DM_i386 -DM_I86 -DM_I86SM -DM_SDATA -DM_STEXT\
X -Dunix -DM_UNIX -DM_XENIX -DM_SYS5 -DM_SYSV -DM_SYS3 -DM_SYSIII \
X -DM_COFF -DM_BITFIELDS -DM_WORDSWAP -D__STDC__=0}}}}} \
X %{scointl:-DM_INTERNAT %{!scoxpg3:%{!scoplus:-D_M_INTERNAT}}}"
X*/
END_OF_FILE
if test 5156 -ne `wc -c <'i386sco4.h'`; then
echo shar: \"'i386sco4.h'\" unpacked with wrong size!
fi
# end of 'i386sco4.h'
fi
if test -f 'include.scodiff' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'include.scodiff'\"
else
echo shar: Extracting \"'include.scodiff'\" \(7977 characters\)
sed "s/^X//" >'include.scodiff' <<'END_OF_FILE'
Xdiff -rc2N sco/stdio.h include/stdio.h
X*** sco/stdio.h Sat Dec 12 19:25:13 1992
X--- include/stdio.h Sat Dec 12 18:22:29 1992
X***************
X*** 225,229 ****
X #else /* !_NO_PROTOTYPE */
X extern int remove(const char *);
X! extern int rename(const char *, const char *);
X extern FILE *tmpfile(void);
X extern char *tmpnam(char *);
X--- 225,229 ----
X #else /* !_NO_PROTOTYPE */
X extern int remove(const char *);
X! /* extern int rename(const char *, const char *); JKJ */
X extern FILE *tmpfile(void);
X extern char *tmpnam(char *);
X***************
X*** 277,281 ****
X extern void perror(const char *);
X #if !_STRICT_NAMES
X! extern int unlink(const char *);
X extern int _filbuf(FILE *);
X extern int _flsbuf(unsigned char, FILE *);
X--- 277,281 ----
X extern void perror(const char *);
X #if !_STRICT_NAMES
X! /* extern int unlink(const char *); JKJ */
X extern int _filbuf(FILE *);
X extern int _flsbuf(unsigned char, FILE *);
X***************
X*** 282,286 ****
X extern char *ctermid(char *);
X extern char *cuserid(char *);
X! extern int system(const char *);
X #else
X extern int __unlink(const char *);
X--- 282,286 ----
X extern char *ctermid(char *);
X extern char *cuserid(char *);
X! /* extern int system(const char *); JKJ */
X #else
X extern int __unlink(const char *);
Xdiff -rc2N sco/string.h include/string.h
X*** sco/string.h Sat Dec 12 19:25:13 1992
X--- include/string.h Sat Dec 12 18:22:29 1992
X***************
X*** 116,120 ****
X
X #if !_STRICT_NAMES
X! extern void perror(const char *);
X extern char *strdup(const char *);
X extern int sys_nerr;
X--- 116,120 ----
X
X #if !_STRICT_NAMES
X! /* extern void perror(const char *); */
X extern char *strdup(const char *);
X extern int sys_nerr;
Xdiff -rc2N sco/sys/ptrace.h include/sys/ptrace.h
X*** sco/sys/ptrace.h
X--- include/sys/ptrace.h Sat Dec 12 18:23:17 1992
X***************
X*** 0 ****
X--- 1,38 ----
X+ #ifndef _SYS_PTRACE
X+ #define _SYS_PTRACE
X+
X+ /*
X+ ** This header file defines the ptrace function, and the symbolic names
X+ ** for the different requests which can be made to ptrace. This allows
X+ ** programs like GDB to make use of ptrace for attached to and detaching
X+ ** from a child process. Why SCO, in their wisdom(?) left this out of the
X+ ** development system will remain a mystery for all time.
X+ **
X+ ** Thanks to the SunOS header file for ptrace. I have made the definition
X+ ** and names as close to that original as possible.
X+ **
X+ ** The SCO documentation also says that you can use ptrace() to modify the
X+ ** 80[34]86 debug registers. Maybe this can be put to good use by GDB.
X+ ** I will look into this, and keep you posted. If you already know how
X+ ** this can be used, then please leave me mail at maw@netcom.com.
X+ */
X+
X+ enum ptracereq {
X+ PTRACE_TRACEME = 0, /* 0, by tracee to begin tracing */
X+ PTRACE_CHILDDONE = 0, /* 0, tracee is done with his half */
X+ PTRACE_PEEKTEXT, /* 1, read word from text segment */
X+ PTRACE_PEEKDATA, /* 2, read word from data segment */
X+ PTRACE_PEEKUSER, /* 3, read word from user struct */
X+ PTRACE_POKETEXT, /* 4, write word into text segment */
X+ PTRACE_POKEDATA, /* 5, write word into data segment */
X+ PTRACE_POKEUSER, /* 6, write word into user struct */
X+ PTRACE_CONT, /* 7, continue process */
X+ PTRACE_KILL, /* 8, terminate process */
X+ PTRACE_SINGLESTEP, /* 9, single step process */
X+ PTRACE_ATTACH, /* 10, attach to an existing process */
X+ PTRACE_DETACH, /* 11, detach from a process */
X+ };
X+
X+ extern int ptrace (enum ptracereq request, int pid, char *addr, int data);
X+
X+ #endif /* _SYS_PTRACE */
Xdiff -rc2N sco/sys/times.h include/sys/times.h
X*** sco/sys/times.h Sat Dec 12 19:25:33 1992
X--- include/sys/times.h Sat Dec 12 18:23:17 1992
X***************
X*** 52,56 ****
X extern clock_t times(struct tms *);
X #if !_STRICT_NAMES
X! extern int utime(const char *, struct utimbuf *);
X #endif /* !_STRICT_NAMES */
X #ifdef __cplusplus
X--- 52,56 ----
X extern clock_t times(struct tms *);
X #if !_STRICT_NAMES
X! /* extern int utime(const char *, struct utimbuf *); */
X #endif /* !_STRICT_NAMES */
X #ifdef __cplusplus
Xdiff -rc2N sco/sys/types.h include/sys/types.h
X*** sco/sys/types.h Sat Dec 12 19:25:33 1992
X--- include/sys/types.h Sat Dec 12 18:23:17 1992
X***************
X*** 45,49 ****
X #endif /* Eliminate name space pollution */
X
X! #if !defined(_XOPEN_SOURCE) && !defined(_POSIX_SOURCE)
X typedef struct { int r[1]; } *physadr;
X typedef long daddr_t; /* <disk address> type */
X--- 45,49 ----
X #endif /* Eliminate name space pollution */
X
X! /* #if !defined(_XOPEN_SOURCE) && !defined(_POSIX_SOURCE) */
X typedef struct { int r[1]; } *physadr;
X typedef long daddr_t; /* <disk address> type */
X***************
X*** 69,77 ****
X #define GETUCHAR(uc) (uc)
X #define GETULONG(ul) (ul)
X! #endif /* !defined(_XOPEN_SOURCE) && !defined(_POSIX_SOURCE) */
X
X typedef unsigned short ino_t; /* <inode> type */
X
X! #if !defined(_XOPEN_SOURCE) && !defined(_POSIX_SOURCE)
X #ifdef _M_UNIX /* Normal UNIX case */
X typedef short cnt_t; /* ?<count> type */
X--- 69,77 ----
X #define GETUCHAR(uc) (uc)
X #define GETULONG(ul) (ul)
X! /* #endif */ /* !defined(_XOPEN_SOURCE) && !defined(_POSIX_SOURCE) */
X
X typedef unsigned short ino_t; /* <inode> type */
X
X! /* #if !defined(_XOPEN_SOURCE) && !defined(_POSIX_SOURCE) */
X #ifdef _M_UNIX /* Normal UNIX case */
X typedef short cnt_t; /* ?<count> type */
X***************
X*** 79,83 ****
X typedef char cnt_t; /* ?<count> type */
X #endif /* _M_UNIX */
X! #endif /* !defined(_XOPEN_SOURCE) && !defined(_POSIX_SOURCE) */
X
X #ifndef _TIME_T
X--- 79,83 ----
X typedef char cnt_t; /* ?<count> type */
X #endif /* _M_UNIX */
X! /* #endif */ /* !defined(_XOPEN_SOURCE) && !defined(_POSIX_SOURCE) */
X
X #ifndef _TIME_T
Xdiff -rc2N sco/termios.h include/termios.h
X*** sco/termios.h Sat Dec 12 19:25:13 1992
X--- include/termios.h Sat Dec 12 18:22:29 1992
X***************
X*** 37,41 ****
X * file, the followign undefs are also necessary
X */
X!
X #undef tcsendbreak
X #undef tcdrain
X--- 37,41 ----
X * file, the followign undefs are also necessary
X */
X! #include <termio.h> /* JKJ fix */
X #undef tcsendbreak
X #undef tcdrain
Xdiff -rc2N sco/tinfo.h include/tinfo.h
X*** sco/tinfo.h Sat Dec 12 19:25:13 1992
X--- include/tinfo.h Sat Dec 12 18:22:28 1992
X***************
X*** 216,220 ****
X mvprintw(int, int, char *, ...),
X mvscanw(int, int, char *, ...),
X! mvwaddch(WINDOW *, int, int),
X mvwdelch(WINDOW *, int, int),
X mvwin(WINDOW *, int, int),
X--- 216,220 ----
X mvprintw(int, int, char *, ...),
X mvscanw(int, int, char *, ...),
X! mvwaddch(WINDOW *, int, int,char),
X mvwdelch(WINDOW *, int, int),
X mvwin(WINDOW *, int, int),
Xdiff -rc2N sco/unistd.h include/unistd.h
X*** sco/unistd.h Sat Dec 12 19:25:13 1992
X--- include/unistd.h Sat Dec 12 18:22:28 1992
X***************
X*** 102,106 ****
X extern pid_t tcgetpgrp(int);
X extern int tcsetpgrp(int, pid_t);
X! extern char* getcwd(char *, int);
X extern char* getlogin(void);
X extern char* ttyname(int);
X--- 102,106 ----
X extern pid_t tcgetpgrp(int);
X extern int tcsetpgrp(int, pid_t);
X! extern char* getcwd(char *, size_t);
X extern char* getlogin(void);
X extern char* ttyname(int);
X***************
X*** 131,135 ****
X extern unsigned int sleep(unsigned int);
X extern long sysconf(int);
X! extern int unlink(const char *);
X extern int write(int, const void *, unsigned int);
X
X--- 131,135 ----
X extern unsigned int sleep(unsigned int);
X extern long sysconf(int);
X! extern int unlink(const char *);
X extern int write(int, const void *, unsigned int);
X
END_OF_FILE
if test 7977 -ne `wc -c <'include.scodiff'`; then
echo shar: \"'include.scodiff'\" unpacked with wrong size!
fi
# end of 'include.scodiff'
fi
if test -f 'readline.scodiff' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'readline.scodiff'\"
else
echo shar: Extracting \"'readline.scodiff'\" \(2610 characters\)
sed "s/^X//" >'readline.scodiff' <<'END_OF_FILE'
X*** readline.orig/config/mh-sco Fri Jun 19 21:54:57 1992
X--- readline/config/mh-sco Sat Dec 12 19:34:48 1992
X***************
X*** 1,4 ****
X # Define USG as -DUSG if you are using a System V operating system.
X! USG = -DUSG -D_POSIX_SOURCE=1
X RANLIB = true
X INSTALL_PROG = cp
X--- 1,4 ----
X # Define USG as -DUSG if you are using a System V operating system.
X! USG = -DUSG
X RANLIB = true
X INSTALL_PROG = cp
Xdiff -rc2N readline.orig/emacs_keymap.c readline/emacs_keymap.c
X*** readline.orig/emacs_keymap.c Fri Nov 22 00:43:03 1991
X--- readline/emacs_keymap.c Sat Dec 12 19:52:47 1992
X***************
X*** 412,417 ****
X { ISFUNC, rl_do_lowercase_version }, /* P */
X { ISFUNC, rl_do_lowercase_version }, /* Q */
X! { ISFUNC, rl_do_lowercase_version }, /* R */
X! { ISFUNC, rl_do_lowercase_version }, /* S */
X { ISFUNC, rl_do_lowercase_version }, /* T */
X { ISFUNC, rl_do_lowercase_version }, /* U */
X--- 412,417 ----
X { ISFUNC, rl_do_lowercase_version }, /* P */
X { ISFUNC, rl_do_lowercase_version }, /* Q */
X! { ISFUNC, rl_reverse_search_history }, /* R */
X! { ISFUNC, rl_forward_search_history }, /* S */
X { ISFUNC, rl_do_lowercase_version }, /* T */
X { ISFUNC, rl_do_lowercase_version }, /* U */
X***************
X*** 448,453 ****
X { ISFUNC, (Function *)0x0 }, /* p */
X { ISFUNC, (Function *)0x0 }, /* q */
X! { ISFUNC, (Function *)0x0 }, /* r */
X! { ISFUNC, (Function *)0x0 }, /* s */
X { ISFUNC, (Function *)0x0 }, /* t */
X { ISFUNC, (Function *)0x0 }, /* u */
X--- 448,453 ----
X { ISFUNC, (Function *)0x0 }, /* p */
X { ISFUNC, (Function *)0x0 }, /* q */
X! { ISFUNC, rl_reverse_search_history }, /* r */
X! { ISFUNC, rl_forward_search_history }, /* s */
X { ISFUNC, (Function *)0x0 }, /* t */
X { ISFUNC, (Function *)0x0 }, /* u */
Xdiff -rc2N readline.orig/readline.c readline/readline.c
X*** readline.orig/readline.c Thu Oct 15 00:51:22 1992
X--- readline/readline.c Sat Dec 12 19:55:36 1992
X***************
X*** 2545,2549 ****
X tio.c_lflag &= ~(ICANON|ECHO);
X
X! if (otio.c_cc[VEOF] != _POSIX_VDISABLE)
X eof_char = otio.c_cc[VEOF];
X
X--- 2545,2549 ----
X tio.c_lflag &= ~(ICANON|ECHO);
X
X! if (otio.c_cc[VEOF] != 255)
X eof_char = otio.c_cc[VEOF];
X
X***************
X*** 3054,3057 ****
X--- 3054,3073 ----
X case 'D':
X rl_backward (count);
X+ break;
X+
X+ case 'H':
X+ rl_beg_of_line ();
X+ break;
X+
X+ case 'F':
X+ rl_end_of_line ();
X+ break;
X+
X+ case 'I':
X+ rl_beginning_of_history ();
X+ break;
X+
X+ case 'G':
X+ rl_end_of_history ();
X break;
X
END_OF_FILE
if test 2610 -ne `wc -c <'readline.scodiff'`; then
echo shar: \"'readline.scodiff'\" unpacked with wrong size!
fi
# end of 'readline.scodiff'
fi
echo shar: End of archive.
exit 0
----------------------------> cut here < ---------------------------------
--
Martin Walker | "One way to stop a runaway horse
++27-12-344-3973 (w) | is to bet on him"
++27-12-998-7263 (h) | maw@netcom.com
Pretoria, South Africa | martin@paradigm.CO.ZA
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