Include <stdlib.h> if available. Declare errno only if it is not a macro.
authorAndreas Schwab <schwab@suse.de>
Mon, 30 Aug 1999 16:19:57 +0000 (16:19 +0000)
committerAndreas Schwab <schwab@suse.de>
Mon, 30 Aug 1999 16:19:57 +0000 (16:19 +0000)
src/sysdep.c

index af84c34..8c0e492 100644 (file)
@@ -21,11 +21,11 @@ Boston, MA 02111-1307, USA.  */
 
 #include <signal.h>
 #include <setjmp.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
 
 #include <config.h>
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif
 #include "lisp.h"
 #include "blockinput.h"
 #undef NULL
@@ -101,7 +101,9 @@ extern unsigned start __asm__ ("start");
 #endif
 #endif
 
+#ifndef errno
 extern int errno;
+#endif
 
 #ifdef VMS
 #include <rms.h>