tWarning of implicit 'exit' function removed by including stdlib.h into dopeos.c - vaccinewars - be a doctor and try to vaccinate the world (HTM) git clone git://src.adamsgaard.dk/vaccinewars (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit b09cd2804b9450424e2b1f257c70fdf2f3d0c456 (DIR) parent 3d4bebd47358b56dfb6bf56587fb89a7195c4a74 (HTM) Author: Ben Webb <ben@salilab.org> Date: Mon, 8 Jan 2001 20:40:24 +0000 Warning of implicit 'exit' function removed by including stdlib.h into dopeos.c Diffstat: M config.h.in | 3 +++ M configure | 2 +- M configure.in | 2 +- M src/dopeos.c | 6 +++++- 4 files changed, 10 insertions(+), 3 deletions(-) --- (DIR) diff --git a/config.h.in b/config.h.in t@@ -153,6 +153,9 @@ /* Define if you have the <nl_types.h> header file. */ #undef HAVE_NL_TYPES_H +/* Define if you have the <stdlib.h> header file. */ +#undef HAVE_STDLIB_H + /* Define if you have the <string.h> header file. */ #undef HAVE_STRING_H (DIR) diff --git a/configure b/configure t@@ -3800,7 +3800,7 @@ EOF fi -for ac_hdr in fcntl.h sys/time.h unistd.h +for ac_hdr in fcntl.h sys/time.h unistd.h stdlib.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 (DIR) diff --git a/configure.in b/configure.in t@@ -99,7 +99,7 @@ fi dnl Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h) +AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h stdlib.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_HEADER_TIME (DIR) diff --git a/src/dopeos.c b/src/dopeos.c t@@ -316,6 +316,10 @@ void SetReuse(SOCKET sock) { #include <unistd.h> #endif +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + int Width,Depth; #ifdef CURSES_CLIENT t@@ -354,7 +358,7 @@ void MicroSleep(int microsec) { #if HAVE_SELECT struct timeval tv; tv.tv_sec=0; - tv.tv_usec=100000; + tv.tv_usec=microsec; bselect(0,NULL,NULL,NULL,&tv); #endif }