From: Gurusamy Sarathy Date: Fri, 30 Jan 1998 23:43:57 +0000 (+0000) Subject: [asperl] various tweaks X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8f818fa030b966544b5cf7bdfa53e06a9c371bfe;p=p5sagit%2Fp5-mst-13.2.git [asperl] various tweaks - add new functions to proto.h - fix up makefile.mk for $(OBJECT) p4raw-id: //depot/asperl@450 --- diff --git a/pp_ctl.c b/pp_ctl.c index 1d17642..60e8825 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -644,14 +644,6 @@ static int SortCv(const void *a, const void *b) { return pSortPerl->sortcv(a, b); } -static int SortCmp(const void *a, const void *b) -{ - return pSortPerl->sortcmp(a, b); -} -static int SortCmpLocale(const void *a, const void *b) -{ - return pSortPerl->sortcmp_locale(a, b); -} #endif PP(pp_sort) @@ -779,6 +771,8 @@ PP(pp_sort) if (max > 1) { MEXTEND(SP, 20); /* Can't afford stack realloc on signal. */ #ifdef PERL_OBJECT + /* XXX sort_mutex is probably not needed since qsort is now + * internal GSAR */ MUTEX_LOCK(&sort_mutex); pSortPerl = this; qsortsv(ORIGMARK+1, max, diff --git a/proto.h b/proto.h index 740a23e..8131fb6 100644 --- a/proto.h +++ b/proto.h @@ -264,6 +264,7 @@ VIRTUAL int magic_settaint _((SV* sv, MAGIC* mg)); VIRTUAL int magic_setuvar _((SV* sv, MAGIC* mg)); VIRTUAL int magic_setvec _((SV* sv, MAGIC* mg)); VIRTUAL int magic_set_all_env _((SV* sv, MAGIC* mg)); +VIRTUAL U32 magic_sizepack _((SV* sv, MAGIC* mg)); VIRTUAL int magic_wipepack _((SV* sv, MAGIC* mg)); VIRTUAL void magicname _((char* sym, char* name, I32 namlen)); int main _((int argc, char** argv, char** env)); @@ -280,6 +281,7 @@ VIRTUAL int mg_get _((SV* sv)); VIRTUAL U32 mg_len _((SV* sv)); VIRTUAL void mg_magical _((SV* sv)); VIRTUAL int mg_set _((SV* sv)); +VIRTUAL I32 mg_size _((SV* sv)); VIRTUAL OP* mod _((OP* o, I32 type)); VIRTUAL char* moreswitches _((char* s)); VIRTUAL OP* my _((OP* o)); @@ -342,7 +344,9 @@ VIRTUAL OP* newLISTOP _((I32 type, I32 flags, OP* first, OP* last)); VIRTUAL OP* newPMOP _((I32 type, I32 flags)); VIRTUAL OP* newPVOP _((I32 type, I32 flags, char* pv)); VIRTUAL SV* newRV _((SV* ref)); +#if !defined(__GNUC__) && (defined(CRIPPLED_CC) || defined(USE_THREADS)) VIRTUAL SV* newRV_noinc _((SV *)); +#endif #ifdef LEAKTEST VIRTUAL SV* newSV _((I32 x, STRLEN len)); #else diff --git a/win32/makefile.mk b/win32/makefile.mk index 245d904..a3a8064 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -27,6 +27,10 @@ CCTYPE *= BORLAND #CCTYPE *= GCC # +# uncomment next line if you want to use the perl object +#OBJECT *= -DPERL_OBJECT + +# # uncomment next line if you want debug version of perl (big,slow) #CFG *= Debug @@ -104,7 +108,7 @@ IMPLIB = implib -c RUNTIME = -D_RTLDLL INCLUDES = -I.\include -I. -I.. -I$(CCINCDIR) #PCHFLAGS = -H -H$(INTDIR)\bcmoduls.pch -DEFINES = -DWIN32 $(BUILDOPT) $(CRYPT_FLAG) +DEFINES = -DWIN32 $(BUILDOPT) $(CRYPT_FLAG) $(OBJECT) LOCDEFS = -DPERLDLL -DPERL_CORE SUBSYS = console LIBC = cw32mti.lib @@ -120,7 +124,11 @@ OPTIMIZE = -5 -O2 $(RUNTIME) LINK_DBG = .ENDIF +.IF "$(OBJECT)" == "-DPERL_OBJECT" +CFLAGS = -w -d -tWM -tWD -P $(INCLUDES) $(DEFINES) $(LOCDEFS) $(PCHFLAGS) $(OPTIMIZE) +.ELSE CFLAGS = -w -d -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) $(PCHFLAGS) $(OPTIMIZE) +.ENDIF LINK_FLAGS = $(LINK_DBG) -L$(CCLIBDIR) OBJOUT_FLAG = -o EXEOUT_FLAG = -e @@ -139,7 +147,7 @@ o = .o # RUNTIME = INCLUDES = -I.\include -I. -I.. -DEFINES = -DWIN32 $(BUILDOPT) $(CRYPT_FLAG) +DEFINES = -DWIN32 $(BUILDOPT) $(CRYPT_FLAG) $(OBJECT) LOCDEFS = -DPERLDLL -DPERL_CORE SUBSYS = console LIBC = -lcrtdll @@ -156,7 +164,11 @@ OPTIMIZE = -g -O2 $(RUNTIME) LINK_DBG = .ENDIF +.IF "$(OBJECT)" == "-DPERL_OBJECT" CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE) +.ELSE +CFLAGS = $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE) +.ENDIF LINK_FLAGS = $(LINK_DBG) -L$(CCLIBDIR) OBJOUT_FLAG = -o EXEOUT_FLAG = -o @@ -174,7 +186,7 @@ RUNTIME = -MD .ENDIF INCLUDES = -I.\include -I. -I.. #PCHFLAGS = -Fp$(INTDIR)\vcmoduls.pch -YX -DEFINES = -DWIN32 -D_CONSOLE $(BUILDOPT) $(CRYPT_FLAG) +DEFINES = -DWIN32 -D_CONSOLE $(BUILDOPT) $(CRYPT_FLAG) $(OBJECT) LOCDEFS = -DPERLDLL -DPERL_CORE SUBSYS = console @@ -208,7 +220,11 @@ LIBFILES = $(CRYPT_LIB) oldnames.lib kernel32.lib user32.lib gdi32.lib \ oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \ version.lib odbc32.lib odbccp32.lib +.IF "$(OBJECT)" == "-DPERL_OBJECT" +CFLAGS = -nologo -Gf -W3 -TP $(INCLUDES) $(DEFINES) $(LOCDEFS) $(PCHFLAGS) $(OPTIMIZE) +.ELSE CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) $(PCHFLAGS) $(OPTIMIZE) +.ENDIF LINK_FLAGS = -nologo $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE) OBJOUT_FLAG = -Fo EXEOUT_FLAG = -Fe