1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Remove old windows support

This commit is contained in:
chase 2018-08-18 15:57:09 -05:00 committed by Jon Trulson
parent 1610ff3415
commit d12ad886c1
21 changed files with 14 additions and 932 deletions

View file

@ -7,7 +7,6 @@
MAKE = make
NMAKE = nmake
WORLDOPTS =
WIN32WORLDOPTS = -i
TOP = .
CURRENT_DIR = .
CONFIGSRC = $(TOP)/config
@ -146,7 +145,7 @@ $(IMAKESRC)/Makefile.proto:
imake.bootstrap:
cd $(IMAKESRC) && $(MAKE) -f Makefile.proto bootstrapdepend
cd $(IMAKESRC) && $(MAKE) $(FLAGS) bootstrap
cd $(IMAKESRC) && $(MAKE) -f Makefile.proto all
cd $(IMAKESRC) && $(MAKE) -f Makefile.proto all
-@if [ -f xmakefile ]; then set -x; \
$(RM) xmakefile.bak; $(MV) xmakefile xmakefile.bak; \
else exit 0; fi
@ -161,30 +160,6 @@ Makefile::
xmakefile: Imakefile
$(IMAKE_CMD) -s xmakefile -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
World.Win32:
@echo :
@echo Building $(RELEASE) of $(PRODUCT).
@echo :
@echo :
cd $(IMAKESRC)
$(NMAKE) -f Makefile.ini clean.Win32
$(NMAKE) -f Makefile.ini imake.exe
cd ..\..
-if exist xmakefile.bak del xmakefile.bak
-if exist xmakefile ren xmakefile xmakefile.bak
$(IMAKE:/=\) -s xmakefile -I$(IRULESRC) $(IMAKE_DEFINES) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
$(NMAKE_CMD) $(MFLAGS) VerifyOS
$(NMAKE_CMD) $(MFLAGS) Makefiles
$(NMAKE_CMD) $(MFLAGS) clean
$(NMAKE_CMD) $(MFLAGS) includes
$(NMAKE_CMD) $(MFLAGS) depend
$(NMAKE_CMD) $(MFLAGS) $(WIN32WORLDOPTS)
@echo :
@echo :
@echo Full build of $(RELEASE) of $(PRODUCT) complete.
@echo :
# don't allow any default rules in this Makefile
.SUFFIXES:

View file

@ -446,12 +446,6 @@ XCOMM $TOG: Imake.cf /main/30 1998/04/28 13:55:25 barstow $
# undef SVR4
#endif /* Oki */
#ifdef WIN32
# define MacroIncludeFile <Win32.cf>
# define MacroFile Win32.cf
# define Win32Architecture
#endif /* WIN32 */
#ifdef linux
# define MacroIncludeFile <linux.cf>
# define MacroFile linux.cf

View file

@ -15,7 +15,6 @@ site.def
RULEFILES = \
Imake.rules \
Motif.rules \
Win32.rules \
X11.rules \
bsdLib.rules \
cde.rules \
@ -60,7 +59,6 @@ FreeBSD.cf \
Mips.cf \
NetBSD.cf \
Oki.cf \
Win32.cf \
bsd.cf \
convex.cf \
cray.cf \

View file

