BEGIN {
require 5.004;
+ chdir '..' if !-d 'lib' and -d '..\lib';
@INC = 'lib';
$ENV{PERL5LIB} = 'lib';
}
-x 'perl' . $exe_ext || die "perl isn't executable!\n";
-x 'suidperl' . $exe_ext|| die "suidperl isn't executable!\n" if $d_dosuid;
--x 't/TEST' || warn "WARNING: You've never run 'make test'!!!",
- " (Installing anyway.)\n";
+-x 't/TEST' || $^O eq 'MSWin32'
+ || warn "WARNING: You've never run 'make test'!!!",
+ " (Installing anyway.)\n";
if ($^O eq 'MSWin32') {
$mainperl_is_instperl = 0;
-if (!$versiononly && !$nonono && -t STDIN && -t STDERR
+if (!$versiononly && !$nonono && $^O ne 'MSWin32' && -t STDIN && -t STDERR
&& -w $mainperldir && ! samepath($mainperldir, $installbin)) {
local($usrbinperl) = "$mainperldir/perl$exe_ext";
local($instperl) = "$installbin/perl$exe_ext";
# newly built perl.
INST_DRV=c:
INST_TOP=$(INST_DRV)\perl5004.5x
-BUILDOPT=-DUSE_THREADS
-#BUILDOPT=-DMULTIPLICITY
-#BUILDOPT=-DMULTIPLICITY -DUSE_THREADS
-#BUILDOPT=-DPERL_GLOBAL_STRUCT -DMULTIPLICITY
+
+#
+# uncomment to enable threads-capabilities
+#USE_THREADS=-DUSE_THREADS
#
# uncomment next line if you are using Visual C++ 2.x
CRYPT_FLAG=-DHAVE_DES_FCRYPT
!ENDIF
+BUILDOPT = $(USE_THREADS)
+#BUILDOPT = $(USE_THREADS) -DMULTIPLICITY
+#BUILDOPT = $(USE_THREADS) -DPERL_GLOBAL_STRUCT -DMULTIPLICITY
+# -DUSE_PERLIO -D__STDC__=1 -DUSE_SFIO -DI_SFIO -I\sfio97\include
+
+!IF "$(PROCESSOR_ARCHITECTURE)" == ""
+PROCESSOR_ARCHITECTURE = x86
+!ENDIF
+
+!IF "$(USE_THREADS)" == ""
+ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
+!ELSE
+ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
+!ENDIF
+
+ARCHDIR = ..\lib\$(ARCHNAME)
+COREDIR = ..\lib\CORE
+
#
# Programs to compile, build .lib files and link
#
.SUFFIXES : .c $(o) .dll .lib .exe
.c$(o):
- $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $<
+ $(CC) -c -I$(<D) $(CFLAGS) $(OBJOUT_FLAG)$@ $<
$(o).dll:
$(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
-out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
+.y.c:
+ $(NOOP)
+
#
INST_BIN=$(INST_TOP)\bin
INST_LIB=$(INST_TOP)\lib
GLOBEXE=..\perlglob.exe
CONFIGPM=..\lib\Config.pm
MINIMOD=..\lib\ExtUtils\Miniperl.pm
+X2P=..\x2p\a2p.exe
PL2BAT=bin\pl2bat.pl
GLOBBAT = bin\perlglob.bat
PERL95EXE=..\perl95.exe
XCOPY=xcopy /f /r /i /d
RCOPY=xcopy /f /r /i /e /d
+NOOP=@echo
NULL=
!IF "$(CRYPT_SRC)" != ""
DLL_OBJ = perllib$(o) $(DYNALOADER)$(o)
+X2P_OBJ = ..\x2p\a2p$(o) \
+ ..\x2p\hash$(o) \
+ ..\x2p\str$(o) \
+ ..\x2p\util$(o) \
+ ..\x2p\walk$(o)
+
CORE_H = ..\av.h \
..\cop.h \
..\cv.h \
# Top targets
#
-all: $(PERLEXE) $(PERL95EXE) $(GLOBEXE) $(DYNALOADMODULES) $(MINIMOD) $(GLOBBAT)
+all: $(PERLEXE) $(PERL95EXE) $(GLOBEXE) $(DYNALOADMODULES) $(MINIMOD) \
+ $(X2P) $(GLOBBAT)
$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
$(MINIPERL) -I..\lib config_sh.PL \
"INST_DRV=$(INST_DRV)" \
"INST_TOP=$(INST_TOP)" \
+ "archname=$(ARCHNAME)" \
"cc=$(CC)" \
"ccflags=$(OPTIMIZE) $(DEFINES)" \
"cf_email=$(EMAIL)" \
$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
cd .. && miniperl configpm
if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
- $(XCOPY) ..\*.h ..\lib\CORE\*.*
- $(XCOPY) *.h ..\lib\CORE\*.*
- $(RCOPY) include ..\lib\CORE\*.*
+ $(XCOPY) ..\*.h $(COREDIR)\*.*
+ $(XCOPY) *.h $(COREDIR)\*.*
+ $(RCOPY) include $(COREDIR)\*.*
$(MINIPERL) -I..\lib config_h.PL || $(MAKE) CCTYPE=$(CCTYPE) \
RUNTIME=$(RUNTIME) CFG=$(CFG) $(CONFIGPM)
$(CORE_OBJ) : $(CORE_H)
$(DLL_OBJ) : $(CORE_H)
$(PERL95_OBJ) : $(CORE_H)
+$(X2P_OBJ) : $(CORE_H)
perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym makedef.pl
$(MINIPERL) -w makedef.pl $(OPTIMIZE) $(DEFINES) \
$(LINK32) -dll -def:perldll.def -out:$@ @<<
$(LINK_FLAGS) $(LIBFILES) $(CORE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
<<
- $(XCOPY) $(PERLIMPLIB) ..\lib\CORE
+ $(XCOPY) $(PERLIMPLIB) $(COREDIR)
perl.def : $(MINIPERL) makeperldef.pl
$(MINIPERL) -I..\lib makeperldef.pl $(NULL) > perl.def
$(MINIMOD) : $(MINIPERL) ..\minimod.pl
cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
+$(X2P) : $(X2P_OBJ)
+ $(LINK32) -subsystem:console -out:$@ @<<
+ $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ)
+<<
+
perlmain.c : runperl.c
copy runperl.c perlmain.c
$(XCOPY) *.bat ..\win32\bin\*.*
cd ..\win32
copy ..\README.win32 ..\pod\perlwin32.pod
- $(PERLEXE) ..\installhtml --podroot=.. --htmldir=./html \
+ $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
--podpath=pod:lib:ext:utils --htmlroot="//$(INST_HTML::=|)" \
--libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
utils: $(PERLEXE)
cd ..\utils
nmake PERL=$(MINIPERL)
- $(PERLEXE) ..\win32\$(PL2BAT) h2ph splain perlbug pl2pm c2ph
+ $(PERLEXE) -I..\lib ..\win32\$(PL2BAT) h2ph splain perlbug pl2pm c2ph
$(PERLEXE) ..\win32\$(PL2BAT) h2xs perldoc pstruct
$(XCOPY) *.bat ..\win32\bin\*.*
cd ..\win32
-del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c \
config.h.new perl95.c
-del /f bin\*.bat
- -rmdir /s /q ..\lib\auto
- -rmdir /s /q ..\lib\CORE
+ -rmdir /s /q ..\lib\auto || rmdir /s ..\lib\auto
+ -rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR)
cd $(EXTDIR)
-del /s *.lib *.def *.map *.bs Makefile *$(o) pm_to_blib
cd ..\win32
install : all doc utils
- if not exist $(INST_TOP) mkdir $(INST_TOP)
- echo I $(INST_TOP) L $(LIBDIR)
- $(XCOPY) $(PERLEXE) $(INST_BIN)\*.*
+ $(PERLEXE) ..\installperl
$(XCOPY) $(PERL95EXE) $(INST_BIN)\*.*
$(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
- $(XCOPY) $(PERLDLL) $(INST_BIN)\*.*
$(XCOPY) bin\*.bat $(INST_BIN)\*.*
- $(RCOPY) ..\lib $(INST_LIB)\*.*
$(XCOPY) ..\pod\*.bat $(INST_BIN)\*.*
- $(XCOPY) ..\pod\*.pod $(INST_POD)\*.*
$(RCOPY) html\*.* $(INST_HTML)\*.*
inst_lib : $(CONFIGPM)
-@erase $(CORE_OBJ)
-@erase $(WIN32_OBJ)
-@erase $(DLL_OBJ)
+ -@erase $(X2P_OBJ)
-@erase ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp
-@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
+ -@erase ..\x2p\*.exe ..\x2p\*.bat
-@erase *.ilk
-@erase *.pdb
less='less'
lib_ext='.lib'
libc='cw32mti.lib'
+libperl='perl.lib'
libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m c cposix posix ndir dir crypt ucb bsd BSD PW x'
line='line'
lint=''
## Target system: WIN32
#
-archlibexp='~INST_TOP~\lib'
+archlibexp='~INST_TOP~\lib\~archname~'
archname='MSWin32'
cc='gcc'
ccflags='-DWIN32'
dlsrc='dl_win32.xs'
dynamic_ext='Socket IO Fcntl Opcode SDBM_File attrs Thread'
extensions='~static_ext~ ~dynamic_ext~'
-installarchlib='~INST_TOP~\lib'
+installarchlib='~INST_TOP~\lib\~archname~'
installprivlib='~INST_TOP~\lib'
libpth=''
libs=' '
alignbytes='8'
aphostname=''
ar='ar'
-archlib='~INST_TOP~\lib'
+archlib='~INST_TOP~\lib\~archname~'
archobjs=''
awk='awk'
baserev='5.0'
less='less'
lib_ext='.lib'
libc='msvcrt.lib'
+libperl='libperl.a'
libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m c cposix posix ndir dir crypt ucb bsd BSD PW x'
line='line'
lint=''
## Target system: WIN32
#
-archlibexp='~INST_TOP~\lib'
+archlibexp='~INST_TOP~\lib\~archname~'
archname='MSWin32'
cc='cl'
ccflags='-MD -DWIN32'
dlsrc='dl_win32.xs'
dynamic_ext='Socket IO Fcntl Opcode SDBM_File attrs Thread'
extensions='~static_ext~ ~dynamic_ext~'
-installarchlib='~INST_TOP~\lib'
+installarchlib='~INST_TOP~\lib\~archname~'
installprivlib='~INST_TOP~\lib'
libpth=''
libs=''
alignbytes='8'
aphostname=''
ar='lib'
-archlib='~INST_TOP~\lib'
+archlib='~INST_TOP~\lib\~archname~'
archobjs=''
awk='awk'
baserev='5.0'
less='less'
lib_ext='.lib'
libc='msvcrt.lib'
+libperl='perl.lib'
libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m c cposix posix ndir dir crypt ucb bsd BSD PW x'
line='line'
lint=''
shift(@ARGV);
}
-$opt{'archname'} = 'MSWin32';
-if (defined $ENV{'PROCESSOR_ARCHITECTURE'})
- {
- $opt{'archname'} .= '-'.$ENV{'PROCESSOR_ARCHITECTURE'};
- }
-
-if ($opt{'ccflags'} =~ /USE_THREADS/)
- {
- $opt{'archname'} .= '-thread';
- }
-
if ($] =~ /\.(\d\d\d)?(\d\d)?$/) { # should always be true
$opt{PATCHLEVEL} = int($1 || 0);
$opt{SUBVERSION} = $2 || '00';
INST_TOP *= $(INST_DRV)\perl5004.5x
#
-#
-BUILDOPT *= -DUSE_THREADS
-#BUILDOPT *= -DMULTIPLICITY
-#BUILDOPT *=-DMULTIPLICITY -DUSE_THREADS
-#BUILDOPT *=-DPERL_GLOBAL_STRUCT -DMULTIPLICITY
-
-# -DUSE_PERLIO -D__STDC__=1 -DUSE_SFIO -DI_SFIO -I\sfio97\include
+# uncomment to enable threads-capabilities
+#USE_THREADS *= -DUSE_THREADS
#
# uncomment one
CRYPT_FLAG=-DHAVE_DES_FCRYPT
.ENDIF
+BUILDOPT *= $(USE_THREADS)
+#BUILDOPT *= $(USE_THREADS) -DMULTIPLICITY
+#BUILDOPT *= $(USE_THREADS) -DPERL_GLOBAL_STRUCT -DMULTIPLICITY
+# -DUSE_PERLIO -D__STDC__=1 -DUSE_SFIO -DI_SFIO -I\sfio97\include
+
+.IMPORT .IGNORE : PROCESSOR_ARCHITECTURE
+
+PROCESSOR_ARCHITECTURE *= x86
+
+.IF "$(USE_THREADS)" == ""
+ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
+.ELSE
+ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
+.ENDIF
+
+ARCHDIR = ..\lib\$(ARCHNAME)
+COREDIR = ..\lib\CORE
+
#
# Programs to compile, build .lib files and link
#
LINK_DBG = -release
.ENDIF
-.IMPORT .IGNORE : PROCESSOR_ARCHITECTURE
-
-PROCESSOR_ARCHITECTURE *= x86
-
# we don't add LIBC here, the compiler do it based on -MD/-MT
LIBFILES = $(CRYPT_LIB) oldnames.lib kernel32.lib user32.lib gdi32.lib \
winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib \
.SUFFIXES : .c $(o) .dll .lib .exe .a
.c$(o):
- $(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $<
+ $(CC) -c -I$(<:d) $(CFLAGS) $(OBJOUT_FLAG)$@ $<
+
+.y.c:
+ $(NOOP)
$(o).dll:
.IF "$(CCTYPE)" == "BORLAND"
GLOBEXE=..\perlglob.exe
CONFIGPM=..\lib\Config.pm
MINIMOD=..\lib\ExtUtils\Miniperl.pm
+X2P=..\x2p\a2p.exe
PL2BAT=bin\pl2bat.pl
GLOBBAT = bin\perlglob.bat
XCOPY=xcopy /f /r /i /d
RCOPY=xcopy /f /r /i /e /d
+NOOP=@echo
#NULL=
.IF "$(CRYPT_SRC)" != ""
DLL_OBJ = perllib$(o) $(DYNALOADER)$(o)
+X2P_OBJ = ..\x2p\a2p$(o) \
+ ..\x2p\hash$(o) \
+ ..\x2p\str$(o) \
+ ..\x2p\util$(o) \
+ ..\x2p\walk$(o)
+
CORE_H = ..\av.h \
..\cop.h \
..\cv.h \
# Top targets
#
-all: $(PERLEXE) $(PERL95EXE) $(GLOBEXE) $(DYNALOADMODULES) $(MINIMOD) $(GLOBBAT)
+all: $(PERLEXE) $(PERL95EXE) $(GLOBEXE) $(DYNALOADMODULES) $(MINIMOD) \
+ $(X2P) $(GLOBBAT)
$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
$(MINIPERL) -I..\lib config_sh.PL \
"INST_DRV=$(INST_DRV)" \
"INST_TOP=$(INST_TOP)" \
+ "archname=$(ARCHNAME)" \
"cc=$(CC)" \
"ccflags=$(OPTIMIZE) $(DEFINES)" \
"cf_email=$(EMAIL)" \
$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
cd .. && miniperl configpm
if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
- $(XCOPY) ..\*.h ..\lib\CORE\*.*
- $(XCOPY) *.h ..\lib\CORE\*.*
- $(RCOPY) include ..\lib\CORE\*.*
+ $(XCOPY) ..\*.h $(COREDIR)\*.*
+ $(XCOPY) *.h $(COREDIR)\*.*
+ $(RCOPY) include $(COREDIR)\*.*
$(MINIPERL) -I..\lib config_h.PL || $(MAKE) CCTYPE=$(CCTYPE) \
CFG=$(CFG) $(CONFIGPM)
.IF "$(CCTYPE)" == "BORLAND"
$(LINK32) -Tpe -ap $(LINK_FLAGS) \
@$(mktmp c0x32$(o) ..\miniperlmain$(o) \
- $(CORE_OBJ:s,\,\\) $(WIN32_OBJ:s,\,\\),$@,,$(LIBFILES),)
+ $(CORE_OBJ:s,\,\\) $(WIN32_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
.ELIF "$(CCTYPE)" == "GCC"
$(LINK32) -v -o $@ $(LINK_FLAGS) \
$(mktmp $(LKPRE) ..\miniperlmain$(o) \
$(WIN32_OBJ) : $(CORE_H)
$(CORE_OBJ) : $(CORE_H)
$(DLL_OBJ) : $(CORE_H)
+$(X2P_OBJ) : $(CORE_H)
perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym makedef.pl
$(MINIPERL) -w makedef.pl $(OPTIMIZE) $(DEFINES) \
@$(mktmp $(LINK_FLAGS) $(LIBFILES) $(CORE_OBJ:s,\,\\) \
$(WIN32_OBJ:s,\,\\) $(DLL_OBJ:s,\,\\))
.ENDIF
- $(XCOPY) $(PERLIMPLIB) ..\lib\CORE
+ $(XCOPY) $(PERLIMPLIB) $(COREDIR)
perl.def : $(MINIPERL) makeperldef.pl
$(MINIPERL) -I..\lib makeperldef.pl $(NULL) > perl.def
$(MINIMOD) : $(MINIPERL) ..\minimod.pl
cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
+$(X2P) : $(X2P_OBJ)
+ $(MINIPERL) ..\x2p\find2perl.PL
+ $(MINIPERL) ..\x2p\s2p.PL
+.IF "$(CCTYPE)" == "BORLAND"
+ $(LINK32) -Tpe -ap $(LINK_FLAGS) \
+ @$(mktmp c0x32$(o) $(X2P_OBJ:s,\,\\),$(@:s,\,\\),,$(LIBFILES),)
+.ELIF "$(CCTYPE)" == "GCC"
+ $(LINK32) -v -o $@ $(LINK_FLAGS) \
+ $(mktmp $(LKPRE) $(X2P_OBJ:s,\,\\) $(LIBFILES) $(LKPOST))
+.ELSE
+ $(LINK32) -subsystem:console -out:$@ \
+ @$(mktmp $(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ:s,\,\\)
+.ENDIF
+
perlmain.c : runperl.c
copy runperl.c perlmain.c
pod2html pod2latex pod2man pod2text
cd ..\pod && $(XCOPY) *.bat ..\win32\bin\*.*
copy ..\README.win32 ..\pod\perlwin32.pod
- $(PERLEXE) ..\installhtml --podroot=.. --htmldir=./html \
+ $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
--podpath=pod:lib:ext:utils --htmlroot="//$(INST_HTML:s,:,|,)" \
--libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
cd ..\utils && $(PERLEXE) ..\win32\$(PL2BAT) h2ph splain perlbug \
pl2pm c2ph h2xs perldoc pstruct
$(XCOPY) ..\utils\*.bat bin\*.*
- $(PERLEXE) $(PL2BAT) bin\network.pl bin\www.pl bin\runperl.pl \
+ $(PERLEXE) -I..\lib $(PL2BAT) bin\network.pl bin\www.pl bin\runperl.pl \
bin\pl2bat.pl
distclean: clean
.ENDIF
-del /f bin\*.bat
-cd $(EXTDIR) && del /s *.lib *.def *.map *.bs Makefile *$(o) pm_to_blib
- -rmdir /s /q ..\lib\auto
- -rmdir /s /q ..\lib\CORE
+ -rmdir /s /q ..\lib\auto || rmdir /s ..\lib\auto
+ -rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR)
install : all doc utils
- if not exist $(INST_TOP) mkdir $(INST_TOP)
- echo I $(INST_TOP) L $(LIBDIR)
- $(XCOPY) $(PERLEXE) $(INST_BIN)\*.*
+ $(PERLEXE) ..\installperl
.IF "$(PERL95EXE)" != ""
$(XCOPY) $(PERL95EXE) $(INST_BIN)\*.*
.ENDIF
$(XCOPY) $(GLOBEXE) $(INST_BIN)\*.*
- $(XCOPY) $(PERLDLL) $(INST_BIN)\*.*
$(XCOPY) bin\*.bat $(INST_BIN)\*.*
- $(RCOPY) ..\lib $(INST_LIB)\*.*
$(XCOPY) ..\pod\*.bat $(INST_BIN)\*.*
- $(XCOPY) ..\pod\*.pod $(INST_POD)\*.*
$(RCOPY) html\*.* $(INST_HTML)\*.*
inst_lib : $(CONFIGPM)
-@erase $(CORE_OBJ)
-@erase $(WIN32_OBJ)
-@erase $(DLL_OBJ)
+ -@erase $(X2P_OBJ)
-@erase ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp
-@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
+ -@erase ..\x2p\*.exe ..\x2p\*.bat
-@erase *.ilk
-@erase *.pdb
*/
#define VOIDUSED 1
+
+#ifdef WIN32
+#define _INC_WIN32_PERL5 /* kludge around win32 stdio layer */
+#endif
+
#ifdef VMS
# include "config.h"
#else
# include "../config.h"
#endif
+#ifdef WIN32
+#undef USE_STDIO_PTR /* XXX fast gets won't work, must investigate */
+# ifndef STANDARD_C
+# define STANDARD_C
+# endif
+# if defined(__BORLANDC__)
+# pragma warn -ccc
+# pragma warn -rch
+# pragma warn -sig
+# pragma warn -pia
+# pragma warn -par
+# pragma warn -aus
+# pragma warn -use
+# pragma warn -csu
+# pragma warn -pro
+# elif defined(_MSC_VER)
+# elif defined(__MINGW32__)
+# endif
+#endif
+
#if defined(__STDC__) || defined(vax11c) || defined(_AIX) || defined(__stdc__) || defined(__cplusplus)
# define STANDARD_C 1
#endif
* $Log: a2py.c,v $
*/
-#ifdef OS2
+#if defined(OS2) || defined(WIN32)
#include "../patchlevel.h"
#endif
#include "util.h"
int oper5(int type, int arg1, int arg2, int arg3, int arg4, int arg5);
STR *walk(int useval, int level, register int node, int *numericptr, int minprec);
-#ifdef OS2
+#if defined(OS2) || defined(WIN32)
+static void usage(void);
+
static void
usage()
{
case 0:
break;
default:
- fatal("Unrecognized switch: %s\n",argv[0]);
-#ifdef OS2
+#if defined(OS2) || defined(WIN32)
+ fprintf(stderr, "Unrecognized switch: %s\n",argv[0]);
usage();
+#else
+ fatal("Unrecognized switch: %s\n",argv[0]);
#endif
}
}
/* open script */
if (argv[0] == Nullch) {
-#ifdef OS2
+#if defined(OS2) || defined(WIN32)
if ( isatty(fileno(stdin)) )
usage();
#endif