diff --git a/src/config.h b/src/config.h
index ac6907e0e357c8f357c7abf538d5e16f2790c186..841a32e74d51671b25eb7127ddcad6f020fe4299 100644
--- a/src/config.h
+++ b/src/config.h
@@ -8,7 +8,7 @@
  * with DEBUG defined debugging becomes much easier.
  */
 
-#undef DEBUG
+/* #define DEBUG */
 
 /*
  * Define the evaluator stack size, used for just about everything.
@@ -30,7 +30,7 @@
 /*
  * Define the size of the shared string hash table.
  */
-#define	HTABLE_SIZE 4711
+#define	HTABLE_SIZE 117
 
 /*
  * Define the size of the cache that is used for method lookup.
@@ -46,7 +46,4 @@
 #define YYDEBUG 1
 #endif
 
-/* Not parently used */
-#define GC_TIME 60
-
 #endif
diff --git a/src/modules/files/configure.in b/src/modules/files/configure.in
index 340550c4cbc13449d09818b91924783766b647fe..1390035135c50df452d19e03b778400a1989eccc 100644
--- a/src/modules/files/configure.in
+++ b/src/modules/files/configure.in
@@ -5,7 +5,7 @@ AC_PROG_CC
 AC_PROG_RANLIB
 AC_SUBST(RANLIB)
 
-AC_HAVE_HEADERS(arpa/inet.h sys/socketvar.h netinet/in.h)
+AC_HAVE_HEADERS(arpa/inet.h sys/socketvar.h netinet/in.h sys/stream.h sys/protosw.h)
 AC_HEADER_DIRENT
 AC_CHECK_LIB(socket, socket)
 
diff --git a/src/modules/files/efuns.c b/src/modules/files/efuns.c
index 1467cd71637bd405d79cc42189053ea811c59176..0072aacb828f857806949975232bb3d57c3ae4d7 100644
--- a/src/modules/files/efuns.c
+++ b/src/modules/files/efuns.c
@@ -195,6 +195,9 @@ void f_getcwd(INT32 args)
   pop_n_elems(args);
 
 #ifdef HAVE_GETWD
+#ifndef MAXPATHLEN
+#define MAXPATHLEN (1024*20)
+#endif
   e=(char *)getwd((char *)malloc(MAXPATHLEN+1));
   if(!e)
     fatal("Couldn't fetch current path.\n");
diff --git a/src/modules/files/file.c b/src/modules/files/file.c
index fa4cf8cfa9f3e810e3ab8ae9078103b8fa74f44a..91237c4170bc82fccb938eb5ec5245948a1b1f93 100644
--- a/src/modules/files/file.c
+++ b/src/modules/files/file.c
@@ -34,6 +34,14 @@
 #include <sys/wait.h>
 #include <sys/socket.h>
 
+#ifdef HAVE_SYS_STREAM_H
+#include <sys/stream.h>
+#endif
+
+#ifdef HAVE_SYS_PROTOSW_H
+#include <sys/protosw.h>
+#endif
+
 #ifdef HAVE_SYS_SOCKETVAR_H
 #include <sys/socketvar.h>
 #endif
diff --git a/src/modules/files/file_machine.h.in b/src/modules/files/file_machine.h.in
index a2b50c52f960675f7bc48a0dbd22fb852cefa1ce..2d06ac90c4bb17ece604e6319cecafb95d8ae82d 100644
--- a/src/modules/files/file_machine.h.in
+++ b/src/modules/files/file_machine.h.in
@@ -1,6 +1,10 @@
 #ifndef FILE_MACHINE_H
 #define FILE_MACHINE_H
 
+
+#undef HAVE_SYS_PROTOSW_H
+#undef HAVE_SYS_STREAM_H
+
 /* Define if you have arpa/inhet.h */
 #undef HAVE_ARPA_INET_H
 
diff --git a/src/modules/files/socket.c b/src/modules/files/socket.c
index fd396d552a7aad14057882c6773535dedca30c18..5a09b71df6311827a6ee1734bc21f95aae757c03 100644
--- a/src/modules/files/socket.c
+++ b/src/modules/files/socket.c
@@ -20,6 +20,15 @@
 #include <sys/wait.h>
 #include <sys/socket.h>
 
+
+#ifdef HAVE_SYS_STREAM_H
+#include <sys/stream.h>
+#endif
+
+#ifdef HAVE_SYS_PROTOSW_H
+#include <sys/protosw.h>
+#endif
+
 #ifdef HAVE_SYS_SOCKETVAR_H
 #include <sys/socketvar.h>
 #endif