From: Jarkko Hietaniemi Date: Tue, 10 Aug 1999 14:35:30 +0000 (+0000) Subject: Use Pid_t. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d8a83dd3ecf2b61bda27d39770e9942db2eb1719;p=p5sagit%2Fp5-mst-13.2.git Use Pid_t. p4raw-id: //depot/cfgperl@3950 --- diff --git a/doio.c b/doio.c index 838d67f..cc34733 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 cd3b578..6f22017 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 05681a5..48898da 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 f469ed0..300b453 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 e10ef7e..b7fed35 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 c84510e..2c349e2 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)];