home *** CD-ROM | disk | FTP | other *** search
- From: pgd@bbt.se
- Newsgroups: alt.sources
- Subject: Xenixshlib - Shared libraries for xenix (part 3 of 3)
- Message-ID: <1991Jan25.145717.25674@bbt.se>
- Date: 25 Jan 91 14:57:17 GMT
-
- ---- Cut Here and unpack ----
- #!/bin/sh
- # This is part 03 of Xenixshlib
- if touch 2>&1 | fgrep 'amc' > /dev/null
- then TOUCH=touch
- else TOUCH=true
- fi
- # ============= xcc.c ==============
- echo "x - extracting xcc.c (Text)"
- sed 's/^X//' << 'SHAR_EOF' > xcc.c &&
- X#include <stdio.h>
- X
- X#define MAXARGS 100
- X
- Xchar *output, **outp;
- Xint coffflag;
- Xint vflag;
- Xint sflag;
- X
- Xchar *args[MAXARGS];
- Xint argcnt;
- X
- X
- X
- Xmain(argc, argv)
- X int argc;
- X char **argv;
- X{
- X int i, s;
- X
- X for (i = 0; i < argc; i++) {
- X if (argv[i][0] == '-') {
- X switch (argv[i][1]) {
- X case 'o':
- X output = argv[++i];
- X outp = &argv[i];
- X break;
- X case 'L':
- X argv[i][1] = 'l';
- X coffflag = 1;
- X break;
- X case 'v':
- X vflag = 1;
- X break;
- X case 's':
- X sflag = 1;
- X break;
- X }
- X }
- X }
- X if (coffflag) {
- X *outp = "a.out";
- X args[0] = "gcc";
- X args[1] = "-nostdlib";
- X args[2] = "/lib/386/Scrt0_s.o";
- X args[3] = "/lib/386/Sseg.o";
- X argcnt = 4;
- X for (i = 1; i < argc; i++) {
- X if (argv[i][0] == '-') {
- X switch (argv[i][1]) {
- X case 's':
- X continue;
- X }
- X }
- X args[argcnt++] = argv[i];
- X }
- X args[argcnt++] = NULL;
- X if (vflag) {
- X for (i = 0; args[i]; i++)
- X printf("%s ", args[i]);
- X putchar('\n');
- X fflush(stdout);
- X }
- X if (fork() == 0) {
- X execvp("gcc", args);
- X perror("exec error");
- X exit(1);
- X }
- X if (wait(&s) == -1 || s != 0)
- X exit(s);
- X if (vflag) {
- X printf("convcoff a.out %s\n", output);
- X fflush(stdout);
- X }
- X if (sflag)
- X s = execlp("convcoff", "convcoff", "-s", "a.out", output, NULL);
- X else
- X s = execlp("convcoff", "convcoff", "a.out", output, NULL);
- X } else {
- X argv[0] = "gcc";
- X if (vflag) {
- X for (i = 0; argv[i]; i++)
- X printf("%s ", argv[i]);
- X putchar('\n');
- X fflush(stdout);
- X }
- X execvp("gcc", argv);
- X perror("exec error");
- X }
- X exit(s);
- X}
- SHAR_EOF
- $TOUCH -am 0118092191 xcc.c &&
- chmod 0660 xcc.c ||
- echo "restore of xcc.c failed"
- set `wc -c xcc.c`;Wc_c=$1
- if test "$Wc_c" != "1516"; then
- echo original size 1516, current size $Wc_c
- fi
- # ============= coffstrip.c ==============
- echo "x - extracting coffstrip.c (Text)"
- sed 's/^X//' << 'SHAR_EOF' > coffstrip.c &&
- X/*
- X * coff strip utility
- X */
- X
- X#include <stdio.h>
- X#include <sys/types.h>
- X#include <sys/fcntl.h>
- X#include <sys/coff.h>
- X
- Xstruct filehdr fhdr;
- Xstruct scnhdr shdr;
- Xint nsyms;
- Xlong symptr;
- X
- X
- Xmain(argc, argv)
- X int argc;
- X char **argv;
- X{
- X char *fname, **argp;
- X int fd, n;
- X char buf[80];
- X
- X for (argp = argv; fname = *++argp; ) {
- X fd = open(fname, O_RDWR);
- X if (fd == -1) {
- X perror(fname); continue;
- X }
- X n = read(fd, (char *)&fhdr, sizeof fhdr);
- X if (fhdr.f_magic != I386MAGIC || n != sizeof fhdr) {
- X close(fd);
- X sprintf(buf, "strip %s\n", fname);
- X if (system(buf) == -1)
- X perror(fname);
- X continue;
- X }
- X if (fhdr.f_nsyms == 0) {
- X fprintf(stderr, "%s: already stripped\n", fname);
- X close(fd);
- X continue;
- X }
- X if (chsize(fd, (long)fhdr.f_symptr) == -1)
- X perror(fname);
- X else {
- X fhdr.f_nsyms = 0;
- X fhdr.f_flags |= F_LNNO|F_LSYMS;
- X lseek(fd, 0L, 0);
- X n = write(fd, (char *)&fhdr, sizeof fhdr);
- X if (n != sizeof fhdr)
- X perror(fname);
- X }
- X close(fd);
- X }
- X exit(0);
- X}
- X
- SHAR_EOF
- $TOUCH -am 0118145291 coffstrip.c &&
- chmod 0660 coffstrip.c ||
- echo "restore of coffstrip.c failed"
- set `wc -c coffstrip.c`;Wc_c=$1
- if test "$Wc_c" != "993"; then
- echo original size 993, current size $Wc_c
- fi
- # ============= malloc.c ==============
- echo "x - extracting malloc.c (Text)"
- sed 's/^X//' << 'SHAR_EOF' > malloc.c &&
- X/*
- X * Copyright (c) 1983 Regents of the University of California.
- X * All rights reserved.
- X *
- X * Redistribution and use in source and binary forms are permitted
- X * provided that: (1) source distributions retain this entire copyright
- X * notice and comment, and (2) distributions including binaries display
- X * the following acknowledgement: ``This product includes software
- X * developed by the University of California, Berkeley and its contributors''
- X * in the documentation or other materials provided with the distribution
- X * and in all advertising materials mentioning features or use of this
- X * software. Neither the name of the University nor the names of its
- X * contributors may be used to endorse or promote products derived
- X * from this software without specific prior written permission.
- X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- X */
- X
- X#if defined(LIBC_SCCS) && !defined(lint)
- Xstatic char sccsid[] = "@(#)malloc.c 5.9 (Berkeley) 6/1/90";
- X#endif /* LIBC_SCCS and not lint */
- X
- X/*
- X * malloc.c (Caltech) 2/21/82
- X * Chris Kingsley, kingsley@cit-20.
- X *
- X * This is a very fast storage allocator. It allocates blocks of a small
- X * number of different sizes, and keeps free lists of each size. Blocks that
- X * don't exactly fit are passed up to the next larger size. In this
- X * implementation, the available sizes are 2^n-4 (or 2^n-10) bytes long.
- X * This is designed for use in a virtual memory environment.
- X */
- X
- X#include <sys/types.h>
- X#ifdef M_XENIX
- X#include <sys/param.h>
- X#include <sys/sysmacros.h>
- X#include <sys/page.h>
- X#define u_char uchar_t
- X#define u_int uint
- X#define getpagesize() PGSIZE
- X#define bcopy(S, D, L) memcpy(D, S, L)
- X#endif
- X
- X#define NULL 0
- X
- X/*
- X * The overhead on a block is at least 4 bytes. When free, this space
- X * contains a pointer to the next free block, and the bottom two bits must
- X * be zero. When in use, the first byte is set to MAGIC, and the second
- X * byte is the size index. The remaining bytes are for alignment.
- X * If range checking is enabled then a second word holds the size of the
- X * requested block, less 1, rounded up to a multiple of sizeof(RMAGIC).
- X * The order of elements is critical: ov_magic must overlay the low order
- X * bits of ov_next, and ov_magic can not be a valid ov_next bit pattern.
- X */
- Xunion overhead {
- X union overhead *ov_next; /* when free */
- X struct {
- X u_char ovu_magic; /* magic number */
- X u_char ovu_index; /* bucket # */
- X#ifdef RCHECK
- X u_short ovu_rmagic; /* range magic number */
- X u_int ovu_size; /* actual block size */
- X#endif
- X } ovu;
- X#define ov_magic ovu.ovu_magic
- X#define ov_index ovu.ovu_index
- X#define ov_rmagic ovu.ovu_rmagic
- X#define ov_size ovu.ovu_size
- X};
- X
- X#define MAGIC 0xef /* magic # on accounting info */
- X#define RMAGIC 0x5555 /* magic # on range info */
- X
- X#ifdef RCHECK
- X#define RSLOP sizeof (u_short)
- X#else
- X#define RSLOP 0
- X#endif
- X
- X/*
- X * nextf[i] is the pointer to the next free block of size 2^(i+3). The
- X * smallest allocatable block is 8 bytes. The overhead information
- X * precedes the data area returned to the user.
- X */
- X#define NBUCKETS 30
- Xstatic union overhead *nextf[NBUCKETS];
- Xextern char *sbrk();
- X
- Xstatic int pagesz; /* page size */
- Xstatic int pagebucket; /* page size bucket */
- X
- X#ifdef MSTATS
- X/*
- X * nmalloc[i] is the difference between the number of mallocs and frees
- X * for a given block size.
- X */
- Xstatic u_int nmalloc[NBUCKETS];
- X#include <stdio.h>
- X#endif
- X
- X#if defined(DEBUG) || defined(RCHECK)
- X#define ASSERT(p) if (!(p)) botch("p")
- X#include <stdio.h>
- Xstatic
- Xbotch(s)
- X char *s;
- X{
- X fprintf(stderr, "\r\nassertion botched: %s\r\n", s);
- X (void) fflush(stderr); /* just in case user buffered it */
- X abort();
- X}
- X#else
- X#define ASSERT(p)
- X#endif
- X
- Xchar *
- Xmalloc(nbytes)
- X unsigned nbytes;
- X{
- X register union overhead *op;
- X register int bucket, n;
- X register unsigned amt;
- X
- X /*
- X * First time malloc is called, setup page size and
- X * align break pointer so all data will be page aligned.
- X */
- X if (pagesz == 0) {
- X pagesz = n = getpagesize();
- X op = (union overhead *)sbrk(0);
- X n = n - sizeof (*op) - ((int)op & (n - 1));
- X if (n < 0)
- X n += pagesz;
- X if (n) {
- X if (sbrk(n) == (char *)-1)
- X return (NULL);
- X }
- X bucket = 0;
- X amt = 8;
- X while (pagesz > amt) {
- X amt <<= 1;
- X bucket++;
- X }
- X pagebucket = bucket;
- X }
- X /*
- X * Convert amount of memory requested into closest block size
- X * stored in hash buckets which satisfies request.
- X * Account for space used per block for accounting.
- X */
- X if (nbytes <= (n = pagesz - sizeof (*op) - RSLOP)) {
- X#ifndef RCHECK
- X amt = 8; /* size of first bucket */
- X bucket = 0;
- X#else
- X amt = 16; /* size of first bucket */
- X bucket = 1;
- X#endif
- X n = -(sizeof (*op) + RSLOP);
- X } else {
- X amt = pagesz;
- X bucket = pagebucket;
- X }
- X while (nbytes > amt + n) {
- X amt <<= 1;
- X if (amt == 0)
- X return (NULL);
- X bucket++;
- X }
- X /*
- X * If nothing in hash bucket right now,
- X * request more memory from the system.
- X */
- X if ((op = nextf[bucket]) == NULL) {
- X morecore(bucket);
- X if ((op = nextf[bucket]) == NULL)
- X return (NULL);
- X }
- X /* remove from linked list */
- X nextf[bucket] = op->ov_next;
- X op->ov_magic = MAGIC;
- X op->ov_index = bucket;
- X#ifdef MSTATS
- X nmalloc[bucket]++;
- X#endif
- X#ifdef RCHECK
- X /*
- X * Record allocated size of block and
- X * bound space with magic numbers.
- X */
- X op->ov_size = (nbytes + RSLOP - 1) & ~(RSLOP - 1);
- X op->ov_rmagic = RMAGIC;
- X *(u_short *)((caddr_t)(op + 1) + op->ov_size) = RMAGIC;
- X#endif
- X return ((char *)(op + 1));
- X}
- X
- X/*
- X * Allocate more memory to the indicated bucket.
- X */
- Xmorecore(bucket)
- X int bucket;
- X{
- X register union overhead *op;
- X register int sz; /* size of desired block */
- X int amt; /* amount to allocate */
- X int nblks; /* how many blocks we get */
- X
- X /*
- X * sbrk_size <= 0 only for big, FLUFFY, requests (about
- X * 2^30 bytes on a VAX, I think) or for a negative arg.
- X */
- X sz = 1 << (bucket + 3);
- X#ifdef DEBUG
- X ASSERT(sz > 0);
- X#else
- X if (sz <= 0)
- X return;
- X#endif
- X if (sz < pagesz) {
- X amt = pagesz;
- X nblks = amt / sz;
- X } else {
- X amt = sz + pagesz;
- X nblks = 1;
- X }
- X op = (union overhead *)sbrk(amt);
- X /* no more room! */
- X if ((int)op == -1)
- X return;
- X /*
- X * Add new memory allocated to that on
- X * free list for this hash bucket.
- X */
- X nextf[bucket] = op;
- X while (--nblks > 0) {
- X op->ov_next = (union overhead *)((caddr_t)op + sz);
- X op = (union overhead *)((caddr_t)op + sz);
- X }
- X}
- X
- Xfree(cp)
- X char *cp;
- X{
- X register int size;
- X register union overhead *op;
- X
- X if (cp == NULL)
- X return;
- X op = (union overhead *)((caddr_t)cp - sizeof (union overhead));
- X#ifdef DEBUG
- X ASSERT(op->ov_magic == MAGIC); /* make sure it was in use */
- X#else
- X if (op->ov_magic != MAGIC)
- X return; /* sanity */
- X#endif
- X#ifdef RCHECK
- X ASSERT(op->ov_rmagic == RMAGIC);
- X ASSERT(*(u_short *)((caddr_t)(op + 1) + op->ov_size) == RMAGIC);
- X#endif
- X size = op->ov_index;
- X ASSERT(size < NBUCKETS);
- X op->ov_next = nextf[size]; /* also clobbers ov_magic */
- X nextf[size] = op;
- X#ifdef MSTATS
- X nmalloc[size]--;
- X#endif
- X}
- X
- X/*
- X * When a program attempts "storage compaction" as mentioned in the
- X * old malloc man page, it realloc's an already freed block. Usually
- X * this is the last block it freed; occasionally it might be farther
- X * back. We have to search all the free lists for the block in order
- X * to determine its bucket: 1st we make one pass thru the lists
- X * checking only the first block in each; if that fails we search
- X * ``realloc_srchlen'' blocks in each list for a match (the variable
- X * is extern so the caller can modify it). If that fails we just copy
- X * however many bytes was given to realloc() and hope it's not huge.
- X */
- Xint realloc_srchlen = 4; /* 4 should be plenty, -1 =>'s whole list */
- X
- Xchar *
- Xrealloc(cp, nbytes)
- X char *cp;
- X unsigned nbytes;
- X{
- X register u_int onb;
- X register int i;
- X union overhead *op;
- X char *res;
- X int was_alloced = 0;
- X
- X if (cp == NULL)
- X return (malloc(nbytes));
- X op = (union overhead *)((caddr_t)cp - sizeof (union overhead));
- X if (op->ov_magic == MAGIC) {
- X was_alloced++;
- X i = op->ov_index;
- X } else {
- X /*
- X * Already free, doing "compaction".
- X *
- X * Search for the old block of memory on the
- X * free list. First, check the most common
- X * case (last element free'd), then (this failing)
- X * the last ``realloc_srchlen'' items free'd.
- X * If all lookups fail, then assume the size of
- X * the memory block being realloc'd is the
- X * largest possible (so that all "nbytes" of new
- X * memory are copied into). Note that this could cause
- X * a memory fault if the old area was tiny, and the moon
- X * is gibbous. However, that is very unlikely.
- X */
- X if ((i = findbucket(op, 1)) < 0 &&
- X (i = findbucket(op, realloc_srchlen)) < 0)
- X i = NBUCKETS;
- X }
- X onb = 1 << (i + 3);
- X if (onb < pagesz)
- X onb -= sizeof (*op) + RSLOP;
- X else
- X onb += pagesz - sizeof (*op) - RSLOP;
- X /* avoid the copy if same size block */
- X if (was_alloced) {
- X if (i) {
- X i = 1 << (i + 2);
- X if (i < pagesz)
- X i -= sizeof (*op) + RSLOP;
- X else
- X i += pagesz - sizeof (*op) - RSLOP;
- X }
- X if (nbytes <= onb && nbytes > i) {
- X#ifdef RCHECK
- X op->ov_size = (nbytes + RSLOP - 1) & ~(RSLOP - 1);
- X *(u_short *)((caddr_t)(op + 1) + op->ov_size) = RMAGIC;
- X#endif
- X return(cp);
- X } else
- X free(cp);
- X }
- X if ((res = malloc(nbytes)) == NULL)
- X return (NULL);
- X if (cp != res) /* common optimization if "compacting" */
- X bcopy(cp, res, (nbytes < onb) ? nbytes : onb);
- X return (res);
- X}
- X
- X/*
- X * Search ``srchlen'' elements of each free list for a block whose
- X * header starts at ``freep''. If srchlen is -1 search the whole list.
- X * Return bucket number, or -1 if not found.
- X */
- Xstatic
- Xfindbucket(freep, srchlen)
- X union overhead *freep;
- X int srchlen;
- X{
- X register union overhead *p;
- X register int i, j;
- X
- X for (i = 0; i < NBUCKETS; i++) {
- X j = 0;
- X for (p = nextf[i]; p && j != srchlen; p = p->ov_next) {
- X if (p == freep)
- X return (i);
- X j++;
- X }
- X }
- X return (-1);
- X}
- X
- X#ifdef MSTATS
- X/*
- X * mstats - print out statistics about malloc
- X *
- X * Prints two lines of numbers, one showing the length of the free list
- X * for each size category, the second showing the number of mallocs -
- X * frees for each size category.
- X */
- Xmstats(s)
- X char *s;
- X{
- X register int i, j;
- X register union overhead *p;
- X int totfree = 0,
- X totused = 0;
- X
- X fprintf(stderr, "Memory allocation statistics %s\nfree:\t", s);
- X for (i = 0; i < NBUCKETS; i++) {
- X for (j = 0, p = nextf[i]; p; p = p->ov_next, j++)
- X ;
- X fprintf(stderr, " %d", j);
- X totfree += j * (1 << (i + 3));
- X }
- X fprintf(stderr, "\nused:\t");
- X for (i = 0; i < NBUCKETS; i++) {
- X fprintf(stderr, " %d", nmalloc[i]);
- X totused += nmalloc[i] * (1 << (i + 3));
- X }
- X fprintf(stderr, "\n\tTotal in use: %d, total free: %d\n",
- X totused, totfree);
- X}
- X#endif
- X
- SHAR_EOF
- $TOUCH -am 0113162191 malloc.c &&
- chmod 0600 malloc.c ||
- echo "restore of malloc.c failed"
- set `wc -c malloc.c`;Wc_c=$1
- if test "$Wc_c" != "10837"; then
- echo original size 10837, current size $Wc_c
- fi
- # ============= libX11_ver.c ==============
- echo "x - extracting libX11_ver.c (Text)"
- sed 's/^X//' << 'SHAR_EOF' > libX11_ver.c &&
- Xint libX11_version = VERSION;
- SHAR_EOF
- $TOUCH -am 0112133391 libX11_ver.c &&
- chmod 0660 libX11_ver.c ||
- echo "restore of libX11_ver.c failed"
- set `wc -c libX11_ver.c`;Wc_c=$1
- if test "$Wc_c" != "30"; then
- echo original size 30, current size $Wc_c
- fi
- # ============= libXaw_s.c ==============
- echo "x - extracting libXaw_s.c (Text)"
- sed 's/^X//' << 'SHAR_EOF' > libXaw_s.c &&
- X/*
- X * Prefix file and jump table for Xaw shared library
- X *
- X * Author: P.Garbha pgd@compuram.bbt.se
- X */
- X
- X/*
- X * Identifier to autload library
- X */
- Xchar __SHLIB__libXaw_s;
- X
- X__JumpTabEnd()
- X{
- X}
- X
- Xextern void (*_shlib_exit)();
- X
- X/*
- X * exit routine to use from within library
- X */
- Xexit(status)
- X int status;
- X{
- X _shlib_exit(status);
- X}
- X
- SHAR_EOF
- $TOUCH -am 0116154591 libXaw_s.c &&
- chmod 0660 libXaw_s.c ||
- echo "restore of libXaw_s.c failed"
- set `wc -c libXaw_s.c`;Wc_c=$1
- if test "$Wc_c" != "323"; then
- echo original size 323, current size $Wc_c
- fi
- # ============= xenix.cf ==============
- echo "x - extracting xenix.cf (Text)"
- sed 's/^X//' << 'SHAR_EOF' > xenix.cf &&
- X/*
- X * SET VERSION NUMBERS BEFORE MAKING MAKEFILES; also, you'll need to install
- X * util/scripts/bsdinstall.sh before doing a "make install"
- X */
- X#define SystemV YES
- X#define OSName Xenix/386 System V Release 2.3.3
- X#define OSMajorVersion 3
- X#define OSMinorVersion 2
- X#define OPERATING_SYSTEM sysV
- X/**/# platform: $XConsortium: xenix.cf,v 1.0 90/03/10 15:39:46 jim Exp $
- X/**/# operating system: OSName
- X/*****************************************************************************
- X * Platform-specfic parameters *
- X *****************************************************************************/
- X#define RemoveTargetProgramByMoving YES
- X#define BootstrapCFlags -Dxenix -DSYSV
- X#define StandardDefines /* -Datt */ -Dxenix -DSYSV -DUSG /* -DUSE_ASM */
- X#define StandardCppDefines /* -Datt */ -Dxenix -DSYSV -DUSG /* -DUSE_ASM */
- X#define ExecableScripts NO
- X#define ExtraLibraries -lcfp -lgnu -lx -lXc
- X#define Server_Extra_Libraries -levent -lsocket -lcfp -lgnu -lx
- X#define ExtraLoadFlags -g
- X#define Server_Extra_Load_Flags -g
- X#define HasVoidSignalReturn YES
- X#define NeedBerklibInXlib YES
- X#define ConnectionFlags -DUNIXCONN -DLOCALCONN
- X#define HasNdbm NO
- X#define HasSdbm YES
- X#define HasGcc YES
- X#define HasRcc NO
- X#define CcCmd xcc
- X#define CppCmd /lib/cpp
- X#define LdCombineFlags -r
- X#define ManDir /usr/man/man.X
- X#define ManDirectoryRoot /usr/man
- X#define ManSuffix X
- X#define UNCOMPRESSPATH /usr/bin/uncompress
- X#define DefaultUserPath .:/bin:/usr/bin:/usr/bin/X11:/usr/local
- X#define DefaultSystemPath .:/bin:/usr/bin:/usr/bin/X11:/usr/local:/etc
- X#define StripInstalledPrograms YES
- X/* #define LibraryCCOptions -DATTSHLIB */
- X#define LibraryCCOptions
- X#define RanlibCmd ranlib
- X#define FontDefines -DFONT_SNF -DFONT_BDF -DCOMPRESSED_FONTS StandardDefines
- X#define BuildExamples NO
- X#define XibmServer Xibm
- X#define ibmIncludeVGA YES
- X#define BuildServer YES
- X#define ServerCDebugFlags -DTRACE_X -DDEBUG
- X#define ServerDefines StandardDefines ExtensionDefines -DNO_FUNCTION_PROTOTYPES
- X#define InstallCmd $(SCRIPTSRC)/install.sh
- X#define AsCmd gas
- X#define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/75dpi/
- X#define UsrLibDir /lib/386
- X#define LibDir /usr/lib/X11
- X#define LintlibDir /usr/lib/lint
- X#define InstallLibrary(libname,dest) @@\
- Xinstall:: lib/**/libname.a @@\
- X rm -f Slib/**/libname.a @@\
- X ln lib/**/libname.a Slib/**/libname.a @@\
- X $(INSTALL) -c $(INSTLIBFLAGS) Slib/**/libname.a dest @@\
- X $(RANLIB) $(RANLIBINSTFLAGS) dest/Slib/**/libname.a
- X#define Xenix386
- X#define Xenix
- X#define NdbmDefines -DSDBM
- X#define HasSockets
- X#define InstallXinitConfig YES
- X#define InstallXdmConfig YES
- X#define ManSuffix X
- X
- X/*
- X * Define if you have shared library
- X */
- X#define HasSharedLibraries YES
- X#if HasSharedLibraries
- X#define SharedLibXext NO
- X#define SharedLibX YES
- X#define SharedLibXmu NO
- X#define SharedLibXt YES
- X#define SharedLibXaw YES
- X
- X/*
- X * Nulling of these functions is because the xenix library are using
- X * the normal library for the build.
- X */
- X#define SharedLibraryObjectRule()
- X#define SharedAndDebuggedLibraryObjectRule()
- X#define SpecialSharedAndDebuggedObjectRule(objs,depends,options)
- X#define SpecialSharedObjectRule(objs,depends,options)
- X#define InstallSharedLibrary(libname,rev,dest)
- X#define InstallSharedLibraryData(libname,rev,dest)
- X#define NormalSharedLibraryTarget(libname,rev,solist)
- X#define NormalSharedLibraryDataTarget(libname,rev,salist)
- X
- X#if 1
- X#if SharedLibXext
- X#define EXTENSIONLIB_Defined
- X EXTENSIONLIB = -LXext_s
- X#endif
- X#if SharedLibX
- X#define XLIB_Defined
- X XLIB = $(EXTENSIONLIB) -LX11_s
- X#endif
- X#if SharedLibXmu
- X#define XMULIB_Defined
- X XMULIB = -LXmu_s
- X#endif
- X#if SharedLibXt
- X#define XTOOLLIB_Defined
- X XTOOLLIB = -LXt_s
- X#endif
- X#if SharedLibX
- X#define XAWLIB_Defined
- X XAWLIB = -LXaw_s
- X#endif
- X#endif
- X
- X#define XawClientLibs $(XAWLIB) $(XMULIB) $(XLIB)
- X#endif
- X
- X/*
- X * ServerTarget - generate rules to compile, link, and relink an X server.
- X */
- X#define ServerTarget(server,subdirs,objects,libs,syslibs) @@\
- Xserver: subdirs objects libs @@\
- X -@if [ -f server ]; then echo " $(MV) server server.bak"; \ @@\
- X $(MV) server server.bak; else exit 0; fi @@\
- X gcc $(CDEBUGFLAGS) $(CCOPTIONS) -o server objects libs Server_Extra_Libraries syslibs Server_Extra_Load_Flags @@\
- X @@\
- Xload/**/server: @@\
- X -@if [ -f server ]; then echo " $(MV) server server.bak"; \ @@\
- X $(MV) server server.bak; else exit 0; fi @@\
- X $(CC) $(CDEBUGFLAGS) $(CCOPTIONS) -o server objects libs $(EXTRA_LIBRARIES) syslibs $(EXTRA_LOAD_FLAGS)
- X#define FilesToClean *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut a.out
- SHAR_EOF
- $TOUCH -am 0122195191 xenix.cf &&
- chmod 0660 xenix.cf ||
- echo "restore of xenix.cf failed"
- set `wc -c xenix.cf`;Wc_c=$1
- if test "$Wc_c" != "4678"; then
- echo original size 4678, current size $Wc_c
- fi
- # ============= Project.example ==============
- echo "x - extracting Project.example (Text)"
- sed 's/^X//' << 'SHAR_EOF' > Project.example &&
- X#if SharedLibXext
- X DEPEXTENSIONLIB = /* _Use($(USRLIBDIR),$(EXTENSIONSRC)/lib)/libXext.so.$(SOXEXTREV) */
- X#ifndef EXTENSIONLIB_Defined
- X EXTENSIONLIB = _Use(-lXext,-L$(EXTENSIONSRC) -lXext)
- X#endif
- X#else
- X DEPEXTENSIONLIB = _Use($(USRLIBDIR),$(EXTENSIONSRC)/lib)/libXext.a
- X EXTENSIONLIB = LoaderLibPrefix _Use(-lXext, $(DEPEXTENSIONLIB))
- X#endif
- X#if SharedLibX
- X DEPXLIB = $(DEPEXTENSIONLIB) /* _Use($(USRLIBDIR),$(XLIBSRC))/libX11.so.$(SOXLIBREV) */
- X#ifndef XLIB_Defined
- X XLIB = $(EXTENSIONLIB) _Use(-lX11,-L$(XLIBSRC) -lX11)
- X#endif
- X#else
- X DEPXLIB = $(DEPEXTENSIONLIB) _Use($(USRLIBDIR),$(XLIBSRC))/libX11.a
- X XLIB = $(EXTENSIONLIB) LoaderLibPrefix _Use(-lX11,$(XLIBSRC)/libX11.a)
- X#endif
- X DEPXAUTHLIB = _Use($(USRLIBDIR),$(XAUTHSRC))/libXau.a
- X#ifndef XAUTHLIB_Defined
- X XAUTHLIB = LoaderLibPrefix _Use(-lXau,$(DEPXAUTHLIB))
- X#endif
- X#if SharedLibXmu
- X DEPXMULIB = /* _Use($(USRLIBDIR),$(XMUSRC))/libXmu.so.$(SOXMUREV) */
- X#ifndef XMULIB_Defined
- X XMULIB = _Use(-lXmu,-L$(XMUSRC) -lXmu)
- X#endif
- X#else
- X DEPXMULIB = _Use($(USRLIBDIR),$(XMUSRC))/libXmu.a
- X XMULIB = LoaderLibPrefix _Use(-lXmu,$(DEPXMULIB))
- X#endif
- X#if SharedOldLibX
- X DEPOLDXLIB = /* _Use($(USRLIBDIR),$(OLDXLIBSRC))/liboldX.so.$(SOOLDXREV) */
- X#ifndef OLDXLIB_Defined
- X OLDXLIB = _Use(-loldX,-L$(OLDXLIBSRC) -loldX)
- X#endif
- X#else
- X DEPOLDXLIB = _Use($(USRLIBDIR),$(OLDXLIBSRC))/liboldX.a
- X OLDXLIB = LoaderLibPrefix _Use(-loldX,$(DEPOLDXLIB))
- X#endif
- X#if SharedLibXt
- X DEPXTOOLLIB = /* _Use($(USRLIBDIR),$(TOOLKITSRC))/libXt.so.$(SOXTREV) */
- X#ifndef XTOOLLIB_Defined
- X XTOOLLIB = _Use(-lXt,-L$(TOOLKITSRC) -lXt)
- X#endif
- X#else
- X DEPXTOOLLIB = _Use($(USRLIBDIR),$(TOOLKITSRC))/libXt.a
- X XTOOLLIB = LoaderLibPrefix _Use(-lXt,$(DEPXTOOLLIB))
- X#endif
- X#if SharedLibXaw
- X DEPXAWLIB = /* _Use($(USRLIBDIR),$(AWIDGETSRC))/libXaw.so.$(SOXAWREV) */
- X#ifndef XAWLIB_Defined
- X XAWLIB = _Use(-lXaw,-L$(AWIDGETSRC) -lXaw)
- X#endif
- X#else
- X DEPXAWLIB = _Use($(USRLIBDIR),$(AWIDGETSRC))/libXaw.a
- X XAWLIB = LoaderLibPrefix _Use(-lXaw,$(DEPXAWLIB))
- X#endif
- SHAR_EOF
- $TOUCH -am 0122180791 Project.example &&
- chmod 0660 Project.example ||
- echo "restore of Project.example failed"
- set `wc -c Project.example`;Wc_c=$1
- if test "$Wc_c" != "2158"; then
- echo original size 2158, current size $Wc_c
- fi
- exit 0
-