From: Jarkko Hietaniemi Date: Sun, 5 Nov 2000 21:28:39 +0000 (+0000) Subject: Fake __FUNCTION__ for non-gcc builds, cast madvise() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3b1896ceb2dda52e5763627c0441c8157a0e486e;p=p5sagit%2Fp5-mst-13.2.git Fake __FUNCTION__ for non-gcc builds, cast madvise() first argument correctly. p4raw-id: //depot/perl@7567 --- diff --git a/perlio.c b/perlio.c index 55c6ad3..f225f03 100644 --- a/perlio.c +++ b/perlio.c @@ -100,6 +100,9 @@ PerlIO_init(void) #undef printf void PerlIO_debug(char *fmt,...) __attribute__((format(printf,1,2))); +#ifndef __GNUC__ +#define __FUNCTION__ "PerlIO_debug" +#endif void PerlIO_debug(char *fmt,...) @@ -1827,7 +1830,7 @@ PerlIOMmap_map(PerlIO *f) if (b->buf && b->buf != (STDCHAR *) -1) { #if defined(HAS_MADVISE) && defined(MADV_SEQUENTIAL) - madvise(b->buf, len, MADV_SEQUENTIAL); + madvise((Mmap_t)b->buf, len, MADV_SEQUENTIAL); #endif PerlIOBase(f)->flags = flags | PERLIO_F_RDBUF; b->end = b->buf+len;