]> granicus.if.org Git - gc/commitdiff
Fix 'implicit declaration of function' compiler warnings in cord/de
authorIvan Maidanski <ivmai@mail.ru>
Tue, 16 Feb 2016 08:09:34 +0000 (11:09 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 16 Feb 2016 08:09:34 +0000 (11:09 +0300)
* cord/tests/de.c: Include stdlib.h (for "exit" prototype); include
ctype.h unconditionally (for "iscntrl", "isdigit" prototypes); include
unistd.h (for "sleep" prototype) unless WIN32 or MACINTOSH.

cord/tests/de.c

index da2305e296cc770cbb2919edf646edfff9d6e8f8..84aa4de8a148980e003497395af1c45a9c01fad2 100644 (file)
  */
 
 #include <stdio.h>
+#include <stdlib.h> /* for exit() */
+
 #include "gc.h"
 #include "cord.h"
 
 #ifdef THINK_C
 #define MACINTOSH
-#include <ctype.h>
 #endif
+#include <ctype.h>
 
 #if (defined(__BORLANDC__) || defined(__CYGWIN__)) && !defined(WIN32)
     /* If this is DOS or win16, we'll fail anyway.      */
@@ -63,6 +65,7 @@
 #       define COLS 80
 #else
 #  include <curses.h>
+#  include <unistd.h> /* for sleep() */
 #  define de_error(s) { fprintf(stderr, s); sleep(2); }
 #endif
 #include "de_cmds.h"