$self->{'LDLOADLIBS'}
||= ( $BORLAND
? 'import32.lib cw32mti.lib '
- : ( $OBJ ? '' : 'msvcrt.lib ' )
- .'oldnames.lib kernel32.lib comdlg32.lib winspool.lib gdi32.lib '
+ : # compiler adds msvcrtd?.lib according to debug switches
+ 'oldnames.lib kernel32.lib comdlg32.lib winspool.lib gdi32.lib '
.'advapi32.lib user32.lib shell32.lib netapi32.lib ole32.lib '
.'oleaut32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib '
) . ' odbc32.lib odbccp32.lib';
# put library name in quotes (it could be a keyword, like 'Alias')
if ($Config::Config{'cc'} !~ /^gcc/i) {
print DEF "LIBRARY \"$data->{DLBASE}\"\n";
- if ($Config{'ccflags'} !~ /PERL_OBJECT/i) {
- print DEF "CODE LOADONCALL\n";
- print DEF "DATA LOADONCALL NONSHARED MULTIPLE\n";
- }
}
print DEF "EXPORTS\n ";
my @syms;
#endif
) goto hard_way;
else if (incr == 0) {
- inplace:
+ inplace_label:
#ifdef RCHECK
/*
* Record new allocated size of block and
nmalloc[pow * BUCKETS_PER_POW2]++;
#endif
*(cp - M_OVERHEAD) = pow * BUCKETS_PER_POW2; /* Fill index. */
- goto inplace;
+ goto inplace_label;
} else {
hard_way:
MUTEX_UNLOCK(&malloc_mutex);
XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
-C++ -prototypes
-CORE_SRC = \
+MICROCORE_SRC = \
..\av.c \
..\byterun.c \
..\deb.c \
..\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 = \
..\x2p\util.c \
..\x2p\walk.c
-CORE_H = \
+CORE_NOCFG_H = \
..\av.h \
..\byterun.h \
..\bytecode.h \
..\unixish.h \
..\util.h \
..\XSUB.h \
- .\config.h \
..\EXTERN.h \
..\perlvars.h \
..\intrpvar.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)
# 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
$(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)
$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 (<>)
{
{
print "LIBRARY Perl\n";
print "DESCRIPTION 'Perl interpreter, export autogenerated'\n";
- print "CODE LOADONCALL\n";
- print "DATA LOADONCALL NONSHARED MULTIPLE\n";
}
else
{
{
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'})
# 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;
XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
-C++ -prototypes
-CORE_SRC = \
+MICROCORE_SRC = \
..\av.c \
..\byterun.c \
..\deb.c \
..\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 = \
..\x2p\util.c \
..\x2p\walk.c
-CORE_H = \
+CORE_NOCFG_H = \
..\av.h \
..\byterun.h \
..\bytecode.h \
..\unixish.h \
..\util.h \
..\XSUB.h \
- .\config.h \
..\EXTERN.h \
..\perlvars.h \
..\intrpvar.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)
# 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
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
$(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)
static void xs_init _((void));
-__declspec(dllexport) int
+DllExport int
RunPerl(int argc, char **argv, char **env, void *iosubsystem)
{
int exitstatus;
#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