summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-06-14 18:51:53 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-06-14 18:51:53 +0000
commit852c2e52c116ddde31d81b646561262ed796257a (patch)
treeb3b78e07e0f3600507f1a4fb651161793be13dcf /win32
parent703664f229b1c364f06ceda5f2503d00e2daa04c (diff)
downloadperl-852c2e52c116ddde31d81b646561262ed796257a.tar.gz
various win32 fixes
- fixes that silence VC noises about dup exports, non-default libs, and unsupported *.def file directives - s/inplace/inplace_label/ malloc.c - update Config{usemymalloc} based on d_mymalloc - export Perl_*Vars - fix makefiles to not build miniperl.exe twice, and to make it properly when defaults are changed p4raw-id: //depot/perl@1129
Diffstat (limited to 'win32')
-rw-r--r--win32/Makefile37
-rw-r--r--win32/config_sh.PL1
-rw-r--r--win32/makedef.pl10
-rw-r--r--win32/makefile.mk37
-rw-r--r--win32/perllib.c2
-rw-r--r--win32/win32.h3
6 files changed, 46 insertions, 44 deletions
diff --git a/win32/Makefile b/win32/Makefile
index 7ea64cb807..483f177b1a 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -242,7 +242,7 @@ NULL =
XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
-C++ -prototypes
-CORE_SRC = \
+MICROCORE_SRC = \
..\av.c \
..\byterun.c \
..\deb.c \
@@ -271,15 +271,15 @@ CORE_SRC = \
..\util.c
!IF "$(CRYPT_SRC)" != ""
-CORE_SRC = $(CORE_SRC) ..\$(CRYPT_SRC)
+MICROCORE_SRC = $(MICROCORE_SRC) ..\$(CRYPT_SRC)
!ENDIF
!IF "$(PERL_MALLOC)" == "define"
-CORE_SRC = $(CORE_SRC) ..\malloc.c
+EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c
!ENDIF
!IF "$(OBJECT)" == ""
-CORE_SRC = $(CORE_SRC) ..\perlio.c
+EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c
!ENDIF
WIN32_SRC = \
@@ -313,7 +313,7 @@ X2P_SRC = \
..\x2p\util.c \
..\x2p\walk.c
-CORE_H = \
+CORE_NOCFG_H = \
..\av.h \
..\byterun.h \
..\bytecode.h \
@@ -343,7 +343,6 @@ CORE_H = \
..\unixish.h \
..\util.h \
..\XSUB.h \
- .\config.h \
..\EXTERN.h \
..\perlvars.h \
..\intrpvar.h \
@@ -353,19 +352,20 @@ CORE_H = \
.\include\sys\socket.h \
.\win32.h
-CORE_OBJ = $(CORE_SRC:.c=.obj)
+CORE_H = $(CORE_NOCFG_H) .\config.h
+
+MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj)
+CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:.c=.obj)
WIN32_OBJ = $(WIN32_SRC:.c=.obj)
-MINICORE_OBJ = $(CORE_OBJ:..\=.\mini\) $(MINIDIR)\miniperlmain$(o)
+MINICORE_OBJ = $(MICROCORE_OBJ:..\=.\mini\) \
+ $(MINIDIR)\miniperlmain$(o) \
+ $(MINIDIR)\perlio$(o)
MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\)
MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
PERL95_OBJ = $(PERL95_SRC:.c=.obj)
DLL_OBJ = $(DLL_SRC:.c=.obj)
X2P_OBJ = $(X2P_SRC:.c=.obj)
-!IF "$(OBJECT)" != ""
-MINICORE_OBJ = $(MINICORE_OBJ) $(MINIDIR)\perlio$(o)
-!ENDIF
-
PERLDLL_OBJ = $(CORE_OBJ)
PERLEXE_OBJ = perlmain$(o)
@@ -458,8 +458,8 @@ CFG_VARS = \
# Top targets
#
-all : $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) $(PERL95EXE) $(CAPILIB) $(X2P) \
- $(EXTENSION_DLL)
+all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) $(PERL95EXE) \
+ $(CAPILIB) $(X2P) $(EXTENSION_DLL)
$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
@@ -512,15 +512,18 @@ $(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
$(MINIDIR) :
if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
-$(MINICORE_OBJ) : $(CORE_H)
+$(MINICORE_OBJ) : $(CORE_NOCFG_H)
$(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ ..\$(*F).c
-$(MINIWIN32_OBJ) : $(CORE_H)
+$(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
$(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*F).c
+# 1. we don't want to rebuild miniperl.exe when config.h changes
+# 2. we don't want to rebuild miniperl.exe with non-default config.h
+$(MINI_OBJ) : $(CORE_NOCFG_H)
+
$(WIN32_OBJ) : $(CORE_H)
$(CORE_OBJ) : $(CORE_H)
-$(MINI_OBJ) : $(CORE_H)
$(DLL_OBJ) : $(CORE_H)
$(PERL95_OBJ) : $(CORE_H)
$(X2P_OBJ) : $(CORE_H)
diff --git a/win32/config_sh.PL b/win32/config_sh.PL
index 0c3713cb2e..45c1ba4e27 100644
--- a/win32/config_sh.PL
+++ b/win32/config_sh.PL
@@ -13,6 +13,7 @@ if ($] =~ /\.(\d\d\d)?(\d\d)?$/) { # should always be true
$opt{'cf_by'} = $ENV{USERNAME} unless $opt{'cf_by'};
$opt{'cf_email'} = $opt{'cf_by'} . '@' . (gethostbyname('localhost'))[0]
unless $opt{'cf_email'};
+$opt{'usemymalloc'} = 'y' if $opt{'d_mymalloc'} eq 'define';
while (<>)
{
diff --git a/win32/makedef.pl b/win32/makedef.pl
index 4e317b5d15..65e8023962 100644
--- a/win32/makedef.pl
+++ b/win32/makedef.pl
@@ -45,8 +45,6 @@ if ($CCTYPE ne 'GCC')
{
print "LIBRARY Perl\n";
print "DESCRIPTION 'Perl interpreter, export autogenerated'\n";
- print "CODE LOADONCALL\n";
- print "DATA LOADONCALL NONSHARED MULTIPLE\n";
}
else
{
@@ -320,6 +318,8 @@ if ($define{'PERL_GLOBAL_STRUCT'})
{
my $global = readvar("../perlvars.h");
skip_symbols $global;
+ emit_symbols [qw(Perl_GetVars)];
+ emit_symbols [qw(Perl_Vars Perl_VarsPtr)] unless $CCTYPE eq 'GCC';
}
unless ($define{'DEBUGGING'})
@@ -360,11 +360,7 @@ close(GLOBAL);
# doesn't hurt to include them anyway.
# these don't have Perl prefix
-if ($define{'PERL_GLOBAL_STRUCT'})
- {
- emit_symbol( ($CCTYPE eq 'GCC') ? 'Perl_GetVars' : 'Perl_VarsPtr')
- }
-else
+unless ($define{'PERL_GLOBAL_STRUCT'})
{
my $glob = readvar("../perlvars.h");
emit_symbols $glob;
diff --git a/win32/makefile.mk b/win32/makefile.mk
index 39b0b1054a..6b544c5123 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -352,7 +352,7 @@ NOOP = @echo
XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
-C++ -prototypes
-CORE_SRC = \
+MICROCORE_SRC = \
..\av.c \
..\byterun.c \
..\deb.c \
@@ -381,15 +381,15 @@ CORE_SRC = \
..\util.c
.IF "$(CRYPT_SRC)" != ""
-CORE_SRC += ..\$(CRYPT_SRC)
+MICROCORE_SRC += ..\$(CRYPT_SRC)
.ENDIF
.IF "$(PERL_MALLOC)" == "define"
-CORE_SRC += ..\malloc.c
+EXTRACORE_SRC += ..\malloc.c
.ENDIF
.IF "$(OBJECT)" == ""
-CORE_SRC += ..\perlio.c
+EXTRACORE_SRC += ..\perlio.c
.ENDIF
WIN32_SRC = \
@@ -423,7 +423,7 @@ X2P_SRC = \
..\x2p\util.c \
..\x2p\walk.c
-CORE_H = \
+CORE_NOCFG_H = \
..\av.h \
..\byterun.h \
..\bytecode.h \
@@ -453,7 +453,6 @@ CORE_H = \
..\unixish.h \
..\util.h \
..\XSUB.h \
- .\config.h \
..\EXTERN.h \
..\perlvars.h \
..\intrpvar.h \
@@ -463,19 +462,18 @@ CORE_H = \
.\include\sys\socket.h \
.\win32.h
-CORE_OBJ = $(CORE_SRC:db:+$(o))
+CORE_H = $(CORE_NOCFG_H) .\config.h
+
+MICROCORE_OBJ = $(MICROCORE_SRC:db:+$(o))
+CORE_OBJ = $(MICROCORE_OBJ) $(EXTRACORE_SRC:db:+$(o))
WIN32_OBJ = $(WIN32_SRC:db:+$(o))
-MINICORE_OBJ = $(MINIDIR)\{$(CORE_OBJ:f) miniperlmain$(o)}
+MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)}
MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)}
MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
PERL95_OBJ = $(PERL95_SRC:db:+$(o))
DLL_OBJ = $(DLL_SRC:db:+$(o))
X2P_OBJ = $(X2P_SRC:db:+$(o))
-.IF "$(OBJECT)" != ""
-MINICORE_OBJ += $(MINIDIR)\perlio$(o)
-.ENDIF
-
PERLDLL_OBJ = $(CORE_OBJ)
PERLEXE_OBJ = perlmain$(o)
@@ -567,8 +565,8 @@ CFG_VARS = \
# Top targets
#
-all : $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) $(PERL95EXE) $(CAPILIB) $(X2P) \
- $(EXTENSION_DLL)
+all : .\config.h $(GLOBEXE) $(MINIMOD) $(CONFIGPM) $(PERLEXE) $(PERL95EXE) \
+ $(CAPILIB) $(X2P) $(EXTENSION_DLL)
$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
@@ -591,7 +589,7 @@ perlglob$(o) : perlglob.c
config.w32 : $(CFGSH_TMPL)
copy $(CFGSH_TMPL) config.w32
-.\config.h : $(CFGH_TMPL)
+.\config.h : $(CFGH_TMPL) $(CORE_NOCFG_H)
-del /f config.h
copy $(CFGH_TMPL) config.h
@@ -634,15 +632,18 @@ $(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
$(MINIDIR) :
if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
-$(MINICORE_OBJ) : $(CORE_H)
+$(MINICORE_OBJ) : $(CORE_NOCFG_H)
$(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ ..\$(*B).c
-$(MINIWIN32_OBJ) : $(CORE_H)
+$(MINIWIN32_OBJ) : $(CORE_NOCFG_H)
$(CC) -c $(CFLAGS) $(OBJOUT_FLAG)$@ $(*B).c
+# 1. we don't want to rebuild miniperl.exe when config.h changes
+# 2. we don't want to rebuild miniperl.exe with non-default config.h
+$(MINI_OBJ) : $(CORE_NOCFG_H)
+
$(WIN32_OBJ) : $(CORE_H)
$(CORE_OBJ) : $(CORE_H)
-$(MINI_OBJ) : $(CORE_H)
$(DLL_OBJ) : $(CORE_H)
$(PERL95_OBJ) : $(CORE_H)
$(X2P_OBJ) : $(CORE_H)
diff --git a/win32/perllib.c b/win32/perllib.c
index 4b57963a99..3bec9c0c51 100644
--- a/win32/perllib.c
+++ b/win32/perllib.c
@@ -9,7 +9,7 @@
static void xs_init _((void));
-__declspec(dllexport) int
+DllExport int
RunPerl(int argc, char **argv, char **env, void *iosubsystem)
{
int exitstatus;
diff --git a/win32/win32.h b/win32/win32.h
index 5242018948..a6a2f9d5c5 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -46,7 +46,8 @@ typedef long long __int64;
#define DllExport
#else
#if defined(PERLDLL) || defined(WIN95FIX)
-#define DllExport __declspec(dllexport)
+#define DllExport
+/*#define DllExport __declspec(dllexport)*/ /* noises with VC5+sp3 */
#else
#define DllExport __declspec(dllimport)
#endif