Newest version of gcc et al available on unix.oakland.edu

Ronald S H Khoo ronald at robobar.co.uk
Thu Nov 8 03:37:32 AEST 1990


srodawa at vela.acs.oakland.edu (Ron Srodawa) writes:

> [ RoboBar Xenix GCC ]  diskettes are now available for
> anonymous ftp on unix.oakland.edu in the directory /pub/xenix/gcc.

Thank you, Ron !

> Someone once told me he found [include] files in the runtime diskettes of an
> early version of Xenix.  Has anyone looked to see if these might be
> on the runtime system diskettes but not loaded?  

I think the point is that the SYSTEM include files (i.e. sys/*.h) *have*
to come with the OS and not the Dev sys otherwise device driver stuff
may break.  Therefore, on all versions of Xenix I've ever come across,
the sys/*.h are always on the operating system diskettes.  Try doing a
"tar tvf /dev/install" on your N[2-n] diskettes and see!  It is always
worth looking to see what goodies are there.  Another example is that
/bin/adb is included for doing things like patching uucico and the kernel.
They aren't mentioned in the /etc/perms/* files, but you can always look
with tar !

As for the other basic necessities: /bin/ld is part of the LINK kit,
and /bin/ar is often known as /tmp/b1 on some support level supplements :-)
It shouldn't be too difficult to persuade GNU /bin/ar to produce Xenix
compatible archives anyway.  You also have the free /usr/bin/ranlib written
by my colleague Steve (v12i014 in the comp.sources.misc archives).

And of course, rudimentary start-off files are included with our patch
kit, and a system call library was posted by pgd at compuram.bbt.se.

So the only thing that's left is the actual C library.  Bits of it are
available in the sources.misc and sources.unix archives and the BSD
4.3-tahoe freed files tape.  And several stdio implementations are
around (I recommend the "estdio 2.0a" package by Earl Chew written for
Minix, but available under freer terms than the "official" Minix stuff).

Neither Steve nor I really have time to put this lot together, but we
would be willing to help people who are SERIOUSLY interested in putting
together a kit.  There is certainly enough stuff out there to do quite a
lot of serious development with.

Here's a bit of encouragement, a replacement ctype package I threw together
while trying to put that kit together before I found more interesting
things to do :-)

------------------------------ cut here ------------------------------
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
#	README
#	Makefile
#	ctype.h
#	ctypechk.c
#	ctypegen.c
# This archive created: Wed May  2 12:07:40 1990
export PATH; PATH=/bin:$PATH
echo shar: extracting "'README'" '(990 characters)'
if test -f 'README'
then
	echo shar: will not over-write existing file "'README'"
else
sed 's/^X//' << \SHAR_EOF > 'README'
XI couln't find a freely redistributable ctype macro package in the
Xarchives and I needed one so I wrote one from the spec in K&R 2 (page
X248 of Steve's copy, mine is at home).  This is a horribly unportable
Xpiece of code.  I know that it assumes ASCII, CHAR_BIT == 8 and casting
Xan int to unsigned char and back again will make EOF into 255.  What
Xelse it assumes, I don't know.  If you can write a portable one
XI'll buy you a beer or two at the next LUUG.
X
XThe makefile tests that it does the same as your system ctype, but uses
Xsome ANSI features of GCC which you might have to hack around if you
Xhaven't got an ANSIish compiler.  Also, many ctypes only work if
Xisascii() is true, so the test program only tests from -1 to 127.
XHack ctypechk.c if you want to test beyond.
X
XIn the unlikely event that you find a use for this, please report the
Xbugs to me, Ronald.Khoo at Robobar.Co.Uk (uunet!mcsun!ukc!robobar!ronald).
X
XQuoting netlib: Careful!  Anything that's free comes with no guarantee!
SHAR_EOF
if test 990 -ne "`wc -c < 'README'`"
then
	echo shar: error transmitting "'README'" '(should have been 990 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'Makefile'" '(457 characters)'
if test -f 'Makefile'
then
	echo shar: will not over-write existing file "'Makefile'"
else
sed 's/^X//' << \SHAR_EOF > 'Makefile'
XRM=rm
X# use this one instead if you like to read intermediates
X# RM=echo
XCC=gcc
X# to quote lwall: Grr
XSHELL=/bin/sh
X
Xok:	ctype.o
X	$(CC)	-DCTYPE='"ctype.h"' ctypechk.c ctype.o
X	./a.out > local.out
X	$(CC)	-DCTYPE="<ctype.h>" ctypechk.c
X	./a.out > system.out
X	cmp system.out local.out
X	$(RM) -f a.out
X
Xctype.o:	ctype.h ctypegen.c
X	$(CC) ctypegen.c
X	./a.out > ctype.c
X	$(CC) $(CFLAGS) -c ctype.c
X	$(RM) -f ctype.c a.out
X
Xclean:
X	$(RM) -f *.o *.out core ctype.c
SHAR_EOF
if test 457 -ne "`wc -c < 'Makefile'`"
then
	echo shar: error transmitting "'Makefile'" '(should have been 457 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'ctype.h'" '(2151 characters)'
if test -f 'ctype.h'
then
	echo shar: will not over-write existing file "'ctype.h'"
else
sed 's/^X//' << \SHAR_EOF > 'ctype.h'
X/*
X * $Header: /usr/local/src/libc/ctype/RCS/ctype.h,v 1.1 90/05/02 12:03:36 root Exp $
X *
X * Replacement ctype.h (C) Copyright 1990 Ronald Khoo <ronald at robobar.co.uk>
X * Copyright abandoned.  Remove the copyright message and SELL! :-)
X *
X * Almost guranteed to be incompatible with your system ctype, so beware.
X */
X
X#define	_CTYPE_ISDIGIT	00001
X#define _CTYPE_ISUPPER	00002
X#define _CTYPE_ISLOWER	00004
X#define _CTYPE_ISCNTRL	00010
X#define _CTYPE_ISPUNCT	00020
X#define _CTYPE_ISBLANK	00040	/* The ' ' character	*/
X#define _CTYPE_ISWHITE	00100	/* All other whitespace	*/
X#define	_CTYPE_ISXDIGIT	00200
X
Xextern unsigned char _Ctype_[];
X
X#define _CTYPE_ISALNUM	(_CTYPE_ISDIGIT | _CTYPE_ISUPPER | _CTYPE_ISLOWER)
X#define _CTYPE_ISALPHA	(_CTYPE_ISUPPER | _CTYPE_ISLOWER)
X#define _CTYPE_ISGRAPH	(_CTYPE_ISPUNCT | _CTYPE_ISALNUM)
X#define _CTYPE_ISPRINT	(_CTYPE_ISGRAPH | _CTYPE_ISBLANK)
X#define	_CTYPE_ISSPACE	(_CTYPE_ISBLANK | _CTYPE_ISWHITE)
X
X#define isdigit(_C)  (_Ctype_[(unsigned char)(_C)] &  _CTYPE_ISDIGIT)
X#define isupper(_C)  (_Ctype_[(unsigned char)(_C)] &  _CTYPE_ISUPPER)
X#define islower(_C)  (_Ctype_[(unsigned char)(_C)] &  _CTYPE_ISLOWER)
X#define iscntrl(_C)  (_Ctype_[(unsigned char)(_C)] &  _CTYPE_ISCNTRL)
X#define ispunct(_C)  (_Ctype_[(unsigned char)(_C)] &  _CTYPE_ISPUNCT)
X#define isblank(_C)  (_Ctype_[(unsigned char)(_C)] &  _CTYPE_ISBLANK)
X#define iswhite(_C)  (_Ctype_[(unsigned char)(_C)] &  _CTYPE_ISWHITE)
X#define isxdigit(_C) (_Ctype_[(unsigned char)(_C)] &  _CTYPE_ISXDIGIT)
X
X#define	isalnum(_C)  (_Ctype_[(unsigned char)(_C)] & _CTYPE_ISALNUM)
X#define	isalpha(_C)  (_Ctype_[(unsigned char)(_C)] & _CTYPE_ISALPHA)
X#define	isgraph(_C)  (_Ctype_[(unsigned char)(_C)] & _CTYPE_ISGRAPH)
X#define	isprint(_C)  (_Ctype_[(unsigned char)(_C)] & _CTYPE_ISPRINT)
X#define	isspace(_C)  (_Ctype_[(unsigned char)(_C)] & _CTYPE_ISSPACE)
X
X#ifndef __STRICT_ANSI__
X#define isascii(_C) (((_C) & 0200) == 0)
X#endif
X
X#if defined (__GNUC__) /* && defined(__ASCII_BASED_SYSTEM__) */
X#define tolower(_C) ({ int _Ct = (_C); isupper(_Ct)? _Ct |  ('a' - 'A'): _Ct;})
X#define toupper(_C) ({ int _Ct = (_C); islower(_Ct)? _Ct &~ ('a' - 'A'): _Ct;})
X#endif
SHAR_EOF
if test 2151 -ne "`wc -c < 'ctype.h'`"
then
	echo shar: error transmitting "'ctype.h'" '(should have been 2151 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'ctypechk.c'" '(1587 characters)'
if test -f 'ctypechk.c'
then
	echo shar: will not over-write existing file "'ctypechk.c'"
else
sed 's/^X//' << \SHAR_EOF > 'ctypechk.c'
Xstatic char rcsid[] = "@(#)$Header: /usr/local/src/libc/ctype/RCS/ctypechk.c,v 1.1 90/05/02 12:03:38 root Exp $";
X/*
X * Test program to see if my replacement ctype does the same as the system
X * ctype.
X *
X * (C) Copywrong 1990 Ronald Khoo <ronald at robobar.co.uk>
X * If you copy it wrong, it might not work anymore.
X * Any implicit copyrights abandoned.
X */
X
X#include <stdio.h>
X#if EOF != -1
X#error "I doubt that I am useable on insane systems"
X#endif
X
X#define MAXTEST	127	/* Older ctypes can't test beyond this value,
X			   if you are testing against an ANSI system,
X			   you could make it 255 */
X
X#include CTYPE		/* define one of "ctype.h" or <ctype.h> in Makefile */
Xmain()
X{
X	register i;
X
X	puts(
X"value   alnum alpha cntrl digit graph lower print punct space upper xdigit");
X	for (i = EOF; i <= MAXTEST; i++) {
X		printf(isprint(i)? "'%c'     ": "'\\%03o'  ", i & 0377);
X		printf("%d     ", !!isalnum(i));
X		printf("%d     ", !!isalpha(i));
X		printf("%d     ", !!iscntrl(i));
X		printf("%d     ", !!isdigit(i));
X		printf("%d     ", !!isgraph(i));
X		printf("%d     ", !!islower(i));
X		printf("%d     ", !!isprint(i));
X		printf("%d     ", !!ispunct(i));
X		printf("%d     ", !!isspace(i));
X		printf("%d     ", !!isupper(i));
X		printf("%d\n", !!isxdigit(i));
X	}
X	putchar('\n');
X	for (i = EOF; i <= MAXTEST; i++) {
X		printf(isprint(i)?
X			"toupper('%c')    = '%c'\n":
X			"toupper('\\%03o') = '\\%03o'\n", i&0377, toupper(i));
X	}
X	for (i = EOF; i <= MAXTEST; i++) {
X		printf(isprint(i)?
X			"tolower('%c')    = '%c'\n":
X			"tolower('\\%03o') = '\\%03o'\n", i&0377, tolower(i));
X	}
X	exit(0);
X}
SHAR_EOF
if test 1587 -ne "`wc -c < 'ctypechk.c'`"
then
	echo shar: error transmitting "'ctypechk.c'" '(should have been 1587 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'ctypegen.c'" '(1964 characters)'
if test -f 'ctypegen.c'
then
	echo shar: will not over-write existing file "'ctypegen.c'"
else
sed 's/^X//' << \SHAR_EOF > 'ctypegen.c'
Xstatic char rcsid[] = "@(#)$Header: /usr/local/src/libc/ctype/RCS/ctypegen.c,v 1.1 90/05/02 12:03:39 root Exp $";
X/*
X * Generate ctype.c which compiles to the array used by the ctype.h macros.
X * Resulting ctype.o is almost guaranteed to be incompatible with your
X * system ctype.  Beware.
X *
X * (C) Copywrong 1990 Ronald Khoo <ronald at robobar.co.uk>
X * If you copy it wrong, it might not work anymore.
X * Any implicit copyrights abandoned.
X */
X
X#include <stdio.h>
X#include <limits.h>
X#include "ctype.h"
X
Xunsigned char _Ctype_[1<<CHAR_BIT];
X
X/* OK, the rest is unportably dependent upon char size and character set.
X   the above line is a JOKE, OK ?? */
X
Xmain()
X{
X	register i, j;
X
X	for (i='0'; i<='9'; i++) {
X		_Ctype_[i] |= _CTYPE_ISDIGIT | _CTYPE_ISXDIGIT;
X	}
X	for (i='a'; i<='f'; i++) _Ctype_[i] |= _CTYPE_ISXDIGIT;
X	for (i='A'; i<='F'; i++) _Ctype_[i] |= _CTYPE_ISXDIGIT;
X	for (i='a'; i<='z'; i++) _Ctype_[i] |= _CTYPE_ISLOWER;
X	for (i='A'; i<='Z'; i++) _Ctype_[i] |= _CTYPE_ISUPPER;
X	for (i=0;   i<32;   i++) _Ctype_[i] |= _CTYPE_ISCNTRL;
X
X	_Ctype_[127]  |= _CTYPE_ISCNTRL;	/* Yuck			   */
X	_Ctype_[' ']  |= _CTYPE_ISBLANK;
X	_Ctype_['\f'] |= _CTYPE_ISWHITE;	/* yeah, order as read out */
X	_Ctype_['\n'] |= _CTYPE_ISWHITE;	/* from K&R II, so what ?  */
X	_Ctype_['\r'] |= _CTYPE_ISWHITE;
X	_Ctype_['\t'] |= _CTYPE_ISWHITE;
X	_Ctype_['\v'] |= _CTYPE_ISWHITE;
X
X	for (i=33; i<127; i++)
X		if ((_Ctype_[i] & _CTYPE_ISALNUM) == 0)
X			_Ctype_[i] |= _CTYPE_ISPUNCT; /* obviously ! isspace */
X
X	puts("/* Beware: this file was generated by a program. */\n");
X	puts("extern unsigned char _Ctype_[] = {");
X	for (i=0; i<32; i++) {
X		putchar('\t');
X		for (j=0; j<8; j++)
X			printf("0x%02x, ", _Ctype_[i*8+j]);
X		putchar('\n');
X	}
X	puts("};");
X	puts(
X	"#include \"ctype.h\"\n"
X	"#undef toupper\n"
X	"#undef tolower\n"
X	"int toupper(c) int c; { return islower(c) ? c &~ ('a' - 'A') : c; }\n"
X	"int tolower(c) int c; { return isupper(c) ? c |  ('a' - 'A') : c; }\n"
X	);
X	exit(0);
X}
SHAR_EOF
if test 1964 -ne "`wc -c < 'ctypegen.c'`"
then
	echo shar: error transmitting "'ctypegen.c'" '(should have been 1964 characters)'
fi
fi # end of overwriting check
#	End of shell archive
exit 0
-- 
ronald at robobar.co.uk +44 81 991 1142 (O) +44 71 229 7741 (H)



More information about the Comp.unix.xenix.sco mailing list