1--- jam.old.c 2008-03-14 12:15:01.000000000 +1100 2+++ jam.c 2008-03-29 17:59:14.000000000 +1100 3@@ -99,6 +99,7 @@ 4 * 09/19/02 (seiwald) - new -d displays 5 * 10/22/02 (seiwald) - list_new() now does its own newstr()/copystr() 6 * 11/04/02 (seiwald) - const-ing for string literals 7+ * 03/14/08 (gwg) - Added JAMBASE enviroment variable 8 */ 9 10 # include "jam.h" 11@@ -333,7 +334,13 @@ 12 parse_file( s ); 13 14 if( !n ) 15- parse_file( "+" ); 16+ { 17+ char *jambase; 18+ if ((jambase = getenv("JAMBASE")) != NULL) 19+ parse_file( jambase ); 20+ else 21+ parse_file( "+" ); 22+ } 23 24 status = yyanyerrors(); 25 26--- filent.old.c 2008-03-29 17:41:58.000000000 +1100 27+++ filent.c 2008-03-31 01:28:06.000000000 +1100 28@@ -26,6 +26,7 @@ 29 * 01/08/01 (seiwald) - closure param for file_dirscan/file_archscan 30 * 11/04/02 (seiwald) - const-ing for string literals 31 * 01/23/03 (seiwald) - long long handles for NT IA64 32+ * 03/29/08 (gwg) - fix MingW long library names 33 */ 34 35 # include "jam.h" 36@@ -186,6 +187,7 @@ 37 { 38 struct ar_hdr ar_hdr; 39 char *string_table = 0; 40+ long stable_size = 0; 41 char buf[ MAXJPATH ]; 42 long offset; 43 int fd; 44@@ -229,6 +231,7 @@ 45 string_table = malloc(lar_size); 46 if (read(fd, string_table, lar_size) != lar_size) 47 printf("error reading string table\n"); 48+ stable_size = lar_size; 49 offset += SARHDR + lar_size; 50 continue; 51 } 52@@ -237,10 +240,20 @@ 53 /* Long filenames are recognized by "/nnnn" where nnnn is 54 ** the offset of the string in the string table represented 55 ** in ASCII decimals. 56+ ** However, the name end with 0 or '/', depending on 57+ ** the librarian used to generate them (0 for Mingw, 58+ ** '/' for Visual C++) 59 */ 60 61- name = string_table + atoi( ar_hdr.ar_name + 1 ); 62- endname = name + strlen( name ); 63+ long off = atoi( ar_hdr.ar_name + 1 ); 64+ name = string_table + off; 65+ for ( ; off < stable_size; off++ ) 66+ { 67+ int c = string_table[off]; 68+ if ( c == 0 || c == '/' ) 69+ break; 70+ } 71+ endname = string_table + off; 72 } 73 else 74 { 75