1diff --git a/I2Ohash/src/util.c b/I2Ohash/src/util.c
2index 72d082e..f32f667 100644
3--- a/I2Ohash/src/util.c
4+++ b/I2Ohash/src/util.c
5@@ -39,9 +39,10 @@ fflush(stdout) ;
6 */
7 loc1 = (key1 + 1) % hashtable->nlist ;
8 loc2 = (key2 + 1) % hashtable->nlist ;
9-loc = (loc1*loc2) % hashtable->nlist ;
10+long int loc3 = (long int)loc1*(long int)loc2 % hashtable->nlist ;
11+loc =(int) loc3;
12 #if MYDEBUG > 0
13-fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %d", loc1, loc2, loc) ;
14+fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %ld, loc = %d", loc1, loc2, loc3, loc) ;
15 fflush(stdout) ;
16 #endif
17 /*
18@@ -158,9 +159,10 @@ fflush(stdout) ;
19 #endif
20 loc1 = (key1 + 1) % hashtable->nlist ;
21 loc2 = (key2 + 1) % hashtable->nlist ;
22-loc = (loc1*loc2) % hashtable->nlist ;
23+long int loc3 = (long int)loc1*(long int)loc2 % hashtable->nlist ;
24+loc =(int) loc3;
25 #if MYDEBUG > 0
26-fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %d", loc1, loc2, loc) ;
27+fprintf(stdout, "\n loc1 = %d, loc2 = %d, loc3 = %ld, loc = %d", loc1, loc2, loc3, loc) ;
28 fflush(stdout) ;
29 #endif
30 /*
31diff --git a/MPI/makefile b/MPI/makefile
32index 0c09f86..d25e70a 100644
33--- a/MPI/makefile
34+++ b/MPI/makefile
35@@ -2,7 +2,7 @@ all_drivers :
36 cd drivers ; make drivers
37
38 lib :
39- cd src ; make spoolesMPI.a
40+ cd src ; make makeLib
41
42 clean :
43 cd src ; make clean
44diff --git a/MPI/src/makefile b/MPI/src/makefile
45index f7650b7..71e4c49 100644
46--- a/MPI/src/makefile
47+++ b/MPI/src/makefile
48@@ -42,3 +42,8 @@ $(OBJ).a : \
49
50 clean :
51 - rm -f *.a *.o
52+
53+makeLib :
54+ perl ../../makeLib > makeG
55+ make -f makeG
56+ rm -f makeG
57diff --git a/MT/makefile b/MT/makefile
58index 9b86a32..d25e70a 100644
59--- a/MT/makefile
60+++ b/MT/makefile
61@@ -2,7 +2,7 @@ all_drivers :
62 cd drivers ; make drivers
63
64 lib :
65- cd src ; make spoolesMT.a
66+ cd src ; make makeLib
67
68 clean :
69 cd src ; make clean
70diff --git a/Make.inc b/Make.inc
71index f99eb8f..2de8a25 100644
72--- a/Make.inc
73+++ b/Make.inc
74@@ -12,7 +12,7 @@
75 # for solaris
76 #
77 # CC = gcc
78- CC = /usr/lang-4.0/bin/cc
79+# CC = /usr/lang-4.0/bin/cc
80 #
81 # for sgi
82 #
83@@ -28,7 +28,7 @@
84 #
85 # OPTLEVEL =
86 # OPTLEVEL = -g -v
87- OPTLEVEL = -O
88+ OPTLEVEL = -O3
89 # OPTLEVEL = -xO5 -v
90 # OPTLEVEL = -O3
91 # OPTLEVEL = -O4
92@@ -43,7 +43,7 @@
93 # set any load flags
94 #
95 # LDFLAGS = -Wl,+parallel -Wl,+tm,spp2000 # for hp exemplar
96- LDFLAGS =
97+# LDFLAGS =
98 #
99 #---------------------------------------------------------------------
100 #
101@@ -103,7 +103,7 @@
102 # MPI install library
103 #
104 # MPI_INSTALL_DIR =
105- MPI_INSTALL_DIR = /usr/local/mpich-1.0.13
106+# MPI_INSTALL_DIR = /usr/lib/openmpi
107 #
108 #---------------------------------------------------------------------
109 #
110@@ -142,6 +142,6 @@
111 # MPI include path
112 #
113 # MPI_INCLUDE_DIR =
114- MPI_INCLUDE_DIR = -I$(MPI_INSTALL_DIR)/include
115+# MPI_INCLUDE_DIR = -I/usr/include/mpi
116 #
117 #---------------------------------------------------------------------
118diff --git a/Utilities/src/iohb.c b/Utilities/src/iohb.c
119index ac38f7b..ac34034 100644
120--- a/Utilities/src/iohb.c
121+++ b/Utilities/src/iohb.c
122@@ -1725,7 +1725,7 @@ static void upcase(char* S)
123
124 static void IOHBTerminate(char* message)
125 {
126- fprintf(stderr,message);
127+ fputs(message, stderr);
128 exit(1);
129 }
130
131diff --git a/makeLib b/makeLib
132index 1780f39..7697b06 100755
133--- a/makeLib
134+++ b/makeLib
135@@ -64,14 +64,19 @@ foreach $src ( @srcnames ) {
136 $srcname = " \\\n " . $src ;
137 print $srcname ;
138 }
139+print "\n\n.SUFFIXES: .c .o .lo .a .so" ;
140 print "\n\nOBJ_FILES = \$\{SRC:.c=.o\}" ;
141+print "\n\nLOBJ_FILES = \$\{SRC:.c=.lo\}" ;
142 print "\n\n" ;
143 print <<'EOF' ;
144 .c.o :
145- $(PURIFY) $(CC) -c $(CFLAGS) $*.c -o $(OBJ)_$*.o
146+ $(PURIFY) $(CC) -c $(CFLAGS) $*.c -o $(OBJ)_$*.o $(MPI_INCLUDE_DIR)
147
148-../../spooles.a : ${OBJ_FILES}
149- $(AR) $(ARFLAGS) ../../spooles.a $(OBJ)_*.o
150+.c.lo :
151+ $(PURIFY) $(CC) -c $(CFLAGS) $*.c -fPIC -DPIC -o $(OBJ)_$*.lo $(MPI_INCLUDE_DIR)
152+
153+../../libspooles.a : ${OBJ_FILES} ${LOBJ_FILES}
154+ $(AR) $(ARFLAGS) ../../libspooles.a $(OBJ)_*.o
155 rm -f $(OBJ)_*.o
156- $(RANLIB) ../../spooles.a
157+ $(RANLIB) ../../libspooles.a
158 EOF
159diff --git a/makefile b/makefile
160index f014c7d..7c8042a 100755
161--- a/makefile
162+++ b/makefile
163@@ -124,7 +124,9 @@ lib :
164 cd ZV ; make lib
165 cd misc ; make lib
166 #cd MPI ; make lib
167-#cd MT ; make lib
168+ cd MT ; make lib
169+ $(CC) -shared */*/*.lo -Wl,-soname,libspooles.so.2.2 -o libspooles.so.2.2 -lpthread -lm
170+ ln -s libspooles.so.2.2 libspooles.so
171
172 global :
173 cd A2/src ; make -f makeGlobalLib
174diff --git a/timings.h b/timings.h
175index 23df189..685800b 100644
176--- a/timings.h
177+++ b/timings.h
178@@ -2,9 +2,8 @@
179 #define _TIMINGS_
180 #include <sys/time.h>
181 static struct timeval TV ;
182-static struct timezone TZ ;
183 #define MARKTIME(t) \
184- gettimeofday(&TV, &TZ) ; \
185+ gettimeofday(&TV, NULL) ; \
186 t = (TV.tv_sec + 0.000001*TV.tv_usec)
187 #endif
188