@ -1,133 +0,0 @@
XCOMM platform: $TOG: Win32.cf /main/57 1997/12/04 11:03:33 kaleb $
#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
#ifndef CompilerMajorVersion
/* 0 == NT 3.1 Win32 SDK, 2 == MSVC++ 2, 4 == MSVC 4 */
#define CompilerMajorVersion 4
#endif
#define BootstrapCFlags -DWIN32
#ifdef _M_IX86
#define CpuDefines -D_X86_
#endif
/* brain-damaged windows headers will not compile with -Za */
#define StandardDefines -DWIN32 -DWIN32_LEAN_AND_MEAN -D_DLL -D_MT -D__STDC__ CpuDefines
#if CompilerMajorVersion < 4
#define DefaultCCOptions -nologo -batch -G4 -W2
#else
#define DefaultCCOptions -nologo -G4 -W2
#endif
#if CompilerMajorVersion < 4
#define DebuggableCDebugFlags -Zi
#else
#define DebuggableCDebugFlags -Zi -Od
#endif
#define ThreadedX YES
#define HasThreadSafeAPI NO
#define CpCmd copy
#define LnCmd copy
#define MvCmd ren
#define RmCmd del
#ifndef RmTreeCmd
XCOMM choices here include:
XCOMM o `del /q /s` and live with pressing the "any" key
XCOMM o `deltree, copied from MS-DOS 5
XCOMM o `rm -rfx` from the SDK Subscription (MSTOOLS in your Path)
XCOMM o `rm -rf` from the GNU file utilities
XCOMM We're using the GNU file utilities
#define RmTreeCmd rm -rf
#endif
#define CcCmd cl
#define HasCplusplus YES
#define CplusplusCmd cl
#if CompilerMajorVersion < 4
#define PreProcessCmd CcCmd -nologo -batch -EP
#define CppCmd CcCmd -nologo -batch -E
#else
#define PreProcessCmd CcCmd -nologo -EP
#define CppCmd CcCmd -nologo -E
#endif
#define PatheticCpp YES
#define ConstructMFLAGS YES
#if (CompilerMajorVersion == 0)
#define ArCmdBase lib32
#else
#define ArCmdBase lib
#endif
#define ArCmd ArCmdBase
#define CplusplusCmd cl
#define MkdirHierCmd $(CONFIGSRC:/=\)\util\mkdirhier
#define InstallCmd copy
#define InstPgmFlags /**/
#define InstBinFlags /**/
#define InstUidFlags /**/
#define InstLibFlags /**/
#define InstIncFlags /**/
#define InstManFlags /**/
#define InstDatFlags /**/
#define InstallFlags /**/
#if (CompilerMajorVersion == 0)
#define ExtraLibraries crtdll.lib kernel32.lib wsock32.lib
#elif (CompilerMajorVersion < 4)
#define ExtraLibraries msvcrt.lib kernel32.lib wsock32.lib
#else
#define ExtraLibraries msvcrt.lib kernel32.lib wsock32.lib -link -nodefaultlib:libc
#endif
#define MakeCmd nmake -nologo
#if (CompilerMajorVersion == 0)
#define LdCmd link32
#else
#define LdCmd link
#endif
#define MathLibrary
#define HasSymLinks NO
#define HasVarDirectory NO
#define HasPutenv YES
#define Osuf obj
#ifndef CCsuf
#define CCsuf cxx
#endif
#define BuildServer NO
#define ConnectionFlags -DTCPCONN
/* override as necessary in site.def/host.def */
#ifndef StdIncDir
#define StdIncDir C:/MSDEVSTD/INCLUDE
#endif
#define LdPreLib /**/
#define LdPostLib /**/
#ifndef UseInstalled
#define ImakeCmd $(IMAKESRC:/=\)\imake
#define DependCmd $(DEPENDSRC:/=\)\makedepend
#endif
#define DependFlags -D_WIN32
#define FilesToClean *.bak *.obj *.lib make.log
#define ShLibDir $(BINDIR)
#define XFileSearchPathBase Concat4($(LIBDIR)/;L/;T/;N;C,;S:$(LIBDIR)/;l/;T/;N;C,;S:$(LIBDIR)/;T/;N;C,;S:$(LIBDIR)/;L/;T/;N;S:$(LIBDIR)/;l/;T/;N;S:$(LIBDIR)/;T/;N;S)
#define XawI18nDefines -DHAS_WCHAR_H
#define UseRgbTxt YES
#define HasCbrt NO
#define HasFfs NO
#define HasXdmAuth NO
/* the following components haven't been ported yet */
#define BuildLBX NO
#define BuildXprint NO
#define XprtServer NO
#include <Win32.rules>

View file

@ -1,525 +0,0 @@
XCOMM platform: $TOG: Win32.rules /main/51 1997/12/02 14:48:29 kaleb $
#define HasSharedLibraries YES
#define NeedLibInsideFlag YES
#define SharedLibXaw NO
#define SharedLibXmu NO
#define SharedLibXt NO
#define SharedDataSeparation NO
#define SharedCodeDef /**/
#define SharedLibraryDef /**/
#define ShLibIncludeFile <WinLib.tmpl>
#define SharedLibraryLoadFlags -dll
#define PositionIndependentCFlags /**/
.c.obj:
$(CC) -c $*.c @<<
$(CFLAGS)
<<
#if HasCplusplus
.CCsuf.obj:
$(CXX) -c $*.CCsuf @<<
$(CFLAGS)
<<
#endif
#define ProgramTargetName(target) target.exe
#define RunProgram(progvar,options) $(progvar:/=\) options
#define RemoveFile(file) if exist file $(RM) file
#define RemoveFiles(files) @$(MAKE) $(MFLAGS) -f << @@\
.SUFFIXES: @@\
@@\
all: files @@\
!for %%i in ( Avoid.Error $$** ) do if exist %%i $(RM) %%i @@\
@@\
Avoid.Error files: @@\
<<
#define MakeDir(dir) -$(MKDIRHIER) dir
#define ObjectCompile(options) RemoveFile($@) @@\
$(CC) -c $*.c @<< @@\
$(CFLAGS) options @@\
<<
#define LibObjCompile(dir,options) RemoveFiles($@ dir\$@) @@\
$(CC) -c $*.c @<< @@\
$(CCOPTIONS) $(ALLDEFINES) options @@\
<< @@\
$(MV) $@ dir\$@
#define BuildIncludesTop(srclist,dstsubdir,dstupdir) @@\
includes:: srclist @@\
MakeDir($(BUILDINCDIR:/=\)) @@\
@$(MAKE) $(MFLAGS) -f << @@\
.SUFFIXES: @@\
@@\
all: srclist @@\
cd $(BUILDINCDIR:/=\) @@\
!RemoveFile($$**) @@\
!$(LN) $(BUILDINCTOP:/=\)\$(CURRENT_DIR:/=\)\$$** . @@\
@@\
Avoid.Error srclist: @@\
<<
#define BuildIncludes(srclist,dstsubdir,dstupdir) @@\
XVARdef0 = $(BUILDINCDIR)/dstsubdir @@\
XVARdef1 = $(BUILDINCTOP)/dstupdir/$(CURRENT_DIR) @@\
@@\
includes:: srclist @@\
MakeDir($(XVARuse0:/=\)) @@\
@$(MAKE) -A $(MFLAGS) -f << @@\
.SUFFIXES: @@\
@@\
all: srclist @@\
cd $(XVARuse0:/=\) @@\
!RemoveFile($$**) @@\
!$(LN) $(XVARuse1:/=\)\$$** . @@\
@@\
Avoid.Error srclist: @@\
<<
#define LinkFileList(step,list,dir,sub) @@\
XVARdef0 = dir @@\
XVARdef1 = sub @@\
XVARdef2 = list @@\
@@\
step:: $(XVARuse2:/=\) @@\
cd $(XVARuse0:/=\) @@\
!RemoveFile($**) @@\
!$(LN) $(XVARuse1:/=\)\\$** .
#define LinkRule(program,options,objects,libraries) \
$(CCLINK) Concat(-Fe,program) options objects libraries $(EXTRA_LOAD_FLAGS)
#define NormalProgramTarget(program,objects,deplibs,locallibs,syslibs) @@\
XVARdef0 = objects @@\
@@\
ProgramTargetName(program): $(XVARuse0:.o=.obj) deplibs @@\
RemoveTargetProgram($@) @@\
LinkRule($@,$(LDOPTIONS),$(XVARuse0:.o=.obj),locallibs $(LDLIBS) syslibs) @@\
@@\
clean:: @@\
RemoveFile(ProgramTargetName(program))
#define ProgramTargetHelper(program,srcs,objs,deplib,locallib,syslib) @@\
ProgramTargetName(program): $(objs:.o=.obj) $(deplib) @@\
RemoveTargetProgram($@) @@\
LinkRule($@,$(LDOPTIONS),$(objs:.o=.obj),locallib $(LDLIBS) syslib) @@\
@@\
InstallProgram(program,$(BINDIR)) @@\
InstallManPage(program,$(MANDIR))
#define ComplexProgramTarget(program) @@\
PROGRAM = ProgramTargetName(program) @@\
@@\
AllTarget(ProgramTargetName(program)) @@\
@@\
ProgramTargetHelper(program,SRCS,OBJS,DEPLIBS,$(LOCAL_LIBRARIES),NullParameter) @@\
@@\
DependTarget() @@\
LintTarget() @@\
@@\
clean:: @@\
RemoveFile($(PROGRAM))
#define ComplexProgramTarget_1(program,locallib,syslib) @@\
OBJS = $(OBJS1) $(OBJS2) $(OBJS3) @@\
SRCS = $(SRCS1) $(SRCS2) $(SRCS3) @@\
PROGRAM1 = ProgramTargetName(program) @@\
@@\
AllTarget($(PROGRAM1) $(PROGRAM2) $(PROGRAM3)) @@\
@@\
ProgramTargetHelper(program,SRCS1,OBJS1,DEPLIBS1,locallib,syslib) @@\
@@\
DependTarget() @@\
LintTarget() @@\
@@\
clean:: @@\
for %%i in ($(PROGRAMS)) do $(RM) ProgramTargetName(%%i)
#define ComplexProgramTarget_2(program,locallib,syslib) @@\
PROGRAM2 = ProgramTargetName(program) @@\
@@\
ProgramTargetHelper(program,SRCS2,OBJS2,DEPLIBS2,locallib,syslib)
#define ComplexProgramTarget_3(program,locallib,syslib) @@\
PROGRAM3 = ProgramTargetName(program) @@\
@@\
ProgramTargetHelper(program,SRCS3,OBJS3,DEPLIBS3,locallib,syslib)
#define MoveToBakFile(file) -@if exist file $(MV) file file.bak
#define RMoveToBakFile(file) -RemoveFile(file.bak) @@\
-@if exist file $(MV) file file.bak
#define InstallMultipleDestFlags(step,list,dest,flags) @@\
XVARdef0 = $(DESTDIR)dest @@\
@@\
step:: list @@\
MakeDir($(XVARuse0:/=\)) @@\
!$(INSTALL) $(INSTALLFLAGS) flags $** $(XVARuse0:/=\)
#define CleanTarget() @@\
clean:: @@\
RemoveFiles(FilesToClean ExtraFilesToClean)
#define LibraryTargetName(libname)libname.lib
#define LibraryTargetNameSuffix(libname,suffix)Concat(libname,suffix.lib)
#define MakeLibrary(libname,objlist) $(AR) @<< @@\
-out:libname objlist @@\
<<
#define LinkSourceFile(src,dir) @@\
XVARdef0 = dir/src @@\
@@\
src: $(XVARuse0:/=\) @@\
RemoveFile($@) @@\
$(LN) $? $@ @@\
@@\
includes:: src @@\
@@\
depends:: src @@\
@@\
clean:: @@\
RemoveFile(src)
#define LinkFile(tofile,fromfile) @@\
XVARdef0 = fromfile @@\
tofile:: $(XVARuse0:/=\) @@\
RemoveFile($@) @@\
$(LN) $? $@ @@\
@@\
includes:: tofile @@\
@@\
depend:: tofile @@\
@@\
clean:: @@\
RemoveFile(tofile)
#define NormalLibraryTarget(libname,objlist) @@\
AllTarget(LibraryTargetName(libname)) @@\
@@\
XVARdef0 = objlist @@\
@@\
LibraryTargetName(libname): $(XVARuse0:.o=.obj) $(EXTRALIBRARYDEPS) @@\
RemoveFile($@) @@\
MakeLibrary($@,$(XVARuse0:.o=.obj)) @@\
LinkBuildLibrary($@)
#define NormalLibraryTarget2(libname,objlist1,objlist2) @@\
NormalLibraryTarget(libname,objlist1 objlist2)
#define NormalLibraryTarget3(libname,objlist1,objlist2,objlist3) @@\
NormalLibraryTarget(libname,objlist1 objlist2 objlist3)
#define NormalDepLibraryTarget(libname,deplist,objlist) @@\
AllTarget(LibraryTargetName(libname)) @@\
@@\
XVARdef0 = deplist @@\
XVARdef1 = objlist @@\
XVARdef2 = $(XVARuse1:/=\) @@\
@@\
LibraryTargetName(libname): $(XVARuse0:/=\) $(EXTRALIBRARYDEPS) @@\
RemoveFile($@) @@\
MakeLibrary($@,$(XVARuse2:.o=.obj)) @@\
LinkBuildLibrary($@)
#define ProfiledLibraryTarget(libname,objlist) @@\
AllTarget(LibraryTargetNameSuffix(libname,_p)) @@\
@@\
XVARdef0 = objlist @@\
@@\
LibraryTargetNameSuffix(libname,_p): $(XVARuse0:.o=.obj) $(EXTRALIBRARYDEPS) @@\
RemoveFile($@) @@\
cd profiled @@\
MakeLibrary(..\$@,$(XVARuse0:.o=.obj)) @@\
cd ..
#define DebuggedLibraryTarget(libname,objlist) @@\
AllTarget(LibraryTargetNameSuffix(libname,_d)) @@\
@@\
XVARdef0 = objlist @@\
@@\
LibraryTargetNameSuffix(libname,_d): $(XVARuse0:.o=.obj) $(EXTRALIBRARYDEPS) @@\
RemoveFile($@) @@\
cd debugger @@\
MakeLibrary(..\$@,$(XVARuse0:.o=.obj)) @@\
cd ..
#ifndef UseInstalled
#define ImakeDependency(target) @@\
target:: ProgramTargetName($(IMAKE)) @@\
@@\
ProgramTargetName($(IMAKE)): @@\
<<tmp.bat @@\
cd $(IMAKESRC:/=\) @@\
if exist Makefile $(MAKE) all @@\
if not exist Makefile $(MAKE) -f Makefile.ini BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)" @@\
<<
#endif
#ifndef UseInstalled
#define DependDependency() @@\
depend:: ProgramTargetName($(DEPEND)) @@\
@@\
ProgramTargetName($(DEPEND)): @@\
<<tmp.bat @@\
cd $(DEPENDSRC:/=\) @@\
$(MAKE) @@\
<<
#endif
#define DependTarget() @@\
DependDependency() @@\
@@\
depend:: @@\
$(DEPEND:/=\) @<< @@\
$(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS) @@\
<<
#define DependTarget3(srcs1,srcs2,srcs3) @@\
DependDependency() @@\
@@\
depend:: @@\
$(DEPEND:/=\) @<< @@\
$(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs1 srcs2 srcs3 @@\
<<
#define ForceSubdirs(dirs) @@\
Avoid.Error dirs: FRC @@\
@cd $@ @@\
@echo making all in $(CURRENT_DIR)/$@... @@\
$(MAKE) $(MFLAGS) PassCDebugFlags all @@\
cd .. @@\
@@\
FRC:
#define MakeMakeSubdirs(dirs,target) @@\
XVARdef0 = dirs @@\
XVARdef1 = $$ @@\
@@\
target:: @@\
@$(MAKE) -A $(MFLAGS) -f << @@\
.SUFFIXES: @@\
@@\
all: $(XVARuse0:/=\) @@\
@@\
Avoid.Error $(XVARuse0:/=\): @@\
cd $(XVARuse1)@ @@\
RMoveToBakFile(Makefile) @@\
ImakeSubCmdHelper -DTOPDIR=../$(TOP) -DCURDIR=$(CURRENT_DIR)/$(XVARuse1)@ @@\
$(MAKE) $(MFLAGS) Makefiles @@\
cd .. @@\
<<
#ifdef UseInstalled
# define ImakeSubCmdHelper $(IMAKE_CMD)
#else
# define ImakeSubCmdHelper ..\$(IMAKE) -I../$(IRULESRC) $(IMAKE_DEFINES)
#endif
#define NamedTargetSubdirs(name,dirs,verb,flags,subname) @@\
XVARdef0 = dirs @@\
XVARdef1 = $$ @@\
@@\
name:: @@\
@$(MAKE) -A $(MFLAGS) -f << @@\
.SUFFIXES: @@\
@@\
all: $(XVARuse0:/=\) @@\
@@\
Avoid.Error $(XVARuse0:/=\): @@\
cd $(XVARuse1)@ @@\
@echo verb in $(CURRENT_DIR)/$(XVARuse1)@... @@\
$(MAKE) $(MFLAGS) flags subname @@\
cd .. @@\
<<
#define UnsharedLibReferences(varname,libname,libsource) @@\
Concat3(DEP,varname,LIB) = _UseCat($(USRLIBDIR)/,libsource/,libname.lib) @@\
Concat(varname,LIB) = LoaderLibPrefix _Use(libname.lib,$(Concat3(DEP,varname,LIB))) @@\
LintLibReferences(varname,libname,libsource)
#define SharedLibReferences(varname,libname,libsource,revname,rev) @@\
revname = rev @@\
UnsharedLibReferences(varname,libname,libsource)
#define SubdirLibraryRule(objlist) @@\
XVARdef0 = objlist @@\
@@\
all:: DONE @@\
@@\
DONE: $(XVARuse0:.o=.obj) @@\
RemoveFile($@) @@\
echo - > $@ @@\
@@\
clean:: @@\
RemoveFile(DONE)
#define CppScriptTarget(dst,src,defs,deplist) @@\
dst:: @@\
@echo sorry, unable to make $@
#define CppFileTarget(dst,src,defs,deplist) @@\
XFAKEVAR = X @@\
dst:: src deplist @@\
RemoveFile($@) @@\
$(PREPROCESSCMD) -I. <<CppTmpFile.c @<< >$@ @@\
XCOMM define $(XFAKEVAR)COMM XCOMM @@\
XCOMM include <src> @@\
<< @@\
defs @@\
<< @@\
@@\
clean:: @@\
RemoveFiles(dst)
#define InstallNamedTarget(step,srcname,flags,dest,dstname) @@\
XVARdef0 = $(DESTDIR)dest @@\
@@\
step:: srcname @@\
MakeDir($(XVARuse0:/=\)) @@\
$(INSTALL) $(INSTALLFLAGS) flags srcname $(XVARuse0:/=\)\\dstname
#define InstallNamedTargetNoClobber(step,srcname,flags,dest,dstname) @@\
XVARdef0 = $(DESTDIR)dest @@\
@@\
step:: srcname @@\
MakeDir($(XVARuse0:/=\)) @@\
@if exist $(XVARuse0:/=\)\\dstname echo Not overwriting existing $(XVARuse0:/=\)\\dstname @@\
if not exist $(XVARuse0:/=\)\\dstname $(INSTALL) $(INSTALLFLAGS) flags srcname $(XVARuse0:/=\)\\dstname
#define InstallLibrary(libname,dest) @@\
InstallTarget(install,LibraryTargetName(libname),$(INSTLIBFLAGS),dest)
#define InstallScript(program,dest) /**/
#define InstallNamedProg(srcname,dstname,dest) @@\
install:: srcname @@\
@echo sorry, unable to install srcname
#define InstallSharedLibrary(libname,rev,dest) @@\
InstallTarget(install,LibraryTargetName(libname),$(INSTLIBFLAGS),$(USRLIBDIR)) @@\
InstallTarget(install,libname.dll,$(INSTLIBFLAGS),dest)
#define InstallSharedLibraryData(libname,rev,dest)
#define MakeDLL(libname,solist) $(LD) @<< @@\
$(SHLIBLDFLAGS) -out:libname.dll libname.exp solist @@\
<<
#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
AllTarget(libname.dll) @@\
@@\
CppFileTarget(libname.def,libname-def.cpp,-DLIBRARY_VERSION=rev,$(ICONFIGFILES)) @@\
@@\
XVARdef0 = solist @@\
@@\
LibraryTargetName(libname): $(XVARuse0:.o=.obj) libname.def $(EXTRALIBRARYDEPS) @@\
RemoveFile($@) @@\
MakeLibrary($@,-def:libname.def $(XVARuse0:.o=.obj)) @@\
LinkBuildLibrary($@) @@\
@@\
libname.dll: LibraryTargetName(libname) $(EXTRALIBRARYDEPS) @@\
RemoveFile(libname.dll) @@\
MakeDLL(libname,$(XVARuse0:.o=.obj) $(REQUIREDLIBS) $(EXTRA_LIBRARIES)) @@\
LinkBuildDLL(libname.dll) @@\
@@\
clean:: @@\
RemoveFile(LibraryTargetName(libname)) @@\
RemoveFile(libname.dll)
#define SharedLibraryDataTarget(libname,rev,salist)
#define ObjectCplusplusCompile(options) RemoveFile($@) @@\
$(CXX) -c $*.CCsuf @<< @@\
$(CFLAGS) options @@\
<<
#define CplusplusLinkRule LinkRule
#define CplusplusProgramTargetHelper ProgramTargetHelper
#ifndef ComplexCplusplusProgramTarget
#define ComplexCplusplusProgramTarget(program) @@\
PROGRAM = ProgramTargetName(program) @@\
@@\
AllTarget(ProgramTargetName(program)) @@\
@@\
CplusplusProgramTargetHelper(program,SRCS,OBJS,DEPLIBS,$(LOCAL_LIBRARIES),NullParameter) @@\
@@\
DependTarget() @@\
LintTarget() @@\
@@\
clean:: @@\
RemoveFile(ProgramTargetName(program))
#endif /* ComplexCplusplusProgramTarget */
#ifndef UseInstalled
# define LinkBuildDLL(binary) MakeDir($(BUILDBINDIR:/=\)) @@\
RemoveFile(Concat($(BUILDBINDIR:/=\)\,binary)) @@\
cd $(BUILDBINDIR:/=\) && $(LN) Concat($(BUILDBINTOP:/=\)\$(CURRENT_DIR:/=\)\,binary) .
# ifdef LinkBuildBinary
# undef LinkBuildBinary
# endif
# define LinkBuildBinary(binary) @@\
all:: $(BUILDBINDIR)\ProgramTargetName(binary) ProgramTargetName(binary) @@\
@@\
$(BUILDBINDIR)\ProgramTargetName(binary): ProgramTargetName(binary) @@\
MakeDir($(BUILDBINDIR:/=\)) @@\
RemoveFile($(BUILDBINDIR:/=\)\ProgramTargetName(binary))) @@\
cd $(BUILDBINDIR:/=\) && $(LN) $(BUILDBINTOP:/=\)\$(CURRENT_DIR:/=\)\ProgramTargetName(binary) .
# ifdef LinkBuildLibrary
# undef LinkBuildLibrary
# endif
# define LinkBuildLibrary(lib) MakeDir($(BUILDLIBDIR:/=\)) @@\
RemoveFile(Concat($(BUILDLIBDIR:/=\)\,lib)) @@\
cd $(BUILDLIBDIR:/=\) && $(LN) Concat($(BUILDLIBTOP:/=\)\$(CURRENT_DIR:/=\)\,lib) .
#endif
#ifndef ProjectUnsharedLibReferences
#define ProjectUnsharedLibReferences(varname,libname,libsource,buildlibdir) @@\
Concat3(DEP,varname,LIB) = _UseCat($(USRLIBDIR)/lib,buildlibdir/,libname.lib) @@\
Concat(varname,LIB) = $(Concat3(DEP,varname,LIB)) @@\
LintLibReferences(varname,libname,libsource)
#endif
/*
* ServerTargetWithFlags - generate rules to compile, link, and relink a server
*/
#ifndef ServerTargetWithFlags
#define ServerTargetWithFlags(server,subdirs,objects,libs,syslibs,flags) @@\
XVARdef0 = objects @@\
@@\
AllTarget(ProgramTargetName(server)) @@\
ProgramTargetName(server): subdirs $(XVARuse0:.o=.obj) libs @@\
MoveToBakFile($@) @@\
LinkRule($@,$(LDOPTIONS),$(XVARuse0:.o=.obj),libs $(LDLIBS) syslibs) @@\
@@\
Concat(load,server): @@\
MoveToBakFile(ProgramTargetName(server)) @@\
LinkRule(ProgramTargetName(server),$(LDOPTIONS),$(XVARuse0:.o=.obj),libs $(LDLIBS) syslibs) @@\
@@\
loadX:: Concat(load,server) @@\
@@\
ProofProgramTarget(server,subdirs objects libs,objects libs $(LDLIBS) syslibs) @@\
ProofLinkTarget(Concat(load,server),server,objects libs $(LDLIBS) syslibs) @@\
@@\
InstallProgramWithFlags(server,$(BINDIR),flags) @@\
@@\
clean:: @@\
RemoveFile(ProgramTargetName(server))
#endif /* ServerTargetWithFlags */

View file

@ -50,16 +50,3 @@ clean:
$(RM) -r Makefile.proto Makefile Makefile.dep bootstrap .depend
depend:
imake.exe::
@echo making imake with BOOTSTRAPCFLAGS=-DWIN32
imake.exe:: imake.obj
cl -nologo imake.obj libc.lib kernel32.lib
imake.obj: imake.c
cl -nologo -W2 -D__STDC__ -c -DWIN32 $(CFLAGS) imake.c
clean.Win32:
if exist imake.exe del imake.exe
if exist imake.obj del imake.obj

View file

@ -161,9 +161,6 @@ in this Software without prior written authorization from The Open Group.
#include <stdio.h>
#include <ctype.h>
#include "Xosdefs.h"
#ifdef WIN32
# include "Xw32defs.h"
#endif
#ifndef X_NOT_POSIX
# ifndef _POSIX_SOURCE
# define _POSIX_SOURCE
@ -172,9 +169,7 @@ in this Software without prior written authorization from The Open Group.
#include <sys/types.h>
#include <fcntl.h>
#ifdef X_NOT_POSIX
# ifndef WIN32
# include <sys/file.h>
# endif
# include <sys/file.h>
#else
# include <unistd.h>
#endif
@ -203,15 +198,10 @@ typedef int waitType;
# define waitSig(w) ((w) & 0xff)
typedef int waitType;
# else /* SYSV */
# ifdef WIN32
# include <process.h>
typedef int waitType;
# else
# include <sys/wait.h>
# define waitCode(w) ((w).w_T.w_Retcode)
# define waitSig(w) ((w).w_T.w_Termsig)
typedef union wait waitType;
# endif
# endif
# ifndef WIFSIGNALED
# define WIFSIGNALED(w) waitSig(w)
@ -233,11 +223,7 @@ extern char *getenv();
#ifdef X_NOT_STDC_ENV
extern int errno;
#endif
#ifndef WIN32
#include <sys/utsname.h>
#else
#include <windows.h>
#endif
#ifndef SYS_NMLN
# ifdef _SYS_NMLN
# define SYS_NMLN _SYS_NMLN
@ -316,13 +302,7 @@ static char *cpp = NULL;
static char *tmpMakefile = "/tmp/Imf.XXXXXX";
static char *tmpImakefile = "/tmp/IIf.XXXXXX";
static char *make_argv[ ARGUMENTS ] = {
#ifdef WIN32
"nmake"
#else
"make"
#endif
};
static char *make_argv[ ARGUMENTS ] = {"make"};
static int make_argindex;
static int cpp_argindex;
@ -727,15 +707,6 @@ doit(FILE *outfd, const char *cmd, char **argv)
/*
* Fork and exec the command.
*/
#ifdef WIN32
if (outfd)
dup2(fileno(outfd), 1);
status = _spawnvp(_P_WAIT, cmd, argv);
if (status < 0)
LogFatal("Cannot spawn %s.", cmd);
if (status > 0)
LogFatal("Exit code %d.", status);
#else
pid = fork();
if (pid < 0)
LogFatal("Cannot fork.");
@ -756,11 +727,8 @@ doit(FILE *outfd, const char *cmd, char **argv)
execvp(cmd, argv);
LogFatal("Cannot exec %s.", cmd);
}
#endif
}
#ifndef WIN32
#if (defined(DEFAULT_OS_NAME) || defined(DEFAULT_OS_MAJOR_REV) || \
defined(DEFAULT_OS_MINOR_REV) || defined(DEFAULT_OS_TEENY_REV))
static void
@ -828,13 +796,12 @@ parse_utsname(struct utsname *name, const char *fmt, char *result, const char *m
int ret = sscanf(buf, fmt + arg + 1, result);
(void) ret;
}
#endif
/* Trim leading 0's and periods from version names. The 0's cause
the number to be interpreted as octal numbers. Some version strings
have the potential for different numbers of .'s in them.
*/
#if (defined(DEFAULT_OS_MAJOR_REV) || defined(DEFAULT_OS_MINOR_REV) || defined(DEFAULT_OS_TEENY_REV))
static const char *
trim_version(const char *p)
@ -1240,7 +1207,6 @@ get_gcc_incdir(FILE *inFile)
static boolean
define_os_defaults(FILE *inFile)
{
#ifndef WIN32
#if (defined(DEFAULT_OS_NAME) || defined(DEFAULT_OS_MAJOR_REV) || \
defined(DEFAULT_OS_MINOR_REV) || defined(DEFAULT_OS_TEENY_REV))
struct utsname name;
@ -1287,22 +1253,6 @@ define_os_defaults(FILE *inFile)
#if defined (sun) && defined(SVR4)
get_sun_compiler_versions (inFile);
#endif
#else /* WIN32 */
OSVERSIONINFO osvi;
static char* os_names[] = { "Win32s", "Windows 95", "Windows NT" };
memset(&osvi, 0, sizeof(OSVERSIONINFO));
osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
GetVersionEx (&osvi);
fprintf (inFile, "#define DefaultOSName Microsoft %s\n",
os_names[osvi.dwPlatformId]);
fprintf(inFile, "#define DefaultOSMajorVersion %d\n", osvi.dwMajorVersion);
fprintf(inFile, "#define DefaultOSMinorVersion %d\n", osvi.dwMinorVersion);
fprintf(inFile, "#define DefaultOSTeenyVersion %d\n",
osvi.dwBuildNumber & 0xFFFF);
#endif /* WIN32 */
return FALSE;
}
@ -1539,9 +1489,6 @@ ReadLine(FILE *tmpfd, const char *tmpfname)
char *p1, *p2;
if (! initialized) {
#ifdef WIN32
FILE *fp = tmpfd;
#endif
int total_red;
struct stat st;
@ -1558,12 +1505,8 @@ ReadLine(FILE *tmpfd, const char *tmpfname)
end = buf + total_red;
*end = '\0';
fseek(tmpfd, 0, 0);
#if defined(SYSV) || defined(WIN32)
#if defined(SYSV)
tmpfd = freopen(tmpfname, "w+", tmpfd);
#ifdef WIN32
if (! tmpfd) /* if failed try again */
tmpfd = freopen(tmpfname, "w+", fp);
#endif
if (! tmpfd)
LogFatal("cannot reopen %s.", tmpfname);
#else /* !SYSV */
@ -1587,10 +1530,6 @@ ReadLine(FILE *tmpfd, const char *tmpfname)
break;
}
else if (*p1 == '\n') { /* real EOL */
#ifdef WIN32
if (p1 > pline && p1[-1] == '\r')
p1[-1] = '\0';
#endif
*p1++ = '\0';
break;
}
@ -1653,9 +1592,6 @@ KludgeOutputLine(char **pline)
if (quotechar) {
if (quotechar == '\\' ||
(*p == quotechar &&
# ifdef WIN32
quotechar != ')' &&
# endif
p[-1] != '\\'))
quotechar = '\0';
continue;

View file

@ -99,10 +99,10 @@ in this Software without prior written authorization from The Open Group.
#ifdef Mips
# if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
# define imake_ccflags "-DBSD43"
# else
# else
# define imake_ccflags "-DSYSV"
# endif
#endif
#endif
#ifdef is68k
#define imake_ccflags "-Dluna -Duniosb"
@ -132,14 +132,6 @@ in this Software without prior written authorization from The Open Group.
#define imake_ccflags "-fn -tm c1"
#endif
#ifdef WIN32
#if _MSC_VER < 1000
#define imake_ccflags "-nologo -batch -D__STDC__"
#else
#define imake_ccflags "-nologo -D__STDC__"
#endif
#endif
#ifdef __sxg__
#define imake_ccflags "-DSYSV -DUSG -DNOSTDHDRS"
#endif
@ -207,14 +199,9 @@ 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(__llvm__)
#if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(__llvm__)
#define FIXUP_CPP_WHITESPACE
#endif
#ifdef WIN32
#define REMOVE_CPP_LEADSPACE
#define INLINE_SYNTAX
#define MAGIC_MAKE_VARS
#endif
/*
* Step 4: USE_CC_E, DEFAULT_CC, DEFAULT_CPP
@ -225,10 +212,6 @@ in this Software without prior written authorization from The Open Group.
#ifdef hpux
#define USE_CC_E
#endif
#ifdef WIN32
#define USE_CC_E
#define DEFAULT_CC "cl"
#endif
#if defined(_IBMR2) && !defined(DEFAULT_CPP)
#define DEFAULT_CPP "/usr/ccs/lib/cpp"
#endif
@ -475,14 +458,6 @@ char *cpp_argv[ARGUMENTS] = {
"-DSVR4",
#endif
#endif
#ifdef WIN32
"-DWIN32",
"-nologo",
#if _MSC_VER < 1000
"-batch",
#endif
"-D__STDC__",
#endif
#ifdef NCR
"-DNCR", /* NCR */
#endif

View file

@ -134,7 +134,7 @@ catch (sig)
fatalerr ("got signal %d\n", sig);
}
#if defined(USG) || (defined(i386) && defined(SYSV)) || defined(WIN32)
#if defined(USG) || (defined(i386) && defined(SYSV))
#define USGISH
#endif
@ -661,15 +661,8 @@ redirect(line, makefile)
fatalerr("cannot open \"%s\"\n", makefile);
snprintf(backup, BUFSIZ, "%s.bak", makefile);
unlink(backup);
#ifdef WIN32
fclose(fdin);
#endif
if (rename(makefile, backup) < 0)
fatalerr("cannot rename %s to %s\n", makefile, backup);
#ifdef WIN32
if ((fdin = fopen(backup, "r")) == NULL)
fatalerr("cannot open \"%s\"\n", backup);
#endif
if ((fdout = freopen(makefile, "w", stdout)) == NULL)
fatalerr("cannot open \"%s\"\n", backup);
len = strlen(line);

View file

@ -7,18 +7,10 @@ MDEP_PROG = makedepend
EXPORTLISTGEN = exportlistgen
#endif
#ifdef Win32Architecture
CMKDIRHIER = mkdirhier.exe
#endif
PROGRAMS = xmkmf $(MDEP_PROG) mergelib ProgramTargetName(makestrs) $(EXPORTLISTGEN) $(CMKDIRHIER)
DEPLIBS =
DEPEND_DEFINES = $(DEPENDDEFINES)
#ifndef Win32Architecture
EXTRA_LIBRARIES =
#endif
XCOMM Some compilers generate fatal errors if an -L directory does
XCOMM not exist. Since BUILDLIBDIR may not exist yet suppress its use.
LDPRELIB =
@ -45,10 +37,6 @@ SimpleProgramTarget(lndir)
#endif
#endif
#ifdef Win32Architecture
SimpleProgramTarget(mkdirhier)
#endif
NormalProgramTarget(makestrs,makestrs.o,,,)
InstallNamedProg(xmkmf,xmkmf,$(BINDIR))

View file

@ -680,11 +680,7 @@ auth_finalize(void)
ProgramName, temp_name);
} else {
(void) unlink (ttauth_filename);
#ifdef WIN32
if (rename(temp_name, ttauth_filename) == -1)
#else
if (link (temp_name, ttauth_filename) == -1)
#endif
{
fprintf (stderr,
"%s: unable to link authority file %s, use %s\n",

View file

@ -68,12 +68,9 @@ extern char *getenv();
#ifndef X_NOT_POSIX
#include <unistd.h>
#else
#ifndef WIN32
extern unsigned sleep ();
#else
#define link rename
#endif
#endif
static int read_short(FILE *, unsigned short *);
static int read_string(FILE *, char **);
@ -97,12 +94,6 @@ _tt_AuthFileName ()
static char *buf;
static int bsize;
int size;
#ifdef WIN32
#ifndef PATH_MAX
#define PATH_MAX 512
#endif
char dir[PATH_MAX];
#endif
if (name = getenv ("TTAUTHORITY"))
return (name);
@ -111,24 +102,6 @@ _tt_AuthFileName ()
if (!name)
{
#ifdef WIN32
char *ptr1;
char *ptr2;
int len1 = 0, len2 = 0;
if ((ptr1 = getenv("HOMEDRIVE")) && (ptr2 = getenv("HOMEDIR"))) {
len1 = strlen (ptr1);
len2 = strlen (ptr2);
} else if (ptr2 = getenv("USERNAME")) {
len1 = strlen (ptr1 = "/users/");
len2 = strlen (ptr2);
}
if ((len1 + len2 + 1) < PATH_MAX) {
sprintf (dir, "%s%s", ptr1, (ptr2) ? ptr2 : "");
name = dir;
}
if (!name)
#endif
return (NULL);
}
@ -226,24 +199,18 @@ _tt_LockAuthFile(char *file_name, int retries, int timeout, long dead)
void
_tt_UnlockAuthFile(char *file_name)
{
#ifndef WIN32
char creat_name[1025];
#endif
char link_name[1025];
if ((int) strlen (file_name) > 1022)
return;
#ifndef WIN32
strcpy (creat_name, file_name);
strcat (creat_name, "-c");
#endif
strcpy (link_name, file_name);
strcat (link_name, "-l");
#ifndef WIN32
unlink (creat_name);
#endif
unlink (link_name);
}

View file

@ -108,14 +108,12 @@
# undef ctime
# ifndef _WIN32
# define remove(x) unlink(x)
# define rename(x,y) ((link(x,y)||remove(x))?-1:0)
# endif
@ -138,7 +136,7 @@ replace __PARAM__((const char* newfile, const char* oldfile, int preserve), (new
#line 1 "../../lib/libpp/ppproto.c"
@ -155,7 +153,7 @@ static const char id[] = "\n@(#)proto (AT&T Bell Laboratories) 05/09/95\000\n";
#line 1 "../../lib/libpp/ppfsm.c"

View file

@ -512,17 +512,6 @@ static int canexecute __PARAM__((char *path, int isfun), (path, isfun)) __OTORP_
}
else if(stat(path,&statb) < 0)
{
#ifdef _WIN32
/* check for .exe suffix */
if(errno==ENOENT)
{
stakputs(".exe");
path = stakptr(PATH_OFFSET);
if(stat(path,&statb) < 0)
goto err;
}
else
#endif /* _WIN32 */
goto err;
}
errno = EPERM;

View file

@ -617,11 +617,7 @@ __STDPP__directive pragma pp:ignore "string.h"
/* <unistd.h> */
#ifdef _WIN32
#include <unistd.h>
#else
#include <ast_unistd.h>
#endif
#include <ast_botch.h>
#ifndef STDIN_FILENO
@ -696,8 +692,6 @@ extern __MANGLE__ char* ttyname __PROTO__((int));
extern __MANGLE__ int unlink __PROTO__((const char*));
extern __MANGLE__ ssize_t write __PROTO__((int, const __V_*, size_t));
#ifndef _WIN32
/*
* yes, we don't trust anyone's interpretation but our own
*/
@ -716,8 +710,6 @@ extern __MANGLE__ long fpathconf __PROTO__((int, int));
extern __MANGLE__ long pathconf __PROTO__((const char*, int));
extern __MANGLE__ long sysconf __PROTO__((int));
#endif
#if defined(__STDPP__directive) && defined(__STDPP__ignore)
__STDPP__directive pragma pp:ignore "unistd.h"

View file

@ -143,18 +143,12 @@ _falsetlocale(int category, const char *name)
char *
_fallcMapOSLocaleName(char *osname, char *siname)
{
#if defined(hpux) || defined(CSRG_BASED) || defined(sun) || defined(SVR4) || \
defined(WIN32)
#if defined(hpux) || defined(CSRG_BASED) || defined(sun) || defined(SVR4)
#ifdef hpux
#define SKIPCOUNT 2
#define STARTCHAR ':'
#define ENDCHAR ';'
#elif defined(WIN32)
#define SKIPCOUNT 1
#define STARTCHAR '='
#define ENDCHAR ';'
#define WHITEFILL
#elif !defined(sun) || defined(SVR4)
#define STARTCHAR '/'
#define ENDCHAR '/'

View file

@ -58,9 +58,6 @@ OF THIS SOFTWARE.
#include "_fallcGeneric.h"
#include <ctype.h>
#ifdef WIN32
#define isascii __isascii
#endif
#define CS0 codesets[0] /* Codeset 0 - 7-bit ASCII */
#define CS1 codesets[1] /* Codeset 1 - Kanji */

View file

@ -63,9 +63,6 @@ OR PERFORMANCE OF THIS SOFTWARE.
#include "_fallcGeneric.h"
#include <ctype.h>
#ifdef WIN32
#define isascii __isascii
#endif
#define CS0 codesets[0] /* Codeset 0 - 7-bit ASCII */
#define CS1 codesets[1] /* Codeset 1 - Kanji */

View file

@ -88,9 +88,6 @@ from the X Consortium.
#include <X11/Xlocale.h>
#endif
#include <X11/Xos.h>
#ifdef WIN32
#undef close
#endif
#include "_falutil.h"
extern void _fallcInitLoader(
@ -139,11 +136,7 @@ Bool _fallcValidModSyntax(char *mods, char **valid_mods)
break;
for (ptr = valid_mods; *ptr; ptr++) {
i = strlen(*ptr);
if (strncmp(mods, *ptr, i) || ((mods[i] != '=')
#ifdef WIN32
&& (mods[i] != '#')
#endif
))
if (strncmp(mods, *ptr, i) || ((mods[i] != '=')))
continue;
mods = strchr(mods+i+1, '@');
break;
@ -173,19 +166,6 @@ _fallcDefaultMapModifiers (XLCd lcd, char *user_mods, char *prog_mods)
strcpy(mods, prog_mods);
if (user_mods)
strcat(mods, user_mods);
#ifdef WIN32
{
char *s;
for (s = mods; s = strchr(s, '@'); s++) {
for (s++; *s && *s != '='; s++) {
if (*s == '#') {
*s = '=';
break;
}
}
}
}
#endif
}
return mods;
}

View file

@ -77,10 +77,6 @@ from the X Consortium.
#include "syncx.h"
#ifdef WIN32
#define _XFlush _XFlushIt
#endif
struct _XGC
{
XExtData *ext_data; /* hook for extension to hang data */
@ -253,14 +249,6 @@ struct _XLockPtrs {
typedef struct _LockInfoRec *LockInfoPtr;
#if defined(WIN32) && !defined(_XLIBINT_)
#define _XCreateMutex_fn (*_XCreateMutex_fn_p)
#define _XFreeMutex_fn (*_XFreeMutex_fn_p)
#define _XLockMutex_fn (*_XLockMutex_fn_p)
#define _XUnlockMutex_fn (*_XUnlockMutex_fn_p)
#define _Xglobal_lock (*_Xglobal_lock_p)
#endif
/* in XlibInt.c */
extern void (*_XCreateMutex_fn)(
LockInfoPtr /* lock */

View file

@ -62,11 +62,7 @@ from the X Consortium.
#include <X11/Xos.h>
#include <sys/stat.h>
#ifdef WIN32
#define OpenFile(name) open((name), O_RDONLY|O_TEXT)
#else
#define OpenFile(name) open((name), O_RDONLY)
#endif
#define CloseFile(fd) close((fd))
#define ReadFile(fd,buf,size) read((fd), (buf), (size))
#define GetSizeOfFile(name,size) \