From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,4bba55ebeb129cb8 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-07-15 09:04:46 PST Path: bga.com!news.sprintlink.net!hookup!swrinde!gatech!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!newsfeed.ACO.net!Austria.EU.net!EU.net!uunet!zib-berlin.de!rs1-hrz.uni-duisburg.de!rrz.uni-koeln.de!RRZ.Uni-Koeln.DE!news.rrz.uni-koeln.de!sinder From: sinder@rrz.uni-koeln.de (Andreas Sindermann) Newsgroups: comp.unix.osf.osf1 Subject: Re: perl-4.036 and LaTeX2html Date: 15 Jul 94 17:37:39 Organization: Regional Computing Center, University of Cologne, Germany Message-ID: References: NNTP-Posting-Host: harpo.rrz.uni-koeln.de In-reply-to: clark@chikot.gso.uri.edu's message of Thu, 14 Jul 1994 21:07:55 GMT In article clark@chikot.gso.uri.edu (Clark David Rowley) writes: I've installed perl 4.036 on a DEC 3000/600 AXP system, mostly in order to use the LaTeX2html translation routine (I think it's a neat package; it worked fine on the DECStation 5000 with Ultrix I had before with the same sources for both). Now I find that perl (with the right ccflags, or with the patches mentioned here recently) compiles and tests alright with the 'make tests' in the distribution, but immediately dumps a core when I try to use the latex2html. [...] Some weeks ago I had the same problem... Here are the patches I used to get rid of the problem: Andreas ------- snip --- snip --- snip -------- diff -c perl-4.036/doio.c perl-4.036.mod/doio.c *** perl-4.036/doio.c Mon Feb 8 21:37:43 1993 --- perl-4.036.mod/doio.c Tue Jun 14 15:21:14 1994 *************** *** 291,297 **** #endif ) { int buflen = sizeof tokenbuf; ! if (getsockname(fileno(fp), tokenbuf, &buflen) >= 0 || errno != ENOTSOCK) stio->type = 's'; /* some OS's return 0 on fstat()ed socket */ /* but some return 0 for streams too, sigh */ --- 291,297 ---- #endif ) { int buflen = sizeof tokenbuf; ! if (getsockname(fileno(fp), (struct sockaddr *)tokenbuf, &buflen) >= 0 || errno != ENOTSOCK) stio->type = 's'; /* some OS's return 0 on fstat()ed socket */ /* but some return 0 for streams too, sigh */ *************** *** 1448,1454 **** #ifdef TAINT taintproper("Insecure dependency in bind"); #endif ! return bind(fileno(stio->ifp), addr, st[sp]->str_cur) >= 0; nuts: if (dowarn) --- 1448,1454 ---- #ifdef TAINT taintproper("Insecure dependency in bind"); #endif ! return bind(fileno(stio->ifp), (struct sockaddr *)addr, st[sp]->str_cur) >= 0; nuts: if (dowarn) *************** *** 1479,1485 **** #ifdef TAINT taintproper("Insecure dependency in connect"); #endif ! return connect(fileno(stio->ifp), addr, st[sp]->str_cur) >= 0; nuts: if (dowarn) --- 1479,1485 ---- #ifdef TAINT taintproper("Insecure dependency in connect"); #endif ! return connect(fileno(stio->ifp), (struct sockaddr *)addr, st[sp]->str_cur) >= 0; nuts: if (dowarn) *************** *** 1670,1680 **** fd = fileno(stio->ifp); switch (optype) { case O_GETSOCKNAME: ! if (getsockname(fd, st[sp]->str_ptr, (int*)&st[sp]->str_cur) < 0) goto nuts2; break; case O_GETPEERNAME: ! if (getpeername(fd, st[sp]->str_ptr, (int*)&st[sp]->str_cur) < 0) goto nuts2; break; } --- 1670,1680 ---- fd = fileno(stio->ifp); switch (optype) { case O_GETSOCKNAME: ! if (getsockname(fd, (struct sockaddr *)st[sp]->str_ptr, (int*)&st[sp]->str_cur) < 0) goto nuts2; break; case O_GETPEERNAME: ! if (getpeername(fd, (struct sockaddr *)st[sp]->str_ptr, (int*)&st[sp]->str_cur) < 0) goto nuts2; break; } diff -c perl-4.036/dolist.c perl-4.036.mod/dolist.c *** perl-4.036/dolist.c Mon Feb 8 21:35:15 1993 --- perl-4.036.mod/dolist.c Wed Jun 15 11:25:40 1994 *************** *** 1151,1157 **** --- 1151,1161 ---- STAB *stab; STR *str; int numarray; + #ifndef __alpha int lval; + #else + long lval; + #endif int gimme; int *arglast; { *************** *** 1159,1165 **** --- 1163,1173 ---- register int sp = arglast[1]; register int max = arglast[2]; register char *tmps; + #ifndef __alpha register int len; + #else + register long len; + #endif register int magic = 0; register ARRAY *ary; register HASH *hash; diff -c perl-4.036/eval.c perl-4.036.mod/eval.c *** perl-4.036/eval.c Mon Feb 8 21:37:47 1993 --- perl-4.036.mod/eval.c Tue Jun 14 15:21:13 1994 *************** *** 1671,1677 **** --- 1671,1681 ---- goto donumset; case O_TIME: #ifndef lint + #ifndef __alpha value = (double) time(Null(long*)); + #else + value = (double) time(Null(time_t *)); + #endif #endif goto donumset; case O_TMS: diff -c perl-4.036/hash.c perl-4.036.mod/hash.c *** perl-4.036/hash.c Mon Feb 8 21:35:51 1993 --- perl-4.036.mod/hash.c Wed Jun 15 12:40:17 1994 *************** *** 43,54 **** --- 43,63 ---- hfetch(tb,key,klen,lval) register HASH *tb; char *key; + #ifndef __alpha unsigned int klen; int lval; + #else + unsigned long klen; + long lval; + #endif { register char *s; register int i; + #ifndef __alpha register int hash; + #else + register long hash; + #endif register HENT *entry; register int maxi; STR *str; *************** *** 125,133 **** --- 134,150 ---- hstore(tb,key,klen,val,hash) register HASH *tb; char *key; + #ifndef __alpha unsigned int klen; + #else + unsigned long klen; + #endif STR *val; + #ifndef __alpha register int hash; + #else + register long hash; + #endif { register char *s; register int i; diff -c perl-4.036/hash.h perl-4.036.mod/hash.h *** perl-4.036/hash.h Mon Feb 8 21:36:47 1993 --- perl-4.036.mod/hash.h Wed Jun 15 11:21:57 1994 *************** *** 29,36 **** --- 29,41 ---- HENT *hent_next; char *hent_key; STR *hent_val; + #ifndef __alpha int hent_hash; int hent_klen; + #else + long hent_hash; + long hent_klen; + #endif }; struct htbl { diff -c perl-4.036/perl.h perl-4.036.mod/perl.h *** perl-4.036/perl.h Mon Feb 8 21:36:01 1993 --- perl-4.036.mod/perl.h Tue Jun 14 15:21:13 1994 *************** *** 684,690 **** --- 684,694 ---- #ifdef CASTNEGFLOAT #define U_S(what) ((unsigned short)(what)) #define U_I(what) ((unsigned int)(what)) + # ifndef __alpha #define U_L(what) ((unsigned long)(what)) + # else + # define U_L(what) ((unsigned int)(what)) + # endif #else unsigned long castulong(); #define U_S(what) ((unsigned int)castulong(what)) *************** *** 1029,1035 **** --- 1033,1043 ---- #ifndef STANDARD_C /* All of these are in stdlib.h or time.h for ANSI C */ double atof(); + #ifdef __alpha + time_t time(); + #else long time(); + #endif struct tm *gmtime(), *localtime(); char *index(), *rindex(); char *strcpy(), *strcat(); diff -c perl-4.036/toke.c perl-4.036.mod/toke.c *** perl-4.036/toke.c Mon Feb 8 21:37:46 1993 --- perl-4.036.mod/toke.c Tue Jun 14 15:21:28 1994 *************** *** 1749,1765 **** arg->arg_type = O_ITEM; arg[1].arg_type = A_DOUBLE; arg[1].arg_ptr.arg_str = str_smake(str); ! d = scanident(d,bufend,buf); (void)stabent(buf,TRUE); /* make sure it's created */ for (; d < e; d++) { if (*d == '\\') d++; else if (*d == '$' && d[1] && d[1] != '|' && d[1] != ')') { ! d = scanident(d,bufend,buf); (void)stabent(buf,TRUE); } else if (*d == '@') { ! d = scanident(d,bufend,buf); if (strEQ(buf,"ARGV") || strEQ(buf,"ENV") || strEQ(buf,"SIG") || strEQ(buf,"INC")) (void)stabent(buf,TRUE); --- 1749,1765 ---- arg->arg_type = O_ITEM; arg[1].arg_type = A_DOUBLE; arg[1].arg_ptr.arg_str = str_smake(str); ! d = scanident(d,e,buf); (void)stabent(buf,TRUE); /* make sure it's created */ for (; d < e; d++) { if (*d == '\\') d++; else if (*d == '$' && d[1] && d[1] != '|' && d[1] != ')') { ! d = scanident(d,e,buf); (void)stabent(buf,TRUE); } else if (*d == '@') { ! d = scanident(d,e,buf); if (strEQ(buf,"ARGV") || strEQ(buf,"ENV") || strEQ(buf,"SIG") || strEQ(buf,"INC")) (void)stabent(buf,TRUE); diff -c perl-4.036/util.c perl-4.036.mod/util.c *** perl-4.036/util.c Mon Feb 8 21:35:26 1993 --- perl-4.036.mod/util.c Tue Jun 14 15:21:14 1994 *************** *** 575,586 **** } else { s = bigend - littlelen; ! if (*s == *little && bcmp(s,little,littlelen)==0) return (char*)s; /* how sweet it is */ else if (bigend[-1] == '\n' && little[littlelen-1] != '\n' && s > big) { s--; ! if (*s == *little && bcmp(s,little,littlelen)==0) return (char*)s; } return Nullch; --- 575,586 ---- } else { s = bigend - littlelen; ! if (*s == *little && bcmp((char *)s,(char *)little,littlelen)==0) return (char*)s; /* how sweet it is */ else if (bigend[-1] == '\n' && little[littlelen-1] != '\n' && s > big) { s--; ! if (*s == *little && bcmp((char *)s,(char *)little,littlelen)==0) return (char*)s; } return Nullch; -- sinder@ph-cip.uni-koeln.de