File: 16-default-pvmroot.patch

package info (click to toggle)
pvm 3.4.6-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,284 kB
  • sloc: ansic: 72,074; makefile: 1,198; fortran: 631; sh: 285; csh: 74; asm: 37
file content (24 lines) | stat: -rw-r--r-- 603 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- a/src/pvmcruft.c
+++ b/src/pvmcruft.c
@@ -904,7 +904,21 @@
 #else
 		rd = getenv("PVM_ROOT");
 #endif
+#ifdef PVM_DEFAULT_ROOT
+		if (!rd) {
+			struct stat buf;
 
+			rd = STRALLOC(PVM_DEFAULT_ROOT);
+			if (stat(rd, &buf) == -1) {
+				pvmlogperror("Unable to default PVM_ROOT to"  PVM_DEFAULT_ROOT);
+				pvmbailout(0);
+				exit(1);                /* the other meaning of bail out */    
+			}
+			pvmputenv("PVM_ROOT=" /* */ PVM_DEFAULT_ROOT);
+/*			pvmlogerror("Defaulting PVM_ROOT to "  PVM_DEFAULT_ROOT); */
+		}
+#endif 
+		
 #ifdef WIN32
 		if (!rd)
 			rd = read_pvmregistry("PVM_ROOT");