diff -ur disksim-3.0/.paths disksim-3.0.fixed/.paths
--- disksim-3.0/.paths	Wed Jan 22 13:26:02 2003
+++ disksim-3.0.fixed/.paths	Sat Oct 15 13:35:00 2005
@@ -1,9 +1,9 @@
 
 # path to diskmodel
-export DISKMODEL_PREFIX=$(TOP_BUILDDIR)/diskmodel
-export DISKMODEL_INCL=$(DISKMODEL_PREFIX)/include
+export DISKMODEL_PREFIX=$(TOP_BUILDDIR)
+export DISKMODEL_INCL=$(DISKMODEL_PREFIX)
 export DISKMODEL_CFLAGS=-I$(DISKMODEL_INCL)
-export DISKMODEL_LDPATH=$(DISKMODEL_PREFIX)/lib
+export DISKMODEL_LDPATH=$(DISKMODEL_PREFIX)/diskmodel
 export DISKMODEL_LDFLAGS=-L$(DISKMODEL_LDPATH) -ldiskmodel
 
 # path to libparam
diff -ur disksim-3.0/diskmodel/Makefile disksim-3.0.fixed/diskmodel/Makefile
--- disksim-3.0/diskmodel/Makefile	Fri Jan 10 15:43:11 2003
+++ disksim-3.0.fixed/diskmodel/Makefile	Sat Oct 15 13:11:06 2005
@@ -31,7 +31,8 @@
 CC=gcc 
 
 # must provide LIBPARAM_ and LIBDDBG_ vars
-include .paths
+TOP_BUILDDIR = ../
+include ../.paths
 
 # -D_DISKMODEL_FREEBSD for the freebsd kernel (malloc foo)
 # -D_BSD_SOURCE for bsd-ish userspace to get uint32 and friends from the
diff -ur disksim-3.0/diskmodel/layout_g1.c disksim-3.0.fixed/diskmodel/layout_g1.c
--- disksim-3.0/diskmodel/layout_g1.c	Fri Jan 10 15:43:11 2003
+++ disksim-3.0.fixed/diskmodel/layout_g1.c	Sat Oct 15 13:05:01 2005
@@ -29,6 +29,7 @@
  */
 
 
+#include <string.h>
 
 #include "layout_g1.h"
 #include "marshall.h"
diff -ur disksim-3.0/diskmodel/mech_g1.c disksim-3.0.fixed/diskmodel/mech_g1.c
--- disksim-3.0/diskmodel/mech_g1.c	Tue Jan 14 13:08:16 2003
+++ disksim-3.0.fixed/diskmodel/mech_g1.c	Sat Oct 15 13:06:24 2005
@@ -104,6 +104,8 @@
 #include "mech_g1.h"
 #include "marshall.h"
 
+#include <string.h>
+
 // Port of first generation (disksim) disk mechanics implementation
 
 
diff -ur disksim-3.0/diskmodel/mech_g1_load.c disksim-3.0.fixed/diskmodel/mech_g1_load.c
--- disksim-3.0/diskmodel/mech_g1_load.c	Fri Jan 10 15:43:11 2003
+++ disksim-3.0.fixed/diskmodel/mech_g1_load.c	Sat Oct 15 13:25:08 2005
@@ -104,6 +104,7 @@
 // #include <math.h>
 
 #include <errno.h>
+#include <string.h>
 
 #include <libparam/libparam.h>
 #include <libparam/bitvector.h>
diff -ur disksim-3.0/diskmodel/modules/Makefile disksim-3.0.fixed/diskmodel/modules/Makefile
--- disksim-3.0/diskmodel/modules/Makefile	Fri Jan 10 15:43:12 2003
+++ disksim-3.0.fixed/diskmodel/modules/Makefile	Sat Oct 15 13:31:01 2005
@@ -30,7 +30,8 @@
 
 all : all-redirect
 
-include ../.paths
+TOP_BUILDDIR = ../../
+include ../../.paths
 
 LIBPARAM=$(LIBPARAM_PREFIX)
 PACKAGE=dm
@@ -56,4 +57,4 @@
 clean:
 	rm -f *.h *.c *.tex *~
 
-distclean: clean
\ No newline at end of file
+distclean: clean
diff -ur disksim-3.0/libparam/Makefile disksim-3.0.fixed/libparam/Makefile
--- disksim-3.0/libparam/Makefile	Fri Jan 10 15:57:28 2003
+++ disksim-3.0.fixed/libparam/Makefile	Sat Oct 15 13:15:11 2005
@@ -28,8 +28,8 @@
 # OF THIS SOFTWARE OR DOCUMENTATION.  
 
 
-
-include .paths
+TOP_BUILDDIR = ../
+include ../.paths
 all: libparam.a
 	mkdir -p lib include/libparam
 	cp -p libparam.a lib
diff -ur disksim-3.0/libparam/mod.pl disksim-3.0.fixed/libparam/mod.pl
--- disksim-3.0/libparam/mod.pl	Fri Jan 10 16:01:14 2003
+++ disksim-3.0.fixed/libparam/mod.pl	Sat Oct 15 13:00:49 2005
@@ -316,7 +316,7 @@
 print CODE "
   for(c = 0; c <= $maxstr; c++) {
     if($aname"."[c].req && !BIT_TEST(paramvec,c)) {
-      fprintf(stderr, \"*** error: in $MODNAME spec -- missing required parameter \\\"%s\\\"\n\", $aname"."[c].name);
+      fprintf(stderr, \"*** error: in $MODNAME spec -- missing required parameter \\\"%s\\\"\", $aname"."[c]\.name);
       return 0;
     }
   }
@@ -330,7 +330,8 @@
 print HEADER "#define $maxstr $modctr\n";
 $structname = join("_", ($modname, "mod"));
 
-$loaderstr = join("_", ($modname, "loadparams"));
+$loaderstr = join("_", ($modname,
+ "loadparams"));
 print HEADER "static struct lp_mod $structname = { \"$modname\", $aname, $maxstr, (lp_modloader_t)$loaderstr,  0,0 };\n";
 
 # print HEADER "static struct lp_mod $structname = { 0, 0, 0, 0, 0, 0 };\n";
diff -ur disksim-3.0/src/Makefile disksim-3.0.fixed/src/Makefile
--- disksim-3.0/src/Makefile	Wed Jan 22 13:35:42 2003
+++ disksim-3.0.fixed/src/Makefile	Sat Oct 15 13:19:47 2005
@@ -30,7 +30,8 @@
 BISON = bison
 FLEX = flex
 
-include .paths
+TOP_BUILDDIR = ../
+include ../.paths
 
 LDFLAGS = -lm $(LIBPARAM_LDFLAGS) $(DISKMODEL_LDFLAGS) $(LIBDDBG_LDFLAGS)
 HP_FAST_OFLAGS = +O4
diff -ur disksim-3.0/src/modules/Makefile disksim-3.0.fixed/src/modules/Makefile
--- disksim-3.0/src/modules/Makefile	Wed Jan 22 13:36:39 2003
+++ disksim-3.0.fixed/src/modules/Makefile	Sat Oct 15 13:13:17 2005
@@ -29,8 +29,8 @@
 
 
 
-
-include ../.paths
+TOP_BUILDDIR = ../../
+include ../../.paths
 
 LIBPARAM=$(LIBPARAM_PREFIX)
 PACKAGE=disksim
