summaryrefslogtreecommitdiff
path: root/devel/bcpp/files/patch-bcpp.cpp
blob: f270b0c8e2525a69e76220cef0ed90dd2adec62c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- bcpp.cpp.orig	Tue Aug 10 20:54:52 1999
+++ bcpp.cpp	Wed Nov  7 10:48:27 2001
@@ -2721,6 +2721,7 @@
     char* pSPath      = getenv ("PATH");
     char* pEPath      = NULL;
     char* pNameMem    = NULL;
+    char* tmpCfgName  = new char[ 16 + strlen(pCfgName) + 1];
     char  sepChar     = NULLC;
     const char* pathSepChar;
     char  backUp;
@@ -2729,6 +2730,13 @@
     // test to see if file is in current directory first !
     if ((pCfgFile = fopen(pCfgName, "r")) != NULL)
         return;
+
+    // look to see if it's in /usr/local/etc
+    tmpCfgName = strcat( tmpCfgName, "/usr/local/etc/" );
+    tmpCfgName = strcat( tmpCfgName, pCfgName );
+    if ((pCfgFile = fopen(tmpCfgName, "r")) != NULL)
+	    return;
+
 
     // environment variable not found, lord knows what it is !
     if (pSPath == NULL)