PP(pp_pipe_op)
{
- dSP;
#ifdef HAS_PIPE
+ dSP;
GV *rgv;
GV *wgv;
register IO *rstio;
PP(pp_umask)
{
+#ifdef HAS_UMASK
dSP; dTARGET;
Mode_t anum;
-#ifdef HAS_UMASK
if (MAXARG < 1) {
anum = PerlLIO_umask(0);
(void)PerlLIO_umask(anum);
PP(pp_sselect)
{
- dSP; dTARGET;
#ifdef HAS_SELECT
+ dSP; dTARGET;
register I32 i;
register I32 j;
register char *s;
PP(pp_flock)
{
+#ifdef FLOCK
dSP; dTARGET;
I32 value;
int argtype;
IO *io = NULL;
PerlIO *fp;
-#ifdef FLOCK
argtype = POPi;
if (MAXARG == 0)
gv = PL_last_in_gv;
PP(pp_socket)
{
- dSP;
#ifdef HAS_SOCKET
+ dSP;
GV *gv;
register IO *io;
int protocol = POPi;
PP(pp_bind)
{
- dSP;
#ifdef HAS_SOCKET
+ dSP;
#ifdef MPE /* Requires PRIV mode to bind() to ports < 1024 */
extern void GETPRIVMODE();
extern void GETUSERMODE();
PP(pp_connect)
{
- dSP;
#ifdef HAS_SOCKET
+ dSP;
SV *addrsv = POPs;
char *addr;
GV *gv = (GV*)POPs;
PP(pp_listen)
{
- dSP;
#ifdef HAS_SOCKET
+ dSP;
int backlog = POPi;
GV *gv = (GV*)POPs;
register IO *io = gv ? GvIOn(gv) : NULL;
PP(pp_accept)
{
- dSP; dTARGET;
#ifdef HAS_SOCKET
+ dSP; dTARGET;
GV *ngv;
GV *ggv;
register IO *nstio;
PP(pp_shutdown)
{
- dSP; dTARGET;
#ifdef HAS_SOCKET
+ dSP; dTARGET;
int how = POPi;
GV *gv = (GV*)POPs;
register IO *io = GvIOn(gv);
PP(pp_ssockopt)
{
- dSP;
#ifdef HAS_SOCKET
+ dSP;
int optype = PL_op->op_type;
SV *sv;
int fd;
PP(pp_getpeername)
{
- dSP;
#ifdef HAS_SOCKET
+ dSP;
int optype = PL_op->op_type;
SV *sv;
int fd;
PP(pp_ftrread)
{
- I32 result;
dSP;
+ I32 result;
#if defined(HAS_ACCESS) && defined(R_OK)
STRLEN n_a;
if ((PL_hints & HINT_FILETEST_ACCESS) && SvPOK(TOPs)) {
PP(pp_ftrwrite)
{
- I32 result;
dSP;
+ I32 result;
#if defined(HAS_ACCESS) && defined(W_OK)
STRLEN n_a;
if ((PL_hints & HINT_FILETEST_ACCESS) && SvPOK(TOPs)) {
PP(pp_ftrexec)
{
- I32 result;
dSP;
+ I32 result;
#if defined(HAS_ACCESS) && defined(X_OK)
STRLEN n_a;
if ((PL_hints & HINT_FILETEST_ACCESS) && SvPOK(TOPs)) {
PP(pp_fteread)
{
- I32 result;
dSP;
+ I32 result;
#ifdef PERL_EFF_ACCESS_R_OK
STRLEN n_a;
if ((PL_hints & HINT_FILETEST_ACCESS) && SvPOK(TOPs)) {
PP(pp_ftewrite)
{
- I32 result;
dSP;
+ I32 result;
#ifdef PERL_EFF_ACCESS_W_OK
STRLEN n_a;
if ((PL_hints & HINT_FILETEST_ACCESS) && SvPOK(TOPs)) {
PP(pp_fteexec)
{
- I32 result;
dSP;
+ I32 result;
#ifdef PERL_EFF_ACCESS_X_OK
STRLEN n_a;
if ((PL_hints & HINT_FILETEST_ACCESS) && SvPOK(TOPs)) {
PP(pp_ftis)
{
- I32 result = my_stat();
dSP;
+ I32 result = my_stat();
if (result < 0)
RETPUSHUNDEF;
RETPUSHYES;
PP(pp_ftrowned)
{
- I32 result = my_stat();
dSP;
+ I32 result = my_stat();
if (result < 0)
RETPUSHUNDEF;
if (PL_statcache.st_uid == (PL_op->op_type == OP_FTEOWNED ?
PP(pp_ftzero)
{
- I32 result = my_stat();
dSP;
+ I32 result = my_stat();
if (result < 0)
RETPUSHUNDEF;
if (PL_statcache.st_size == 0)
PP(pp_ftsize)
{
- I32 result = my_stat();
dSP; dTARGET;
+ I32 result = my_stat();
if (result < 0)
RETPUSHUNDEF;
#if Off_t_size > IVSIZE
PP(pp_ftmtime)
{
- I32 result = my_stat();
dSP; dTARGET;
+ I32 result = my_stat();
if (result < 0)
RETPUSHUNDEF;
PUSHn( (PL_basetime - PL_statcache.st_mtime) / 86400.0 );
PP(pp_ftatime)
{
- I32 result = my_stat();
dSP; dTARGET;
+ I32 result = my_stat();
if (result < 0)
RETPUSHUNDEF;
PUSHn( (PL_basetime - PL_statcache.st_atime) / 86400.0 );
PP(pp_ftctime)
{
- I32 result = my_stat();
dSP; dTARGET;
+ I32 result = my_stat();
if (result < 0)
RETPUSHUNDEF;
PUSHn( (PL_basetime - PL_statcache.st_ctime) / 86400.0 );
PP(pp_ftsock)
{
- I32 result = my_stat();
dSP;
+ I32 result = my_stat();
if (result < 0)
RETPUSHUNDEF;
if (S_ISSOCK(PL_statcache.st_mode))
PP(pp_ftchr)
{
- I32 result = my_stat();
dSP;
+ I32 result = my_stat();
if (result < 0)
RETPUSHUNDEF;
if (S_ISCHR(PL_statcache.st_mode))
PP(pp_ftblk)
{
- I32 result = my_stat();
dSP;
+ I32 result = my_stat();
if (result < 0)
RETPUSHUNDEF;
if (S_ISBLK(PL_statcache.st_mode))
PP(pp_ftfile)
{
- I32 result = my_stat();
dSP;
+ I32 result = my_stat();
if (result < 0)
RETPUSHUNDEF;
if (S_ISREG(PL_statcache.st_mode))
PP(pp_ftdir)
{
- I32 result = my_stat();
dSP;
+ I32 result = my_stat();
if (result < 0)
RETPUSHUNDEF;
if (S_ISDIR(PL_statcache.st_mode))
PP(pp_ftpipe)
{
- I32 result = my_stat();
dSP;
+ I32 result = my_stat();
if (result < 0)
RETPUSHUNDEF;
if (S_ISFIFO(PL_statcache.st_mode))
PP(pp_ftlink)
{
- I32 result = my_lstat();
dSP;
+ I32 result = my_lstat();
if (result < 0)
RETPUSHUNDEF;
if (S_ISLNK(PL_statcache.st_mode))
PP(pp_link)
{
- dSP;
#ifdef HAS_LINK
- dTARGET;
+ dSP; dTARGET;
STRLEN n_a;
char *tmps2 = POPpx;
char *tmps = SvPV(TOPs, n_a);
PP(pp_symlink)
{
#ifdef HAS_SYMLINK
- dSP;
- dTARGET;
+ dSP; dTARGET;
STRLEN n_a;
char *tmps2 = POPpx;
char *tmps = SvPV(TOPs, n_a);
PP(pp_open_dir)
{
- dSP;
#if defined(Direntry_t) && defined(HAS_READDIR)
+ dSP;
STRLEN n_a;
char *dirname = POPpx;
GV *gv = (GV*)POPs;
PP(pp_readdir)
{
- dSP;
#if defined(Direntry_t) && defined(HAS_READDIR)
+ dSP;
#if !defined(I_DIRENT) && !defined(VMS)
Direntry_t *readdir (DIR *);
#endif
PP(pp_telldir)
{
- dSP; dTARGET;
#if defined(HAS_TELLDIR) || defined(telldir)
+ dSP; dTARGET;
/* XXX does _anyone_ need this? --AD 2/20/1998 */
/* XXX netbsd still seemed to.
XXX HAS_TELLDIR_PROTO is new style, NEED_TELLDIR_PROTO is old style.
PP(pp_seekdir)
{
- dSP;
#if defined(HAS_SEEKDIR) || defined(seekdir)
+ dSP;
long along = POPl;
GV *gv = (GV*)POPs;
register IO *io = GvIOn(gv);
PP(pp_rewinddir)
{
- dSP;
#if defined(HAS_REWINDDIR) || defined(rewinddir)
+ dSP;
GV *gv = (GV*)POPs;
register IO *io = GvIOn(gv);
PP(pp_closedir)
{
- dSP;
#if defined(Direntry_t) && defined(HAS_READDIR)
+ dSP;
GV *gv = (GV*)POPs;
register IO *io = GvIOn(gv);
PP(pp_kill)
{
+#ifdef HAS_KILL
dSP; dMARK; dTARGET;
I32 value;
-#ifdef HAS_KILL
value = (I32)apply(PL_op->op_type, MARK, SP);
SP = MARK;
PUSHi(value);
PP(pp_getpriority)
{
- dSP; dTARGET;
#ifdef HAS_GETPRIORITY
+ dSP; dTARGET;
int who = POPi;
int which = TOPi;
SETi( getpriority(which, who) );
PP(pp_setpriority)
{
- dSP; dTARGET;
#ifdef HAS_SETPRIORITY
+ dSP; dTARGET;
int niceval = POPi;
int who = POPi;
int which = TOPi;
PP(pp_tms)
{
+#ifdef HAS_TIMES
dSP;
-
-#ifndef HAS_TIMES
- DIE(aTHX_ "times not implemented");
-#else
EXTEND(SP, 4);
-
#ifndef VMS
(void)PerlProc_times(&PL_timesbuf);
#else
PUSHs(sv_2mortal(newSVnv(((NV)PL_timesbuf.tms_cstime)/HZ)));
}
RETURN;
+#else
+ DIE(aTHX_ "times not implemented");
#endif /* HAS_TIMES */
}
PP(pp_alarm)
{
+#ifdef HAS_ALARM
dSP; dTARGET;
int anum;
-#ifdef HAS_ALARM
anum = POPi;
anum = alarm((unsigned int)anum);
EXTEND(SP, 1);
PP(pp_ghostent)
{
- dSP;
#if defined(HAS_GETHOSTBYNAME) || defined(HAS_GETHOSTBYADDR) || defined(HAS_GETHOSTENT)
+ dSP;
I32 which = PL_op->op_type;
register char **elem;
register SV *sv;
PP(pp_gnetent)
{
- dSP;
#if defined(HAS_GETNETBYNAME) || defined(HAS_GETNETBYADDR) || defined(HAS_GETNETENT)
+ dSP;
I32 which = PL_op->op_type;
register char **elem;
register SV *sv;
PP(pp_gprotoent)
{
- dSP;
#if defined(HAS_GETPROTOBYNAME) || defined(HAS_GETPROTOBYNUMBER) || defined(HAS_GETPROTOENT)
+ dSP;
I32 which = PL_op->op_type;
register char **elem;
register SV *sv;
PP(pp_gservent)
{
- dSP;
#if defined(HAS_GETSERVBYNAME) || defined(HAS_GETSERVBYPORT) || defined(HAS_GETSERVENT)
+ dSP;
I32 which = PL_op->op_type;
register char **elem;
register SV *sv;
PP(pp_shostent)
{
- dSP;
#ifdef HAS_SETHOSTENT
+ dSP;
PerlSock_sethostent(TOPi);
RETSETYES;
#else
PP(pp_snetent)
{
- dSP;
#ifdef HAS_SETNETENT
+ dSP;
PerlSock_setnetent(TOPi);
RETSETYES;
#else
PP(pp_sprotoent)
{
- dSP;
#ifdef HAS_SETPROTOENT
+ dSP;
PerlSock_setprotoent(TOPi);
RETSETYES;
#else
PP(pp_sservent)
{
- dSP;
#ifdef HAS_SETSERVENT
+ dSP;
PerlSock_setservent(TOPi);
RETSETYES;
#else
PP(pp_ehostent)
{
- dSP;
#ifdef HAS_ENDHOSTENT
+ dSP;
PerlSock_endhostent();
EXTEND(SP,1);
RETPUSHYES;
PP(pp_enetent)
{
- dSP;
#ifdef HAS_ENDNETENT
+ dSP;
PerlSock_endnetent();
EXTEND(SP,1);
RETPUSHYES;
PP(pp_eprotoent)
{
- dSP;
#ifdef HAS_ENDPROTOENT
+ dSP;
PerlSock_endprotoent();
EXTEND(SP,1);
RETPUSHYES;
PP(pp_eservent)
{
- dSP;
#ifdef HAS_ENDSERVENT
+ dSP;
PerlSock_endservent();
EXTEND(SP,1);
RETPUSHYES;
PP(pp_gpwent)
{
- dSP;
#ifdef HAS_PASSWD
+ dSP;
I32 which = PL_op->op_type;
register SV *sv;
STRLEN n_a;
PP(pp_spwent)
{
- dSP;
#if defined(HAS_PASSWD) && defined(HAS_SETPWENT)
+ dSP;
setpwent();
RETPUSHYES;
#else
PP(pp_epwent)
{
- dSP;
#if defined(HAS_PASSWD) && defined(HAS_ENDPWENT)
+ dSP;
endpwent();
RETPUSHYES;
#else
PP(pp_ggrent)
{
- dSP;
#ifdef HAS_GROUP
+ dSP;
I32 which = PL_op->op_type;
register char **elem;
register SV *sv;
PP(pp_sgrent)
{
- dSP;
#if defined(HAS_GROUP) && defined(HAS_SETGRENT)
+ dSP;
setgrent();
RETPUSHYES;
#else
PP(pp_egrent)
{
- dSP;
#if defined(HAS_GROUP) && defined(HAS_ENDGRENT)
+ dSP;
endgrent();
RETPUSHYES;
#else
PP(pp_getlogin)
{
- dSP; dTARGET;
#ifdef HAS_GETLOGIN
+ dSP; dTARGET;
char *tmps;
EXTEND(SP, 1);
if (!(tmps = PerlProc_getlogin()))