From: Doug MacEachern Date: Wed, 19 Mar 1997 23:45:53 +0000 (-0500) Subject: Warn about missing -DMULTIPLICITY if likely a problem X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=71aeea1753924e6e19c2461e241e3f7d8a570e90;p=p5sagit%2Fp5-mst-13.2.git Warn about missing -DMULTIPLICITY if likely a problem Subject: Re: multiple embedded interpreter example in perlembed.pod fails Ken Fox wrote: > I wrote: > > > Multiple embedded interpreters don't work. Here's a transcript: > ... > > ccflags ='' > > Ugh. Stupid user error. I ran Configure with -DMULTIPLICITY instead > of -Dccflags='-DMULTIPLICITY'. Sorry for the confusion. you can also 'make LIBPERL=libperlm.a', libperld, libperldm, etc., or edit cflags by hand after Configure. > Could the > runtime error message be improved to let people know when they've made > this mistake? good idea, something like the patch below? I'm not sure of other cases where e_fp would be bogus. p5p-msgid: 199703192345.SAA15070@postman.osf.org --- diff --git a/perl.c b/perl.c index 06534ff..b3ce9b4 100644 --- a/perl.c +++ b/perl.c @@ -685,8 +685,12 @@ setuid perl scripts securely.\n"); if (!scriptname) scriptname = argv[0]; if (e_fp) { - if (PerlIO_flush(e_fp) || PerlIO_error(e_fp) || PerlIO_close(e_fp)) + if (PerlIO_flush(e_fp) || PerlIO_error(e_fp) || PerlIO_close(e_fp)) { +#ifndef MULTIPLICITY + warn("Did you forget to compile with -DMULTIPLICITY?"); +#endif croak("Can't write to temp file for -e: %s", Strerror(errno)); + } e_fp = Nullfp; argc++,argv--; scriptname = e_tmpname;