pkgsrc/lang/cint/patches/patch-an
dholland 053674084d Fix broken 64-bit build, and patch makefile to stop on error. There
are a lot of woolly things going on here, so PKGREVISION++ as a
precaution.
2008-09-05 05:27:30 +00:00

44 lines
1.4 KiB
Text

$NetBSD: patch-an,v 1.1 2008/09/05 05:27:31 dholland Exp $
--- tool/ifdef/get.c~ 2005-05-06 04:49:09.000000000 -0400
+++ tool/ifdef/get.c 2008-09-05 00:43:19.000000000 -0400
@@ -2575,7 +2575,7 @@ struct G__param *libp;
{
char temp[ONELINE],temp1[ONELINE];
FILE *fopen();
- int fp;
+ long fp;
if(strcmp(funcname,"printf")==0) {
/* para[0]:description, para[1~paran-1]: */
@@ -2596,18 +2596,18 @@ struct G__param *libp;
if(strcmp(funcname,"fclose")==0) {
/* para[0]:filepointer */
- sprintf(result7,"%d",fclose((FILE*)atoi(libp->para[0])));
+ sprintf(result7,"%d",fclose((FILE*)atol(libp->para[0])));
return(1);
}
if(strcmp(funcname,"fgets")==0) {
/* parameter[0]:varname, para[1]:nchar,para[2]:filepointer */
- fp=atoi(libp->para[2]);
+ fp=atol(libp->para[2]);
sprintf(result7,"%ld"
,(long)fgets(temp,atoi(libp->para[1]),(FILE*)fp));
G__letvariable(libp->parameter[0]
,G__add_quotation(temp),&G__global,G__local);
- sprintf(temp,"%d",fp);
+ sprintf(temp,"%ld",fp);
G__letvariable(libp->parameter[1],temp,&G__global,G__local);
return(1);
}
@@ -2615,7 +2615,7 @@ struct G__param *libp;
if(strcmp(funcname,"fprintf")==0) {
/* parameter[0]:pointer ,parameter[1]:description, para[2~paran-1]: */
G__charformatter(result7,1,libp);
- fprintf((FILE*)atoi(libp->para[0]),"%s",result7);
+ fprintf((FILE*)atol(libp->para[0]),"%s",result7);
strcpy(result7,"");
return(1);
}