diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1997-04-15 00:00:00 +1200 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1997-04-15 00:00:00 +1200 |
commit | 137443ea0a858c43f5a720730cac6209a7d41948 (patch) | |
tree | ea114bc1f5281a6ec91ebc67e34ed7f30571daee /doio.c | |
parent | 683d4eee6f3b749aec29cc849f45404c6acda85e (diff) | |
download | perl-137443ea0a858c43f5a720730cac6209a7d41948.tar.gz |
[inseparable changes from patch from perl-5.003_97d to perl-5.003_97e]perl-5.003_97e
CORE LANGUAGE CHANGES
Subject: New operator: sysseek()
From: Chip Salzenberg <chip@perl.com>
Files: doio.c ext/Opcode/Makefile.PL ext/Opcode/Opcode.pm global.sym keywords.pl opcode.pl pod/perldelta.pod pod/perlfunc.pod pp_sys.c t/op/sysio.t toke.c
Subject: Allow recursive substitution again
From: Chip Salzenberg <chip@perl.com>
Files: pod/perldelta.pod pod/perldiag.pod pp_hot.c
CORE PORTABILITY
Subject: Use size_t for socket size parameters of GNU libc
From: Chip Salzenberg <chip@perl.com>
Files: doio.c pp_sys.c
Subject: Win32 update (four patches)
From: Gurusamy Sarathy <gsar@engin.umich.edu>
Files: MANIFEST README.win32 dosish.h ext/SDBM_File/Makefile.PL ext/SDBM_File/sdbm/Makefile.PL ext/SDBM_File/sdbm/sdbm.c ext/SDBM_File/sdbm/sdbm.h lib/ExtUtils/MM_Unix.pm perl.c utils/perlbug.PL utils/perldoc.PL win32/Makefile win32/TEST win32/config.H win32/config.w32 win32/config_h.PL win32/config_sh.PL win32/perllib.c win32/runperl.c win32/win32.c win32/win32io.c win32/win32sck.c
DOCUMENTATION
Subject: Add CGI to perldelta.pod and improve its description in MANIFEST
From: Chip Salzenberg <chip@perl.com>
Files: MANIFEST pod/perldelta.pod
Subject: Describe probs with majordomo 1.94.1
From: Chip Salzenberg <chip@perl.com>
Files: pod/perldelta.pod
Subject: Fix description of /\G/g
From: Chip Salzenberg <chip@perl.com>
Files: pod/perlop.pod
Subject: Mention '...' operator in precedence table
Date: Sun, 13 Apr 1997 11:24:16 -0600
From: Tom Christiansen <tchrist@perl.com>
Files: pod/perlop.pod
private-msgid: 199704131724.LAA23120@jhereg.perl.com
OTHER CORE CHANGES
Subject: New API function: perl_eval_pv()
Date: Mon, 14 Apr 1997 17:13:41 -0400
From: Doug MacEachern <dougm@opengroup.org>
Files: perl.c pod/perlcall.pod pod/perldelta.pod pod/perlembed.pod pod/perlguts.pod proto.h
private-msgid: 199704142113.RAA06823@postman.osf.org
Subject: Fix C< s//whatever/ >, which reuses old pattern
From: Chip Salzenberg <chip@perl.com>
Files: pp_hot.c regexec.c
Diffstat (limited to 'doio.c')
-rw-r--r-- | doio.c | 24 |
1 files changed, 10 insertions, 14 deletions
@@ -68,7 +68,7 @@ /* Put this after #includes because <unistd.h> defines _XOPEN_*. */ #ifndef Sock_size_t -# if _XOPEN_VERSION >= 5 || defined(_XOPEN_SOURCE_EXTENDED) +# if _XOPEN_VERSION >= 5 || defined(_XOPEN_SOURCE_EXTENDED) || defined(__GLIBC__) # define Sock_size_t Size_t # else # define Sock_size_t int @@ -689,22 +689,18 @@ long pos; int whence; { register IO *io; + register PerlIO *fp; - if (!gv) - goto nuts; - - io = GvIO(gv); - if (!io || !IoIFP(io)) - goto nuts; - + if (gv && (io = GvIO(gv)) && (fp = IoIFP(io))) { #ifdef ULTRIX_STDIO_BOTCH - if (PerlIO_eof(IoIFP(io))) - (void)PerlIO_seek (IoIFP(io), 0L, 2); /* ultrix 1.2 workaround */ + if (PerlIO_eof(fp)) + (void)PerlIO_seek(fp, 0L, 2); /* ultrix 1.2 workaround */ #endif - - return PerlIO_seek(IoIFP(io), pos, whence) >= 0; - -nuts: + if (op->op_type == OP_SYSSEEK) + return lseek(PerlIO_fileno(fp), pos, whence) >= 0; + else + return PerlIO_seek(fp, pos, whence) >= 0; + } if (dowarn) warn("seek() on unopened file"); SETERRNO(EBADF,RMS$_IFI); |