summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1999-08-10 14:35:30 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-08-10 14:35:30 +0000
commitd8a83dd3ecf2b61bda27d39770e9942db2eb1719 (patch)
treefb43925d6d50f3b634eb91ca2d272d6fa9b5df22
parent7f4774ae47f6628888c2da9409229189fba57844 (diff)
downloadperl-d8a83dd3ecf2b61bda27d39770e9942db2eb1719.tar.gz
Use Pid_t.
p4raw-id: //depot/cfgperl@3950
-rw-r--r--doio.c2
-rwxr-xr-xembed.pl4
-rwxr-xr-xperlapi.c4
-rw-r--r--pp_sys.c6
-rw-r--r--proto.h4
-rw-r--r--util.c14
6 files changed, 17 insertions, 17 deletions
diff --git a/doio.c b/doio.c
index 838d67f0ef..cc347331a2 100644
--- a/doio.c
+++ b/doio.c
@@ -413,7 +413,7 @@ Perl_do_open9(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
}
}
if (fd != PerlIO_fileno(fp)) {
- int pid;
+ Pid_t pid;
SV *sv;
PerlLIO_dup2(PerlIO_fileno(fp), fd);
diff --git a/embed.pl b/embed.pl
index cd3b578da7..6f22017eca 100755
--- a/embed.pl
+++ b/embed.pl
@@ -1496,7 +1496,7 @@ p |void |set_numeric_local
p |void |set_numeric_radix
p |void |set_numeric_standard
p |void |require_pv |const char* pv
-p |void |pidgone |int pid|int status
+p |void |pidgone |Pid_t pid|int status
p |void |pmflag |U16* pmfl|int ch
p |OP* |pmruntime |OP* pm|OP* expr|OP* repl
p |OP* |pmtrans |OP* o|OP* expr|OP* repl
@@ -1702,7 +1702,7 @@ p |UV |utf8_to_uv |U8 *s|I32* retlen
p |U8* |uv_to_utf8 |U8 *d|UV uv
p |void |vivify_defelem |SV* sv
p |void |vivify_ref |SV* sv|U32 to_what
-p |I32 |wait4pid |int pid|int* statusp|int flags
+p |I32 |wait4pid |Pid_t pid|int* statusp|int flags
p |void |warn |const char* pat|...
p |void |vwarn |const char* pat|va_list* args
p |void |warner |U32 err|const char* pat|...
diff --git a/perlapi.c b/perlapi.c
index 05681a5747..48898da0dd 100755
--- a/perlapi.c
+++ b/perlapi.c
@@ -3008,7 +3008,7 @@ Perl_require_pv(pTHXo_ const char* pv)
#undef Perl_pidgone
void
-Perl_pidgone(pTHXo_ int pid, int status)
+Perl_pidgone(pTHXo_ Pid_t pid, int status)
{
((CPerlObj*)pPerl)->Perl_pidgone(pid, status);
}
@@ -4285,7 +4285,7 @@ Perl_vivify_ref(pTHXo_ SV* sv, U32 to_what)
#undef Perl_wait4pid
I32
-Perl_wait4pid(pTHXo_ int pid, int* statusp, int flags)
+Perl_wait4pid(pTHXo_ Pid_t pid, int* statusp, int flags)
{
return ((CPerlObj*)pPerl)->Perl_wait4pid(pid, statusp, flags);
}
diff --git a/pp_sys.c b/pp_sys.c
index f469ed0023..300b45319c 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3764,7 +3764,7 @@ PP(pp_getpgrp)
{
#ifdef HAS_GETPGRP
djSP; dTARGET;
- int pid;
+ Pid_t pid;
I32 value;
if (MAXARG < 1)
@@ -3789,8 +3789,8 @@ PP(pp_setpgrp)
{
#ifdef HAS_SETPGRP
djSP; dTARGET;
- int pgrp;
- int pid;
+ Pid_t pgrp;
+ Pid_t pid;
if (MAXARG < 2) {
pgrp = 0;
pid = 0;
diff --git a/proto.h b/proto.h
index e10ef7e396..b7fed35870 100644
--- a/proto.h
+++ b/proto.h
@@ -465,7 +465,7 @@ VIRTUAL void Perl_set_numeric_local(pTHX);
VIRTUAL void Perl_set_numeric_radix(pTHX);
VIRTUAL void Perl_set_numeric_standard(pTHX);
VIRTUAL void Perl_require_pv(pTHX_ const char* pv);
-VIRTUAL void Perl_pidgone(pTHX_ int pid, int status);
+VIRTUAL void Perl_pidgone(pTHX_ Pid_t pid, int status);
VIRTUAL void Perl_pmflag(pTHX_ U16* pmfl, int ch);
VIRTUAL OP* Perl_pmruntime(pTHX_ OP* pm, OP* expr, OP* repl);
VIRTUAL OP* Perl_pmtrans(pTHX_ OP* o, OP* expr, OP* repl);
@@ -655,7 +655,7 @@ VIRTUAL UV Perl_utf8_to_uv(pTHX_ U8 *s, I32* retlen);
VIRTUAL U8* Perl_uv_to_utf8(pTHX_ U8 *d, UV uv);
VIRTUAL void Perl_vivify_defelem(pTHX_ SV* sv);
VIRTUAL void Perl_vivify_ref(pTHX_ SV* sv, U32 to_what);
-VIRTUAL I32 Perl_wait4pid(pTHX_ int pid, int* statusp, int flags);
+VIRTUAL I32 Perl_wait4pid(pTHX_ Pid_t pid, int* statusp, int flags);
VIRTUAL void Perl_warn(pTHX_ const char* pat, ...);
VIRTUAL void Perl_vwarn(pTHX_ const char* pat, va_list* args);
VIRTUAL void Perl_warner(pTHX_ U32 err, const char* pat, ...);
diff --git a/util.c b/util.c
index c84510e715..2c349e25b0 100644
--- a/util.c
+++ b/util.c
@@ -2218,7 +2218,7 @@ Perl_my_popen(pTHX_ char *cmd, char *mode)
{
int p[2];
register I32 This, that;
- register I32 pid;
+ register Pid_t pid;
SV *sv;
I32 doexec = strNE(cmd,"-");
I32 did_pipes = 0;
@@ -2289,7 +2289,7 @@ Perl_my_popen(pTHX_ char *cmd, char *mode)
#endif /* defined OS2 */
/*SUPPRESS 560*/
if (tmpgv = gv_fetchpv("$",TRUE, SVt_PV))
- sv_setiv(GvSV(tmpgv), (IV)getpid());
+ sv_setiv(GvSV(tmpgv), getpid());
PL_forkprocess = 0;
hv_clear(PL_pidstatus); /* we have no children */
return Nullfp;
@@ -2511,8 +2511,8 @@ Perl_my_pclose(pTHX_ PerlIO *ptr)
Sigsave_t hstat, istat, qstat;
int status;
SV **svp;
- int pid;
- int pid2;
+ Pid_t pid;
+ Pid_t pid2;
bool close_failed;
int saved_errno;
#ifdef VMS
@@ -2523,7 +2523,7 @@ Perl_my_pclose(pTHX_ PerlIO *ptr)
#endif
svp = av_fetch(PL_fdpid,PerlIO_fileno(ptr),TRUE);
- pid = (int)SvIVX(*svp);
+ pid = SvIVX(*svp);
SvREFCNT_dec(*svp);
*svp = &PL_sv_undef;
#ifdef OS2
@@ -2562,7 +2562,7 @@ Perl_my_pclose(pTHX_ PerlIO *ptr)
#if !defined(DOSISH) || defined(OS2) || defined(WIN32)
I32
-Perl_wait4pid(pTHX_ int pid, int *statusp, int flags)
+Perl_wait4pid(pTHX_ Pid_t pid, int *statusp, int flags)
{
SV *sv;
SV** svp;
@@ -2622,7 +2622,7 @@ Perl_wait4pid(pTHX_ int pid, int *statusp, int flags)
void
/*SUPPRESS 590*/
-Perl_pidgone(pTHX_ int pid, int status)
+Perl_pidgone(pTHX_ Pid_t pid, int status)
{
register SV *sv;
char spid[TYPE_CHARS(int)];