summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/doio.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2004-04-07 21:32:56 +0000
committermillert <millert@openbsd.org>2004-04-07 21:32:56 +0000
commit09e75b67b2ae29a7dbcad77a47adaf75ad76bbeb (patch)
tree5f5d158a4aece7aef6cb3cd6d3f9f73efe1fea63 /gnu/usr.bin/perl/doio.c
parentperl 5.8.3 from CPAN (diff)
downloadwireguard-openbsd-09e75b67b2ae29a7dbcad77a47adaf75ad76bbeb.tar.xz
wireguard-openbsd-09e75b67b2ae29a7dbcad77a47adaf75ad76bbeb.zip
merge local changes into perl-5.8.3
Diffstat (limited to 'gnu/usr.bin/perl/doio.c')
-rw-r--r--gnu/usr.bin/perl/doio.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gnu/usr.bin/perl/doio.c b/gnu/usr.bin/perl/doio.c
index 5ba40b9be61..dc192d4717f 100644
--- a/gnu/usr.bin/perl/doio.c
+++ b/gnu/usr.bin/perl/doio.c
@@ -48,9 +48,7 @@
# define OPEN_EXCL 0
#endif
-#if !defined(NSIG) || defined(M_UNIX) || defined(M_XENIX)
#include <signal.h>
-#endif
bool
Perl_do_open(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
@@ -2290,8 +2288,9 @@ Perl_start_glob (pTHX_ SV *tmpglob, IO *io)
if (*cp == '?') *cp = '%'; /* VMS style single-char wildcard */
while (ok && ((sts = lib$find_file(&wilddsc,&rsdsc,&cxt,
&dfltdsc,NULL,NULL,NULL))&1)) {
- end = rstr + (unsigned long int) *rslt;
- if (!hasver) while (*end != ';') end--;
+ /* with varying string, 1st word of buffer contains result length */
+ end = rstr + *((unsigned short int*)rslt);
+ if (!hasver) while (*end != ';' && end > rstr) end--;
*(end++) = '\n'; *end = '\0';
for (cp = rstr; *cp; cp++) *cp = _tolower(*cp);
if (hasdir) {