From: Craig A. Berry Date: Sat, 27 Oct 2001 16:07:47 +0000 (-0500) Subject: C RTL awareness update for VMS X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=10eefe7f3dbf3fb8c327fd67268d0d5514fee92f;p=p5sagit%2Fp5-mst-13.2.git C RTL awareness update for VMS Message-Id: <5.1.0.14.2.20011027134037.01bebc60@exchi01> p4raw-id: //depot/perl@12712 --- diff --git a/configure.com b/configure.com index 7e493e7..335fc57 100644 --- a/configure.com +++ b/configure.com @@ -4592,8 +4592,16 @@ $ IF (ccname .EQS. "DEC") .AND. - (F$INTEGER(Dec_C_Version).GE.50200000) .AND. (vms_ver .GES. "7.0") $ THEN $ d_bcmp="define" +$ d_getitimer="define" $ d_gettimeod="define" +$ d_mmap="define" +$ d_mprotect="define" +$ d_munmap="define" +$ d_msync="define" +$ d_ualarm="define" $ d_uname="define" +$ d_usleep="define" +$ d_setitimer="define" $ d_sigaction="define" $ d_sigprocmask="define" $ d_truncate="define" @@ -4616,9 +4624,17 @@ $ d_sysconf="define" $ d_sigsetjmp="define" $ ELSE $ pidtype="unsigned int" -$ d_gettimeod="undef" $ d_bcmp="undef" +$ d_getitimer="undef" +$ d_gettimeod="undef" +$ d_mmap="undef" +$ d_mprotect="undef" +$ d_munmap="undef" +$ d_msync="undef" +$ d_ualarm="undef" $ d_uname="undef" +$ d_usleep="undef" +$ d_setitimer="undef" $ d_sigaction="undef" $ d_sigprocmask="undef" $ d_truncate="undef" @@ -5092,7 +5108,7 @@ $ WC "d_gethbyname='" + d_gethbyname + "'" $ WC "d_gethent='" + d_gethent + "'" $ WC "d_gethname='" + d_gethname + "'" $ WC "d_gethostprotos='" + d_gethostprotos + "'" -$ WC "d_getitimer='undef'" +$ WC "d_getitimer='" + d_getitimer + "'" $ WC "d_getlogin='define'" $ WC "d_getmnt='undef'" $ WC "d_getmntent='undef'" @@ -5157,10 +5173,10 @@ $ WC "d_mknod='undef'" $ WC "d_mkstemp='" + d_mkstemp + "'" $ WC "d_mkstemps='" + d_mkstemps + "'" $ WC "d_mktime='" + d_mktime + "'" -$ WC "d_mmap='undef'" +$ WC "d_mmap='" + d_mmap + "'" $ WC "d_modfl='" + d_modfl + "'" $ WC "d_modfl_pow32_bug='undef'" -$ WC "d_mprotect='undef'" +$ WC "d_mprotect='" + d_mprotect + "'" $ WC "d_msg='undef'" $ WC "d_msg_ctrunc='undef'" $ WC "d_msg_dontroute='undef'" @@ -5168,8 +5184,8 @@ $ WC "d_msg_oob='undef'" $ WC "d_msg_peek='undef'" $ WC "d_msg_proxy='undef'" $ WC "d_msghdr_s='undef'" -$ WC "d_msync='undef'" -$ WC "d_munmap='undef'" +$ WC "d_msync='" + d_msync + "'" +$ WC "d_munmap='" + d_munmap + "'" $ WC "d_mymalloc='" + d_mymalloc + "'" $ WC "d_nice='define'" $ WC "d_nl_langinfo='" + d_nl_langinfo + "'" @@ -5225,7 +5241,7 @@ $ WC "d_seteuid='undef'" $ WC "d_setgrent='undef'" $ WC "d_setgrps='undef'" $ WC "d_sethent='" + d_sethent + "'" -$ WC "d_setitimer='undef'" +$ WC "d_setitimer='" + d_setitimer + "'" $ WC "d_setlinebuf='undef'" $ WC "d_setlocale='" + d_setlocale + "'" $ WC "d_setnent='" + d_setnent + "'" @@ -5303,14 +5319,14 @@ $ WC "d_times='define'" $ WC "d_truncate='" + d_truncate + "'" $ WC "d_tzname='" + d_tzname + "'" $ WC "d_u32align='define'" -$ WC "d_ualarm='undef'" +$ WC "d_ualarm='" + d_ualarm + "'" $ WC "d_umask='define'" $ WC "d_uname='" + d_uname + "'" $ WC "d_union_semun='undef'" $ WC "d_unlink_all_versions='undef'" $ WC "d_unordered='undef'" -$ WC "d_usleep='undef'" -$ WC "d_usleepproto='undef'" +$ WC "d_usleep='" + d_usleep + "'" +$ WC "d_usleepproto='" + d_usleep + "'" $ WC "d_ustat='undef'" $ WC "d_vendorarch='undef'" $ WC "d_vendorlib='undef'" @@ -5488,7 +5504,7 @@ $ WC "make='" + make + "'" $ WC "malloctype='void *'" $ WC "man1ext='rno'" $ WC "man3ext='rno'" -$ WC "mmaptype=' " + "'" +$ WC "mmaptype='void *'" $ WC "modetype='unsigned int'" $ WC "multiarch='undef'" $ WC "mydomain='" + mydomain + "'" diff --git a/perlio.c b/perlio.c index 2c9e7a8..ba91393 100644 --- a/perlio.c +++ b/perlio.c @@ -3630,8 +3630,8 @@ PerlIOMmap_map(PerlIO *f) if (flags & PERLIO_F_CANREAD) { PerlIOBuf *b = PerlIOSelf(f, PerlIOBuf); int fd = PerlIO_fileno(f); - struct stat st; - code = fstat(fd, &st); + Stat_t st; + code = Fstat(fd, &st); if (code == 0 && S_ISREG(st.st_mode)) { SSize_t len = st.st_size - b->posn; if (len > 0) {