diff --git a/src/acconfig.h b/src/acconfig.h
index 8e0d2bcb1e15d178a3a11c74bb3adb95a0176a98..940fa66156ef192730a847d767deaaa35f349fce 100644
--- a/src/acconfig.h
+++ b/src/acconfig.h
@@ -1,5 +1,5 @@
 /*
- * $Id: acconfig.h,v 1.44 1999/07/08 23:24:23 hubbe Exp $
+ * $Id: acconfig.h,v 1.45 1999/07/15 16:54:33 hubbe Exp $
  */
 #ifndef MACHINE_H
 #define MACHINE_H
@@ -57,6 +57,21 @@
 /* Define to 'short' if <sys/types.h> doesn't */
 #undef pri_t
 
+/* Define to 'int' if <sys/types.h> doesn't */
+#undef uid_t
+
+/* Define to 'int' if <sys/types.h> doesn't */
+#undef gid_t
+
+/* Define to 'int' if <sys/types.h> doesn't */
+#undef pid_t
+
+/* Define to 'long' if <sys/types.h> doesn't */
+#undef size_t
+
+/* Define to 'long' if <sys/types.h> doesn't */
+#undef off_t
+
 /* Define to 'int' if <signal.h> doesn't */
 #undef sig_atomic_t
 
diff --git a/src/aclocal.m4 b/src/aclocal.m4
index 7c6d5807d20ea2c3ceb1500dfc4a2abc587ed3f7..8a312fdd6aa8097f153d8886d623a75ca4110f5f 100644
--- a/src/aclocal.m4
+++ b/src/aclocal.m4
@@ -43,6 +43,33 @@ pushdef([AC_CONFIG_HEADER],
   AC_CONFIG_HEADER($1)
 ])
 
+AC_DEFUN(AC_MY_CHECK_TYPE,
+[
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(ac_cv_type_$1,
+[
+AC_TRY_COMPILE([
+#include <sys/types.h>
+
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+
+],[
+$1 tmp;
+],ac_cv_type_$1=yes,ac_cv_type_$1=no)
+])
+
+if test $ac_cv_type_$1 = no; then
+  AC_DEFINE($1,$2)
+  AC_MSG_RESULT(no)
+else
+  AC_MSG_RESULT(yes)
+fi
+])
+
+
 AC_DEFUN(AC_TRY_ASSEMBLE,
 [ac_c_ext=$ac_ext
  ac_ext=${ac_s_ext-s}
@@ -67,7 +94,7 @@ rm -rf conftest*])
 
 define([AC_LOW_MODULE_INIT],
 [
-# $Id: aclocal.m4,v 1.12 1999/05/30 20:52:29 grubba Exp $
+# $Id: aclocal.m4,v 1.13 1999/07/15 16:54:34 hubbe Exp $
 
 MY_AC_PROG_CC
 
diff --git a/src/configure.in b/src/configure.in
index 2bd1bf44ed809ecb097aba1d04dc72d8c8163eae..4a895ab55414b7ee2ef478576cef9f84fb08120b 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -1,4 +1,4 @@
-AC_REVISION("$Id: configure.in,v 1.302 1999/07/08 23:04:40 hubbe Exp $")
+AC_REVISION("$Id: configure.in,v 1.303 1999/07/15 16:54:35 hubbe Exp $")
 AC_INIT(interpret.c)
 AC_CONFIG_HEADER(machine.h)
 
@@ -1083,7 +1083,7 @@ thread.h dlfcn.h dld.h dl.h sys/times.h sched.h sys/procfs.h sys/param.h \
 winsock.h sys/ioct.h sys/socket.h malloc.h netinet/in.h sys/wait.h winbase.h \
 grp.h pwd.h passwd.h group.h winsock2.h signal.h sys/file.h poll.h sys/poll.h \
 socket.h ieeefp.h fp_class.h floatingpoint.h  sys/priocntl.h sched.h \
-windows.h errno.h)
+windows.h errno.h stddef.h)
 
 AC_CHECK_SIZEOF(char *,4)
 AC_CHECK_SIZEOF(long,4)
@@ -1092,12 +1092,15 @@ AC_CHECK_SIZEOF(short,2)
 AC_CHECK_SIZEOF(float,4)
 AC_CHECK_SIZEOF(double,8)
 
-AC_TYPE_SIZE_T
-AC_TYPE_PID_T
-AC_TYPE_UID_T
+AC_MY_CHECK_TYPE(size_t,long)
+AC_MY_CHECK_TYPE(off_t,long)
+AC_MY_CHECK_TYPE(pid_t,int)
+AC_MY_CHECK_TYPE(uid_t,int)
+AC_MY_CHECK_TYPE(gid_t,int)
+AC_MY_CHECK_TYPE(time_t,INT32)
+AC_MY_CHECK_TYPE(pri_t, short)
+
 AC_TYPE_SIGNAL
-AC_CHECK_TYPE(time_t,INT32)
-AC_CHECK_TYPE(pri_t, short)
 
 dnl AC_CHECK_LIB(PW, alloca)
 
diff --git a/src/global.h b/src/global.h
index fabd69fc32b65f33928a40adf1061875495d71dd..598c3aadc075320ef2d9429e442e3204baa062aa 100644
--- a/src/global.h
+++ b/src/global.h
@@ -5,7 +5,7 @@
 \*/
 
 /*
- * $Id: global.h,v 1.35 1999/06/19 20:00:09 hubbe Exp $
+ * $Id: global.h,v 1.36 1999/07/15 16:54:36 hubbe Exp $
  */
 #ifndef GLOBAL_H
 #define GLOBAL_H
@@ -113,6 +113,11 @@ char *alloca ();
 #undef HAVE_STDLIB_H
 #endif
 
+#ifdef HAVE_STDLIB_H
+#include <stddef.h>
+#undef HAVE_STDLIB_H
+#endif
+
 #ifdef HAVE_MALLOC_H
 #include <malloc.h>
 #undef HAVE_MALLOC_H