#include "EXTERN.h"
#include "perl.h"
-/* XXX Omit this -- it causes too much grief on mixed systems.
- Next time, I should force broken systems to unset i_unistd in
- hint files.
-*/
-#if 0
-# ifdef I_UNISTD
-# include <unistd.h>
-# endif
+/* XXX If this causes problems, set i_unistd=undef in the hint file. */
+#ifdef I_UNISTD
+# include <unistd.h>
+#endif
+
+#ifdef I_SYS_WAIT
+# include <sys/wait.h>
+#endif
+
+#ifdef I_SYS_RESOURCE
+# include <sys/resource.h>
#endif
/* Put this after #includes because fork and vfork prototypes may
#ifdef HAS_SELECT
#ifdef I_SYS_SELECT
-#ifndef I_SYS_TIME
#include <sys/select.h>
#endif
#endif
-#endif
#ifdef HOST_NOT_FOUND
extern int h_errno;
else {
GV **gvp = (GV**)hv_fetch(hv, GvNAME(egv), GvNAMELEN(egv), FALSE);
if (gvp && *gvp == egv)
- gv_efullname(TARG, defoutgv);
+ gv_efullname(TARG, defoutgv, Nullch);
else
sv_setsv(TARG, sv_2mortal(newRV((SV*)egv)));
XPUSHTARG;
if (!cv) {
if (fgv) {
SV *tmpsv = sv_newmortal();
- gv_efullname(tmpsv, gv);
+ gv_efullname(tmpsv, fgv, Nullch);
DIE("Undefined format \"%s\" called",SvPVX(tmpsv));
}
DIE("Not a format reference");
cv = GvFORM(fgv);
if (!cv) {
SV *tmpsv = sv_newmortal();
- gv_efullname(tmpsv, fgv);
+ gv_efullname(tmpsv, fgv, Nullch);
DIE("Undefined top format \"%s\" called",SvPVX(tmpsv));
}
return doform(cv,gv,op);
gv = defoutgv;
if (!(io = GvIO(gv))) {
if (dowarn) {
- gv_fullname(sv,gv);
+ gv_fullname(sv, gv, Nullch);
warn("Filehandle %s never opened", SvPV(sv,na));
}
SETERRNO(EBADF,RMS$_IFI);
}
else if (!(fp = IoOFP(io))) {
if (dowarn) {
- gv_fullname(sv,gv);
+ gv_fullname(sv, gv, Nullch);
if (IoIFP(io))
warn("Filehandle %s opened only for input", SvPV(sv,na));
else
(void)time(&lasttime);
if (MAXARG < 1)
- pause();
+ Pause();
else {
duration = POPi;
sleep((unsigned int)duration);
locking module.
*/
-/* We might need <unistd.h> because it sometimes defines the lockf()
- constants. Unfortunately, <unistd.h> causes troubles on some mixed
- (BSD/POSIX) systems, such as SunOS 4.1.3. We could just try including
- <unistd.h> here in this part of the file, but that might
- conflict with various other #defines and includes above, such as
- #define vfork fork above.
+/* The lockf() constants might have been defined in <unistd.h>.
+ Unfortunately, <unistd.h> causes troubles on some mixed
+ (BSD/POSIX) systems, such as SunOS 4.1.3.
Further, the lockf() constants aren't POSIX, so they might not be
visible if we're compiling with _POSIX_SOURCE defined. Thus, we'll