*** empty log message ***
[bpt/emacs.git] / src / sysdep.c
index c4f9991..d53b7d9 100644 (file)
@@ -19,7 +19,7 @@ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
 
-#include <config.h>
+#include "config.h"
 #include <signal.h>
 #include <setjmp.h>
 #ifdef HAVE_UNISTD_H
@@ -54,7 +54,9 @@ Lisp_Object Vx_bitmap_file_path;
 #define read sys_read
 #define write sys_write
 #include <windows.h>
-extern int errno;
+#ifndef NULL
+#define NULL 0
+#endif
 #endif /* not WINDOWSNT */
 
 /* Does anyone other than VMS need this? */
@@ -64,9 +66,11 @@ extern int errno;
 #undef fwrite
 #endif
 
+#ifdef TRY_AGAIN
 #ifndef HAVE_H_ERRNO
 extern int h_errno;
 #endif
+#endif /* TRY_AGAIN */
 
 #include <stdio.h>
 #include <sys/types.h>
@@ -106,9 +110,11 @@ extern unsigned start __asm__ ("start");
 #endif
 #endif
 
+#ifndef USE_CRT_DLL
 #ifndef errno
 extern int errno;
 #endif
+#endif
 
 #ifdef VMS
 #include <rms.h>
@@ -159,7 +165,6 @@ extern int errno;
 
 #if defined (USG) || defined (DGUX)
 #include <sys/utsname.h>
-#include <string.h>
 #ifndef MEMORY_IN_STRING_H
 #include <memory.h>
 #endif
@@ -176,6 +181,7 @@ extern int errno;
 
 extern int quit_char;
 
+#include "keyboard.h"
 #include "frame.h"
 #include "window.h"
 #include "termhooks.h"
@@ -6729,8 +6735,7 @@ opendir (const char *dirname)
 int
 closedir (DIR *dp)
 {
-  free (dp);
-
+  xfree (dp);
   return 0;
 }