mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Remove Unixware and openserver support
This commit is contained in:
parent
beea573d17
commit
07900bd93b
375 changed files with 725 additions and 9112 deletions
|
|
@ -159,10 +159,6 @@ PLATFORM=hpux
|
|||
PLATFORM=aix
|
||||
#elif defined(AlphaArchitecture)
|
||||
PLATFORM=digital
|
||||
#elif defined(USLArchitecture)
|
||||
PLATFORM=usl
|
||||
#elif defined(SVR4Architecture) && defined(i386Architecture)
|
||||
PLATFORM=usl
|
||||
#elif defined(SystemV4) && defined(i386)
|
||||
PLATFORM=solaris-386
|
||||
#elif defined(SystemV4)
|
||||
|
|
|
|||
|
|
@ -259,28 +259,6 @@ XCOMM $TOG: Imake.cf /main/30 1998/04/28 13:55:25 barstow $
|
|||
# define HPArchitecture
|
||||
#endif /* hpux */
|
||||
|
||||
#ifdef sco
|
||||
# define MacroIncludeFile <sco.cf>
|
||||
# define MacroFile sco.cf
|
||||
# undef sco
|
||||
# undef USL
|
||||
# undef SYSV
|
||||
# undef i386
|
||||
/* # define i386Architecture */
|
||||
# define SCOArchitecture
|
||||
#endif /* sco */
|
||||
|
||||
#ifdef USL
|
||||
# define MacroIncludeFile <usl.cf>
|
||||
# define MacroFile usl.cf
|
||||
# undef USL
|
||||
# undef SVR4
|
||||
# undef i386
|
||||
# define SVR4Architecture
|
||||
# define i386Architecture
|
||||
# define USLArchitecture
|
||||
#endif /* USL */
|
||||
|
||||
#ifdef NCR
|
||||
# define MacroIncludeFile <ncr.cf>
|
||||
# define MacroFile ncr.cf
|
||||
|
|
|
|||
|
|
@ -92,7 +92,6 @@ sun.cf \
|
|||
svr3.cf \
|
||||
svr4.cf \
|
||||
ultrix.cf \
|
||||
usl.cf \
|
||||
x386.cf \
|
||||
xfree86.cf
|
||||
|
||||
|
|
|
|||
|
|
@ -1,72 +0,0 @@
|
|||
XCOMM platform: $XConsortium: sco.cf /main/5 1996/12/04 10:12:36 swick $
|
||||
|
||||
#ifndef OSName
|
||||
#define OSName SCO OpenServer Release 5
|
||||
#endif
|
||||
#ifndef OSVendor
|
||||
#define OSVendor SCO
|
||||
#endif
|
||||
#ifndef OSMajorVersion
|
||||
#define OSMajorVersion 5
|
||||
#endif
|
||||
#ifndef OSMinorVersion
|
||||
#define OSMinorVersion 0
|
||||
#endif
|
||||
#ifndef OSTeenyVersion
|
||||
#define OSTeenyVersion 0
|
||||
#endif
|
||||
|
||||
#if OSMajorVersion < 5 /* Must be 3.2v4 (not fully tested) */
|
||||
#define StandardDefines -Dsco -Dsco324 -DSYSV -Di386
|
||||
#else
|
||||
#define StandardDefines -Dsco -DSYSV -Di386
|
||||
#define DefaultCCOptions -b elf
|
||||
#endif
|
||||
|
||||
#define CcCmd cc
|
||||
#define NeedWidePrototypes NO
|
||||
#define ServerExtraDefines -DSTATIC_COLOR -DAVOID_GLYPHBLT -DPIXPRIV
|
||||
#define ServerOSDefines -DDDXTIME -DDDXOSINIT -DSERVER_LOCK
|
||||
#define ToolkitStringsABIOptions -intelabi
|
||||
#define XawI18nDefines -DHAS_WCHAR_H -DHAS_ISW_FUNCS
|
||||
#define ExtraLibraries -lsocket
|
||||
#define ExtraLoadOptions -b elf
|
||||
#define ThreadedX NO
|
||||
#define HasThreadSafeAPI NO
|
||||
#define HasNdbm YES
|
||||
#define HasVFork YES
|
||||
#define ExecableScripts YES
|
||||
#define HasShadowPasswd YES
|
||||
|
||||
|
||||
XCOMM Uncomment the following line to build static COFF libraries
|
||||
XCOMM #define ForceNormalLib YES
|
||||
#define SharedLibXmu NO
|
||||
|
||||
#define XnestServer YES
|
||||
|
||||
#define SystemV YES
|
||||
#define LdCombineFlags -r
|
||||
|
||||
#define HasLdRunPath YES
|
||||
#define HasPoll YES
|
||||
#define PatheticCpp YES
|
||||
#define Malloc0ReturnsNull YES /* in case -lmalloc used */
|
||||
|
||||
#define ArCmdBase ar
|
||||
#define AsCmd as
|
||||
#define CppCmd /lib/cpp
|
||||
#define LdCmd ld
|
||||
#define LexCmd lex
|
||||
#define MakeCmd make
|
||||
#define YaccCmd yacc
|
||||
|
||||
#define ConnectionFlags -DUNIXCONN -DLOCALCONN -DTCPCONN -DFD_SETSIZE=256
|
||||
|
||||
#include <scoLib.rules> /* minor changes to sv4Lib.rules */
|
||||
#include <sv4Lib.rules>
|
||||
|
||||
#define DtSvcDefines -DMULTIBYTE
|
||||
#define DtSearchDefines -DI18N_MSG DtSvcDefines
|
||||
#define DtWidgetDefines DtSearchDefines
|
||||
#define DtPrintDefines DtSearchDefines
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
XCOMM $XConsortium: scoLib.rules /main/2 1996/09/28 16:12:20 rws $
|
||||
|
||||
/*
|
||||
* SharedLibraryTarget3 - generate rules to create a shared library;
|
||||
* build it into a different name so that we do not hose people by having
|
||||
* the library gone for long periods.
|
||||
*
|
||||
* Work around SCO sh environment size problem.
|
||||
*/
|
||||
#ifndef SharedLibraryTarget3
|
||||
#define SharedLibraryTarget3(libname,rev,solist1,solist2,solist3,down,up) @@\
|
||||
AllTarget(Concat(lib,libname.so.rev)) @@\
|
||||
@@\
|
||||
Concat(lib,libname.so.rev): solist1 solist2 solist3 $(EXTRALIBRARYDEPS) @@\
|
||||
$(RM) $@~ @@\
|
||||
echo -n $(LD) -o up/$@~ $(SHLIBLDFLAGS) -h $@ solist1 " " > Concat(down/lib,cmd) @@\
|
||||
echo -n solist2 " " >> Concat(down/lib,cmd) @@\
|
||||
echo -n solist3 >> Concat(down/lib,cmd) @@\
|
||||
(cd down; $(SHELL) Concat(./lib,cmd)) @@\
|
||||
$(RM) $@ Concat(lib,tmp1) Concat(lib,tmp2) @@\
|
||||
$(MV) $@~ $@ @@\
|
||||
$(RM) Concat(lib,libname.so) @@\
|
||||
$(LN) $@ Concat(lib,libname.so) @@\
|
||||
LinkBuildLibrary($@) @@\
|
||||
LinkBuildLibrary(Concat(lib,libname.so)) @@\
|
||||
@@\
|
||||
clean:: @@\
|
||||
$(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
|
||||
|
||||
#endif /* SharedLibraryTarget */
|
||||
|
||||
/*
|
||||
* Redefine this so we can drop -b elf and build COFF objects for the
|
||||
* archived library. This assumes -b elf is hanging out in CCOPTIONS
|
||||
*/
|
||||
#ifndef UnsharedLibObjCompile
|
||||
#define UnsharedLibObjCompile(options) RemoveFile($@) @@\
|
||||
ClearmakeOSName \
|
||||
$(CC) -c $(CDEBUGFLAGS) $(THREADS_CFLAGS) $(ALLDEFINES) options $*.c @@\
|
||||
$(MV) $@ unshared/$@
|
||||
#endif
|
||||
|
||||
|
|
@ -33,8 +33,7 @@ XCOMM site: $TOG: site.def /main/23 1998/03/19 18:43:26 mgreess $
|
|||
* the two following macros need to be defined directly (accordingly to the
|
||||
* TopLevelProject macro defined above).
|
||||
*/
|
||||
# if defined(SunArchitecture) || defined(AIXArchitecture) \
|
||||
|| defined(USLArchitecture)
|
||||
# if defined(SunArchitecture) || defined(AIXArchitecture)
|
||||
# ifndef ProjectRulesFile
|
||||
# define ProjectRulesFile <cde.rules>
|
||||
# endif
|
||||
|
|
@ -74,7 +73,7 @@ XCOMM site: $TOG: site.def /main/23 1998/03/19 18:43:26 mgreess $
|
|||
# endif
|
||||
# endif
|
||||
|
||||
# if defined(USLArchitecture) || defined(AIXArchitecture)
|
||||
# if defined(AIXArchitecture)
|
||||
# define HasCplusplus YES
|
||||
# endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,121 +0,0 @@
|
|||
XCOMM platform: $TOG: usl.cf /main/51 1998/03/23 12:27:39 mgreess $
|
||||
|
||||
#ifndef OSName
|
||||
# define OSName DefaultOSName
|
||||
#endif
|
||||
#ifndef OSMajorVersion
|
||||
# define OSMajorVersion DefaultOSMajorVersion
|
||||
#endif
|
||||
#ifndef OSMinorVersion
|
||||
# define OSMinorVersion DefaultOSMinorVersion
|
||||
#endif
|
||||
#ifndef OSTeenyVersion
|
||||
# define OSTeenyVersion DefaultOSTeenyVersion
|
||||
#endif
|
||||
XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
|
||||
|
||||
#ifndef CcCmd
|
||||
# define CcCmd /usr/ccs/bin/cc
|
||||
#endif
|
||||
#ifndef CplusplusCmd
|
||||
# define CplusplusCmd /usr/ccs/bin/CC
|
||||
#endif
|
||||
#ifndef CplusplusFilt
|
||||
# define CplusplusFilt /usr/ccs/bin/c++filt
|
||||
#endif
|
||||
#ifndef CplusplusDependIncludes
|
||||
# define CplusplusDependIncludes -I/usr/include/CC
|
||||
#endif
|
||||
|
||||
#define BootstrapCFlags /* none needed */
|
||||
#define StandardDefines -DUSL -DSVR4 -Di386
|
||||
#define NeedWidePrototypes NO /* experimental */
|
||||
#define ServerExtraDefines -D__USLC__ XFree86ServerDefines
|
||||
#define ServerOSDefines -DDDXTIME XFree86ServerOSDefines
|
||||
#define ToolkitStringsABIOptions -intelabi
|
||||
#if OSMajorVersion < 2
|
||||
#define XawI18nDefines -DHAS_WCTYPE_H -DHAS_ISW_FUNCS
|
||||
#else
|
||||
#define XawI18nDefines -DHAS_WCHAR_H -DHAS_ISW_FUNCS
|
||||
#endif
|
||||
|
||||
#if OSMajorVersion == 2
|
||||
# if OSMinorVersion == 0
|
||||
# define ExtraLibraries -lsocket -lnsl -lgen -lw
|
||||
# else
|
||||
# define ExtraLibraries -lsocket -lnsl -L/usr/ccs/lib -lgen
|
||||
# endif
|
||||
|
||||
# define ThreadedX YES
|
||||
# define HasThreadSafeAPI NO
|
||||
/* UnixWare does not have MT-safe pwd routines. */
|
||||
# define MTSafeAPIDefines -DXUSE_MTSAFE_API -DXNO_MTSAFE_PWDAPI \
|
||||
-DXNO_MTSAFE_GRPAPI
|
||||
# define SystemMTDefines -D_REENTRANT
|
||||
# define ThreadsLibraries -lthread
|
||||
# define ThreadsCplusplusLibraries -lthread
|
||||
# define DefaultCCOptions -W0,-2A -Xa -Dasm=__asm
|
||||
#endif
|
||||
#define BuildLibPathVar LD_LIBRARY_PATH
|
||||
|
||||
#ifndef UseExportLists
|
||||
# define UseExportLists YES
|
||||
#endif
|
||||
|
||||
#define GencatFlags -m
|
||||
|
||||
#include <svr4.cf>
|
||||
|
||||
/*
|
||||
* When generating templates the UnixWare 2.02 C++ compiler leaves
|
||||
* protected .i files behind. Remove them so other people can
|
||||
* compile too.
|
||||
*/
|
||||
#ifndef ObjectCplusplusCompile
|
||||
#define ObjectCplusplusCompile(options) RemoveFiles($@ $*.i) @@\
|
||||
ClearmakeOSName \
|
||||
$(CXX) -c $(CXXFLAGS) options $*.CCsuf
|
||||
#endif
|
||||
|
||||
/* USL does not have a shared regex library. */
|
||||
#define UseLocalRegex YES
|
||||
|
||||
#define XmDefines \
|
||||
-DNO_REGCOMP -DNEED_STRCASECMP \
|
||||
-DSUPPORT_ZERO_WIDTH -DHAS_WIDECHAR_FUNCTIONS
|
||||
#define DtSvcDefines -DMULTIBYTE -DNO_REGCOMP
|
||||
#define DtSearchDefines -DI18N_MSG DtSvcDefines
|
||||
#define DtWidgetDefines DtSearchDefines
|
||||
#define DtPrintDefines DtSearchDefines
|
||||
|
||||
#define HasStrcasecmp NO
|
||||
|
||||
/* For DtHelp's TIFF processing routines. */
|
||||
#define LSBBitOrder YES
|
||||
|
||||
#define ArchitectureDefines -DUSL_ARCHITECTURE
|
||||
|
||||
#define ExportListGenSource elistgen.usl
|
||||
#define ShlibExportListOpt(filename) Concat(-Bexport:,filename)
|
||||
|
||||
/* Remove -lc because select.o is not relocatable. */
|
||||
/* Remove -lgen (and set UseLocalRegex) because no shared library exists. */
|
||||
#if OSMajorVersion == 2
|
||||
# if OSMinorVersion == 0
|
||||
# define SharedXmReqs $(LDPRELIBS) SharedXReqs -lsocket -lnsl -lw
|
||||
# define SharedMrmReqs $(LDPRELIBS) $(XMLIB) SharedXReqs -lsocket -lnsl -lw
|
||||
# define SharedUilReqs $(LDPRELIBS) $(MRESOURCELIB) $(XMLIB) SharedXReqs -lsocket -lnsl -lw
|
||||
# else
|
||||
# define SharedXmReqs $(LDPRELIBS) SharedXReqs -lsocket -lnsl
|
||||
# define SharedMrmReqs $(LDPRELIBS) $(XMLIB) SharedXReqs -lsocket -lnsl
|
||||
# define SharedUilReqs $(LDPRELIBS) $(MRESOURCELIB) $(XMLIB) SharedXReqs -lsocket -lnsl
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* <X11/Xos_r.h> requires process locking for missing _r functions */
|
||||
#define TtClientLibs $(TTLIB) $(XTOOLLIB) $(XLIB)
|
||||
#define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
|
||||
|
||||
#define CdeProjectDefines \
|
||||
-DANSICPP -DMULTIBYTE -DNLS16 -DNEED_STRCASECMP \
|
||||
-DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion
|
||||
|
|
@ -52,14 +52,6 @@ XCOMM platform: $XConsortium: x386.cf /main/15 1996/09/28 16:14:00 rws $
|
|||
#define PosixLibraries /**/
|
||||
#endif
|
||||
|
||||
#ifdef SCO
|
||||
#define OSDefines -DSCO -DBROKEN_FTOL -DNO_PROTOTYPE -D_SVID
|
||||
#define OSVendor "Santa Cruz Operation Ltd."
|
||||
#define LocalLibraries -lpt
|
||||
#define SocketLibraries -lsocket
|
||||
#define PosixLibraries /**/
|
||||
#endif
|
||||
|
||||
#ifdef ATT
|
||||
#define OSDefines -DATT
|
||||
#define OSVendor "AT&T"
|
||||
|
|
|
|||
|
|
@ -73,18 +73,10 @@ in this Software without prior written authorization from The Open Group.
|
|||
#define imake_ccflags "-DSYSV"
|
||||
#endif
|
||||
|
||||
#if defined(USL) || defined(__USLC__) || defined(Oki) || defined(NCR)
|
||||
#if defined(Oki) || defined(NCR)
|
||||
#define imake_ccflags "-Xa -DSVR4"
|
||||
#endif
|
||||
|
||||
/* SCO may define __USLC__ so put this after the USL check */
|
||||
#if defined(M_UNIX) || defined(_SCO_DS)
|
||||
#ifdef imake_ccflags
|
||||
#undef imake_ccflags
|
||||
#endif
|
||||
#define imake_ccflags "-Dsco"
|
||||
#endif
|
||||
|
||||
#ifdef sony
|
||||
#if defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV)
|
||||
#define imake_ccflags "-DSVR4"
|
||||
|
|
@ -208,7 +200,7 @@ in this Software without prior written authorization from The Open Group.
|
|||
* descriptor onto another, define such a mechanism here (if you don't
|
||||
* already fall under the existing category(ies).
|
||||
*/
|
||||
#if defined(SYSV) && !defined(_CRAY) && !defined(Mips) && !defined(_SEQUENT_) && !defined(sco)
|
||||
#if defined(SYSV) && !defined(_CRAY) && !defined(Mips) && !defined(_SEQUENT_)
|
||||
#define dup2(fd1,fd2) ((fd1 == fd2) ? fd1 : (close(fd2), \
|
||||
fcntl(fd1, F_DUPFD, fd2)))
|
||||
#endif
|
||||
|
|
@ -223,7 +215,7 @@ in this Software without prior written authorization from The Open Group.
|
|||
* all colons). One way to tell if you need this is to see whether or not
|
||||
* your Makefiles have no tabs in them and lots of @@ strings.
|
||||
*/
|
||||
#if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || defined(sco) || defined(__llvm__) || (defined(AMOEBA) && defined(CROSS_COMPILE))
|
||||
#if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || defined(__llvm__) || (defined(AMOEBA) && defined(CROSS_COMPILE))
|
||||
#define FIXUP_CPP_WHITESPACE
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
|
|
@ -308,7 +300,7 @@ char *cpp_argv[ARGUMENTS] = {
|
|||
#ifdef unix
|
||||
"-Uunix", /* remove unix symbol so that filename unix.c okay */
|
||||
#endif
|
||||
#if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(MACH) || defined(USL) || defined(sco) || defined(ISC) || defined(linux) || defined(__hpux__) || defined(__vxworks)
|
||||
#if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(MACH) || defined(ISC) || defined(linux) || defined(__hpux__) || defined(__vxworks)
|
||||
# ifdef __i386__
|
||||
"-D__i386__",
|
||||
# endif
|
||||
|
|
@ -365,9 +357,6 @@ char *cpp_argv[ARGUMENTS] = {
|
|||
#if defined(macII) || defined(_AUX_SOURCE)
|
||||
"-DmacII", /* Apple A/UX */
|
||||
#endif
|
||||
#if defined(USL) || defined(__USLC__)
|
||||
"-DUSL", /* USL */
|
||||
#endif
|
||||
#ifdef sony
|
||||
"-Dsony", /* Sony */
|
||||
#if !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV) && NEWSOS < 42
|
||||
|
|
@ -424,12 +413,6 @@ char *cpp_argv[ARGUMENTS] = {
|
|||
"-DSVR4",
|
||||
# endif
|
||||
#endif /* MOTOROLA */
|
||||
#if defined(M_UNIX) || defined(sco)
|
||||
"-Dsco",
|
||||
# if defined(sco324)
|
||||
"-Dsco324",
|
||||
# endif
|
||||
#endif
|
||||
#ifdef i386
|
||||
"-Di386",
|
||||
# ifdef SVR4
|
||||
|
|
@ -453,12 +436,6 @@ char *cpp_argv[ARGUMENTS] = {
|
|||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# ifdef SCO
|
||||
"-DSCO",
|
||||
# ifdef SCO324
|
||||
"-DSCO324",
|
||||
# endif
|
||||
# endif
|
||||
# ifdef ESIX
|
||||
"-DESIX",
|
||||
# endif
|
||||
|
|
@ -493,12 +470,6 @@ char *cpp_argv[ARGUMENTS] = {
|
|||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# ifdef SCO
|
||||
"-DSCO",
|
||||
# ifdef SCO324
|
||||
"-DSCO324",
|
||||
# endif
|
||||
# endif
|
||||
# ifdef ESIX
|
||||
"-DESIX",
|
||||
# endif
|
||||
|
|
@ -623,12 +594,6 @@ char *cpp_argv[ARGUMENTS] = {
|
|||
# define DEFAULT_OS_MINOR_REV "r %*[^.].%*d.%1s"
|
||||
# define DEFAULT_OS_TEENY_REV "r %*[^.].%*d.%*c%[0-9]"
|
||||
# define DEFAULT_OS_NAME "srvm %[^\n]"
|
||||
#elif defined(USL) || defined(__USLC__)
|
||||
/* uname -v returns "x.yz" or "x.y.z", e.g. "2.02" or "2.1.2". */
|
||||
# define DEFAULT_OS_MAJOR_REV "v %[0-9]"
|
||||
# define DEFAULT_OS_MINOR_REV "v %*d.%1s"
|
||||
# define DEFAULT_OS_TEENY_REV "v %*d.%*c%[.0-9]"
|
||||
# define DEFAULT_OS_NAME "srvm %[^\n]"
|
||||
#elif defined(__osf__)
|
||||
/* uname -r returns "Wx.y", e.g. "V3.2" or "T4.0" */
|
||||
# define DEFAULT_OS_MAJOR_REV "r %*[^0-9]%[0-9]"
|
||||
|
|
|
|||
|
|
@ -1,219 +0,0 @@
|
|||
XCOMM!/bin/sh
|
||||
XCOMM $XConsortium: elistgen.usl /main/2 1996/12/04 10:13:26 swick $
|
||||
XCOMM
|
||||
XCOMM #########################################################################
|
||||
XCOMM Construct shared-library export lists for Novell based on standardized
|
||||
XCOMM export list description file
|
||||
XCOMM
|
||||
XCOMM Usage: exportlistgen libFoo.so libFoo.elist > libFoo.lopt
|
||||
XCOMM
|
||||
XCOMM libFoo.so => shared library of interest
|
||||
XCOMM libFoo.elist => Meta description of necessary export list.
|
||||
XCOMM
|
||||
XCOMM The output file, "libFoo.lopt" may then be passed to the linker to
|
||||
XCOMM reconstruct the shared library.
|
||||
XCOMM
|
||||
XCOMM (c) Copyright 1996 Digital Equipment Corporation.
|
||||
XCOMM (c) Copyright 1996 Hewlett-Packard Company.
|
||||
XCOMM (c) Copyright 1996 International Business Machines Corp.
|
||||
XCOMM (c) Copyright 1996 Sun Microsystems, Inc.
|
||||
XCOMM (c) Copyright 1996 Novell, Inc.
|
||||
XCOMM (c) Copyright 1996 FUJITSU LIMITED.
|
||||
XCOMM (c) Copyright 1996 Hitachi.
|
||||
XCOMM
|
||||
XCOMM #########################################################################
|
||||
|
||||
XCOMM Utility programs
|
||||
FILTER=CXXFILT # C++ symbol demangler
|
||||
AWK=awk # awk
|
||||
|
||||
XCOMM For nm, cat, pr, expand, awk, c++filt
|
||||
PATH=/usr/bin:/bin:/usr/ucb:/usr/ccs/bin
|
||||
|
||||
XCOMM Temporary files
|
||||
EXPORTLIST=/tmp/elistgen1.$$ # list of export symbols from "libfoo.elist"
|
||||
NMLIST=/tmp/elistgen2.$$ # name list from libfoo.sl
|
||||
FILTLIST=/tmp/elistgen3.$$ # demangled (C++) version of NMLIST
|
||||
|
||||
XCOMM Print useful information at the top of the output
|
||||
echo "#" `date`
|
||||
echo "# This linker options list was produced by" $0
|
||||
echo "# Input export list description taken from:" $2
|
||||
echo "# Target library:" $1
|
||||
echo "# Target Operating System:" `uname -msrv`
|
||||
echo "# "
|
||||
|
||||
XCOMM Extract the globally visible symbols from target library.
|
||||
XCOMM The NMLIST generated here is later used to cross-check the symbols in the
|
||||
XCOMM supplied export-list.
|
||||
nm -p $1 | $AWK '
|
||||
/ [TD] [^\$]/{print $3} # Text, Data, BSS, or Secondary symbols
|
||||
' > $NMLIST
|
||||
|
||||
XCOMM Demangle the global library symbols. This operation is necessary to convert
|
||||
XCOMM mangled C++ symbols into their C++ notation.
|
||||
${FILTER:-cat} $NMLIST > $FILTLIST
|
||||
|
||||
XCOMM Clean up the export-list description file.
|
||||
XCOMM Note that C++ symbols may have embedded spaces in them.
|
||||
cat $2 | $AWK '
|
||||
BEGIN {
|
||||
csyms = 0; # C language symbols in libfoo.list
|
||||
cplusplus = 0; # C++ language symbols in libfoo.list
|
||||
isyms = 0; # C internal symbols in libfoo.elist
|
||||
iplusplus = 0; # C++ internal symbols in libfoo.elist
|
||||
implicit = ""; # Handling of implicit symbols
|
||||
}
|
||||
$1 == "default" {
|
||||
# A default clause suppresses warnings about implicit symbols.
|
||||
if ($2 != "" && $2 != "force" && $2 != "public" &&
|
||||
$2 != "private" && $2 != "internal") {
|
||||
print "# Warning: illegal default clause:", $2 | "cat 1>&2";
|
||||
next;
|
||||
}
|
||||
if (implicit != "")
|
||||
print "# Warning: multiple default clauses." | "cat 1>&2";
|
||||
implicit = $2;
|
||||
next;
|
||||
}
|
||||
$1 == "force" || $1 == "public" || $1 == "private" {
|
||||
csyms ++;
|
||||
print $1 ";;" $2;
|
||||
next;
|
||||
}
|
||||
$1 == "publicC++" || $1 == "privateC++" {
|
||||
cplusplus ++;
|
||||
string = $2;
|
||||
for (n = 3; n <= NF; n++) {
|
||||
string = string " " $n;
|
||||
}
|
||||
print $1 ";;" string;
|
||||
next;
|
||||
}
|
||||
$1 == "internal" {
|
||||
isyms ++;
|
||||
print $1 ";;" $2;
|
||||
next;
|
||||
}
|
||||
$1 == "internalC++" {
|
||||
iplusplus ++;
|
||||
string = $2;
|
||||
for (n = 3; n <= NF; n++) {
|
||||
string = string " " $n;
|
||||
}
|
||||
print $1 ";;" string;
|
||||
next;
|
||||
}
|
||||
$1 == "#line" || $1 == "#" {
|
||||
# cpp will have removed comments, but may have added other stuff.
|
||||
next;
|
||||
}
|
||||
NF > 0 {
|
||||
print "# Warning: unrecognized directive:", $0 | "cat 1>&2";
|
||||
next;
|
||||
}
|
||||
END {
|
||||
printf("# Exporting %d C and %d C++ symbols, hiding %d and %d.\n",
|
||||
csyms, cplusplus, isyms, iplusplus) | "cat 1>&2";
|
||||
if (implicit != "") {
|
||||
print "# Unspecified symbols are " implicit "." | "cat 1>&2";
|
||||
print "default;;" implicit;
|
||||
}
|
||||
}
|
||||
' > $EXPORTLIST
|
||||
|
||||
XCOMM Read in the above files and write result to stdout. The contents
|
||||
XCOMM of NMLIST and FILTLIST are used to construct a symbol lookup table.
|
||||
XCOMM The contents of EXPORTLIST are converted with the help of this table.
|
||||
XCOMM Use ";" as a delimiter in the symbol lookup table.
|
||||
(pr -m -s";" -t -w1024 $NMLIST $FILTLIST | expand -1; cat $EXPORTLIST) | $AWK '
|
||||
BEGIN {
|
||||
FS = ";";
|
||||
implicit = 0;
|
||||
}
|
||||
NF == 2 {
|
||||
# This is "pr" output, i.e., symbol translation table
|
||||
syms[$2] = $1;
|
||||
next;
|
||||
}
|
||||
NF == 3 && $1 == "default" {
|
||||
# Treatment of unspecified symbols.
|
||||
if ($3 == "internal")
|
||||
implicit = 1;
|
||||
else if ($3 == "private" || $3 == "privateC++")
|
||||
implicit = 2;
|
||||
else if ($3 == "public" || $3 == "publicC++")
|
||||
implicit = 3;
|
||||
else # $3 == "force"
|
||||
implicit = 4;
|
||||
next;
|
||||
}
|
||||
NF == 3 {
|
||||
# Parse our instructions for this symbol.
|
||||
if ($1 == "internal" || $1 == "internalC++")
|
||||
export = 1;
|
||||
else if ($1 == "private" || $1 == "privateC++")
|
||||
export = 2;
|
||||
else if ($1 == "public" || $1 == "publicC++")
|
||||
export = 3;
|
||||
else # $1 == "force"
|
||||
export = 4;
|
||||
|
||||
# Process it.
|
||||
if (length(syms[$3]) > 0) {
|
||||
# This symbol is present in the library.
|
||||
if (donelist[$3])
|
||||
print "# Warning: Duplicate entry for", $3,
|
||||
"in export list" | "cat 1>&2";
|
||||
if (donelist[$3] < export) {
|
||||
if (export > 1)
|
||||
print syms[$3];
|
||||
donelist[$3] = export;
|
||||
}
|
||||
} else {
|
||||
# Do not complain about unknown forced-export symbols.
|
||||
if (export == 4) {
|
||||
print $3;
|
||||
donelist[$3] = export;
|
||||
} else
|
||||
print "# Warning:", $3,
|
||||
"was not in the nm list for this library" | "cat 1>&2";
|
||||
}
|
||||
|
||||
next;
|
||||
}
|
||||
END {
|
||||
# Ignore built-in linker symbols.
|
||||
if (implicit == 0) {
|
||||
if (!donelist["_DYNAMIC"])
|
||||
donelist["_DYNAMIC"] = 1;
|
||||
if (!donelist["_GLOBAL_OFFSET_TABLE_"])
|
||||
donelist["_GLOBAL_OFFSET_TABLE_"] = 1;
|
||||
if (!donelist["_edata"])
|
||||
donelist["_edata"] = 1;
|
||||
if (!donelist["_end"])
|
||||
donelist["_end"] = 1;
|
||||
if (!donelist["_etext"])
|
||||
donelist["_etext"] = 1;
|
||||
}
|
||||
|
||||
# Process implicit symbols.
|
||||
for (i in syms) {
|
||||
if (!donelist[i] && (length(syms[i]) > 0)) {
|
||||
# Ignore C++ compiler symbols
|
||||
if (implicit == 0 &&
|
||||
(syms[i] !~ /^__vtbl__[0-9]*_/) &&
|
||||
(syms[i] !~ /^__cpp_unixware_[0-9]*$/))
|
||||
print "# Warning:", syms[i],
|
||||
"was not in the export list" | "cat 1>&2";
|
||||
if (implicit > 1)
|
||||
print syms[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
'
|
||||
|
||||
XCOMM Clean up temporary files
|
||||
rm $EXPORTLIST
|
||||
rm $NMLIST
|
||||
rm $FILTLIST
|
||||
Loading…
Add table
Add a link
Reference in a new issue