diff options
Diffstat (limited to 'comms/scmxx/patches/patch-aa')
-rw-r--r-- | comms/scmxx/patches/patch-aa | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/comms/scmxx/patches/patch-aa b/comms/scmxx/patches/patch-aa new file mode 100644 index 00000000000..875f5c629e4 --- /dev/null +++ b/comms/scmxx/patches/patch-aa @@ -0,0 +1,56 @@ +$NetBSD: patch-aa,v 1.3 2002/03/27 22:44:29 kleink Exp $ + +--- common.c.orig Wed Mar 27 22:34:02 2002 ++++ common.c Wed Mar 27 23:34:49 2002 +@@ -198,19 +198,19 @@ + int open_myFile_ro(){ + int myfd; + char *myFILE_p=myFILE; +- static int stdin = 0; ++ static int use_stdin = 0; + + if (!strcmp(myFILE,"-")) { +- stdin=1; ++ use_stdin=1; + } +- if (strlen(myFILE)!=0 && !stdin){ ++ if (strlen(myFILE)!=0 && !use_stdin){ + myfd=open(myFILE,O_RDONLY); + if(myfd==-1){errexit("Could not access %s, aborting\n",myFILE);} + else{myprintf(0,"Accessing %s\n",myFILE);} + }else{ +- myfd=0; ++ myfd=STDIN_FILENO; + sprintf(myFILE_p,"stdin"); +- stdin=1; ++ use_stdin=1; + } + return(myfd); + } +@@ -218,21 +218,21 @@ + int open_myFile_rw(){ + int myfd; + char *myFILE_p=myFILE; +- static int stdout = 0; ++ static int use_stdout = 0; + + if (!strcmp(myFILE,"-")) { +- stdout=1; ++ use_stdout=1; + } +- if (strlen(myFILE)!=0 && !stdout){ ++ if (strlen(myFILE)!=0 && !use_stdout){ + myfd=open(myFILE ,O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR|S_IRGRP); + if (myfd==-1){ + close(myfd); + errexit("%s could not be created.\n",myFILE); + }else{myprintf(0,"%s created.\n",myFILE);} + }else{ +- myfd=1; ++ myfd=STDOUT_FILENO; + sprintf(myFILE_p,"stdout"); +- stdout=1; ++ use_stdout=1; + } + return(myfd); + } |