From: Jarkko Hietaniemi Date: Sun, 24 Mar 2002 17:56:01 +0000 (+0000) Subject: microperl tweaks. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=077a72a91697decae2d5c3d613a9ee58ec6493c1;p=p5sagit%2Fp5-mst-13.2.git microperl tweaks. p4raw-id: //depot/perl@15470 --- diff --git a/Makefile.micro b/Makefile.micro index 11f2cc2..ae9f48b 100644 --- a/Makefile.micro +++ b/Makefile.micro @@ -1,4 +1,3 @@ -CC = cc LD = $(CC) DEFINES = -DPERL_CORE -DPERL_MICRO OPTIMIZE = @@ -10,7 +9,7 @@ all: microperl O = uav$(_O) udeb$(_O) udoio$(_O) udoop$(_O) udump$(_O) \ uglobals$(_O) ugv$(_O) uhv$(_O) \ - umg$(_O) uperlmain$(_O) uop$(_O) \ + umg$(_O) uperlmain$(_O) uop$(_O) ureentr$(_O) \ uperl$(_O) uperlio$(_O) uperly$(_O) upp$(_O) \ upp_ctl$(_O) upp_hot$(_O) upp_sys$(_O) upp_pack$(_O) upp_sort$(_O) \ uregcomp$(_O) uregexec$(_O) urun$(_O) \ @@ -23,7 +22,7 @@ microperl: $(O) H = av.h uconfig.h cop.h cv.h embed.h embedvar.h form.h gv.h handy.h \ hv.h intrpvar.h iperlsys.h mg.h op.h opcode.h opnames.h patchlevel.h \ - perl.h perlsdio.h perlvars.h perly.h pp.h pp_proto.h proto.h \ + perl.h perlsdio.h perlvars.h perly.h pp.h pp_proto.h proto.h reentr.h \ regexp.h scope.h sv.h thrdvar.h thread.h unixish.h utf8.h util.h \ warnings.h @@ -71,6 +70,9 @@ uperlmain$(_O): $(HE) miniperlmain.c uop$(_O): $(HE) op.c keywords.h $(CC) -c -o $@ $(CFLAGS) op.c +ureentr$(_O): $(HE) reentr.c + $(CC) -c -o $@ $(CFLAGS) reentr.c + uperl$(_O): $(HE) perl.c $(CC) -c -o $@ $(CFLAGS) perl.c diff --git a/locale.c b/locale.c index 2c84ab5..db9edb7 100644 --- a/locale.c +++ b/locale.c @@ -481,6 +481,7 @@ Perl_init_i18nl10n(pTHX_ int printwarn) (ibcmp(codeset, "UTF-8", 5) == 0 || ibcmp(codeset, "UTF8", 4) == 0)) wantutf8 = TRUE; +#if defined(USE_LOCALE) #ifdef __GLIBC__ if (!wantutf8 && language && (ibcmp(language, "UTF-8", 5) == 0 || @@ -501,6 +502,7 @@ Perl_init_i18nl10n(pTHX_ int printwarn) (ibcmp(lang, "UTF-8", 5) == 0 || ibcmp(lang, "UTF8", 4) == 0)) wantutf8 = TRUE; +#endif /* USE_LOCALE */ if (wantutf8) PL_wantutf8 = TRUE; } diff --git a/util.c b/util.c index e79dc32..7843507 100644 --- a/util.c +++ b/util.c @@ -339,19 +339,19 @@ S_xstat(pTHX_ int flag) Malloc_t Perl_malloc (MEM_SIZE nbytes) { dTHXs; - return PerlMem_malloc(nbytes); + return (Malloc_t)PerlMem_malloc(nbytes); } Malloc_t Perl_calloc (MEM_SIZE elements, MEM_SIZE size) { dTHXs; - return PerlMem_calloc(elements, size); + return (Malloc_t)PerlMem_calloc(elements, size); } Malloc_t Perl_realloc (Malloc_t where, MEM_SIZE nbytes) { dTHXs; - return PerlMem_realloc(where, nbytes); + return (Malloc_t)PerlMem_realloc(where, nbytes); } Free_t Perl_mfree (Malloc_t where) @@ -941,7 +941,7 @@ Perl_savesharedpv(pTHX_ const char *sv) { register char *newaddr = Nullch; if (sv) { - newaddr = PerlMemShared_malloc(strlen(sv)+1); + newaddr = (char*)PerlMemShared_malloc(strlen(sv)+1); (void)strcpy(newaddr,sv); } return newaddr;