From: Jarkko Hietaniemi Date: Wed, 4 Apr 2001 04:03:57 +0000 (+0000) Subject: Integrate changes #9538,9539 from maintperl into mainline. X-Git-Tag: accepted/trunk/20130322.191538~32439 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4c901d042e1d6bd9046b03cfbf665c2899614c5c;p=platform%2Fupstream%2Fperl.git Integrate changes #9538,9539 from maintperl into mainline. fflush() is a macro on SunOS 4.1.x, so provide a wrapper for use with _fwalk() (fix for change#7705) another tweak needed for SunOS 4.1.x build (from Mike Guy) (cp -f is not portable) p4raw-link: @9539 on //depot/maint-5.6/perl: 3da0943717409aa5209a9776746cc2cfeb50eb29 p4raw-link: @9538 on //depot/maint-5.6/perl: 741daf9fefb369fa97f8467fc06d60a8832dcdee p4raw-link: @7705 on //depot/perl: 74cac757131a44f884c4728708d3a2e5d87b32d3 p4raw-id: //depot/perl@9540 p4raw-integrated: from //depot/maint-5.6/perl@9536 'merge in' util.c (@9288..) Makefile.SH (@9312..) --- diff --git a/Makefile.SH b/Makefile.SH index 3c6e8e3..660515a 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -158,7 +158,8 @@ CLDFLAGS = $ldflags mallocsrc = $mallocsrc mallocobj = $mallocobj LNS = $lns -CPS = $cp -f +# NOTE: some systems don't grok "cp -f". XXX Configure test needed? +CPS = $cp RMS = rm -f ranlib = $ranlib diff --git a/util.c b/util.c index c5a3af3..7e3934e 100644 --- a/util.c +++ b/util.c @@ -3958,6 +3958,16 @@ Perl_get_vtbl(pTHX_ int vtbl_id) return result; } +#if !defined(FFLUSH_NULL) && defined(HAS__FWALK) +static int S_fflush(FILE *fp); + +static int +S_fflush(FILE *fp) +{ + return fflush(fp); +} +#endif + I32 Perl_my_fflush_all(pTHX) { @@ -3967,7 +3977,7 @@ Perl_my_fflush_all(pTHX) # if defined(HAS__FWALK) /* undocumented, unprototyped, but very useful BSDism */ extern void _fwalk(int (*)(FILE *)); - _fwalk(&fflush); + _fwalk(&S_fflush); return 0; # else long open_max = -1;