diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 1999-11-04 08:01:25 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-11-04 08:01:25 +0000 |
commit | da9274502cf796d52a9875e4c9f650b53901ad73 (patch) | |
tree | 3442de4a9a0984276b991918756667489a50ea08 /util.c | |
parent | 88dc0f0d4b3e8ced559c2ad1971419074a49337b (diff) | |
download | perl-da9274502cf796d52a9875e4c9f650b53901ad73.tar.gz |
Incremental Mac integration from Matthias.
p4raw-id: //depot/cfgperl@4512
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 34 |
1 files changed, 3 insertions, 31 deletions
@@ -78,11 +78,6 @@ long lastxycount[MAXXCOUNT][MAXYCOUNT]; * XXX This advice seems to be widely ignored :-( --AD August 1996. */ -#ifdef MACOS_TRADITIONAL -extern void * gSacrificialGoat; -#define MAC_CHECK_GOAT(p) if (!gSacrificialGoat && p) { PerlMem_free(p); p = NULL; } else -#endif - Malloc_t Perl_safesysmalloc(MEM_SIZE size) { @@ -100,9 +95,7 @@ Perl_safesysmalloc(MEM_SIZE size) Perl_croak_nocontext("panic: malloc"); #endif ptr = PerlMem_malloc(size?size:1); /* malloc(0) is NASTY on our system */ -#ifdef MACOS_TRADITIONAL - MAC_CHECK_GOAT(ptr); -#endif + PERL_ALLOC_CHECK(ptr); DEBUG_m(PerlIO_printf(Perl_debug_log, "0x%"UVxf": (%05d) malloc %ld bytes\n",PTR2UV(ptr),PL_an++,(long)size)); if (ptr != Nullch) return ptr; @@ -146,10 +139,7 @@ Perl_safesysrealloc(Malloc_t where,MEM_SIZE size) Perl_croak_nocontext("panic: realloc"); #endif ptr = PerlMem_realloc(where,size); - -#ifdef MACOS_TRADITIONAL - MAC_CHECK_GOAT(ptr); -#endif + PERL_ALLOC_CHECK(ptr); DEBUG_m(PerlIO_printf(Perl_debug_log, "0x%"UVxf": (%05d) rfree\n",PTR2UV(where),PL_an++)); DEBUG_m(PerlIO_printf(Perl_debug_log, "0x%"UVxf": (%05d) realloc %ld bytes\n",PTR2UV(ptr),PL_an++,(long)size)); @@ -200,9 +190,7 @@ Perl_safesyscalloc(MEM_SIZE count, MEM_SIZE size) #endif size *= count; ptr = PerlMem_malloc(size?size:1); /* malloc(0) is NASTY on our system */ -#ifdef MACOS_TRADITIONAL - MAC_CHECK_GOAT(ptr); -#endif + PERL_ALLOC_CHECK(ptr); DEBUG_m(PerlIO_printf(Perl_debug_log, "0x%"UVxf": (%05d) calloc %ld x %ld bytes\n",PTR2UV(ptr),PL_an++,(long)count,(long)size)); if (ptr != Nullch) { memset((void*)ptr, 0, size); @@ -1428,14 +1416,7 @@ Perl_vmess(pTHX_ const char *pat, va_list *args) SV *sv = mess_alloc(); static char dgd[] = " during global destruction.\n"; -#ifdef MACOS_TRADITIONAL - sv_setpv(sv, "# "); - sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); - if (SvPVX(sv)[2] == '#') - sv_insert(sv, 0, 2, "", 0); -#else sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); -#endif if (!SvCUR(sv) || *(SvEND(sv) - 1) != '\n') { dTHR; if (PL_curcop->cop_line) @@ -1454,12 +1435,6 @@ Perl_vmess(pTHX_ const char *pat, va_list *args) Perl_sv_catpvf(aTHX_ sv, " thread %ld", thr->tid); #endif sv_catpv(sv, PL_dirty ? dgd : ".\n"); -#ifdef MACOS_TRADITIONAL - if (PL_curcop->cop_line) { - MPWPosIndication(sv, SvPVX(GvSV(PL_curcop->cop_filegv)), PL_curcop->cop_line); - sv_catpv(sv, "\n"); - } -#endif } return sv; } @@ -1629,9 +1604,6 @@ Perl_vcroak(pTHX_ const char* pat, va_list *args) errno = e; #endif } -#ifdef MACOS_TRADITIONAL - MacPosCommit(); -#endif my_failure_exit(); } |