summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-03-24 17:56:01 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-24 17:56:01 +0000
commit077a72a91697decae2d5c3d613a9ee58ec6493c1 (patch)
treeba3848bbdcd79e28f9d49cd3454a8c9b60de469c
parentc56d2bdc900abaaba8c139bba8d2d7ffb126d054 (diff)
downloadperl-077a72a91697decae2d5c3d613a9ee58ec6493c1.tar.gz
microperl tweaks.
p4raw-id: //depot/perl@15470
-rw-r--r--Makefile.micro8
-rw-r--r--locale.c2
-rw-r--r--util.c8
3 files changed, 11 insertions, 7 deletions
diff --git a/Makefile.micro b/Makefile.micro
index 11f2cc2fda..ae9f48b90a 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 2c84ab5cb2..db9edb74d5 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 e79dc32f09..7843507f50 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;