]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Move header file inclusion logic and definition of timeval
authorYang Tse <yangsita@gmail.com>
Tue, 20 Feb 2007 12:12:27 +0000 (12:12 +0000)
committerYang Tse <yangsita@gmail.com>
Tue, 20 Feb 2007 12:12:27 +0000 (12:12 +0000)
struct for platforms that don't have it to setup_once.h

ares/setup_once.h
lib/setup_once.h
lib/timeval.h
tests/libtest/testutil.c
tests/libtest/testutil.h

index 41b42e9008e2b4a98c3d58bdc4fe71f4af1622b5..32d8293eee8ff730f64fb3948f71426b75f60316 100644 (file)
  * Inclusion of common header files.
  */
 
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include <ctype.h>
 #include <errno.h>
 
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#ifdef TIME_WITH_SYS_TIME
+#include <time.h>
+#endif
+#else
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+#endif
+
+#ifdef WIN32
+#include <io.h>
+#include <fcntl.h>
+#endif
+
+
+/*
+ * Definition of timeval struct for platforms that don't have it.
+ */
+
+#ifndef HAVE_STRUCT_TIMEVAL
+struct timeval {
+ long tv_sec;
+ long tv_usec;
+};
+#endif
+
 
 /*
  * If we have the MSG_NOSIGNAL define, make sure we use
index 2cf4ebea40995496a256c7037533eda490c5757b..190b69ed71334d563839c0848d36b9b593905443 100644 (file)
  * Inclusion of common header files.
  */
 
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include <ctype.h>
 #include <errno.h>
 
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#ifdef TIME_WITH_SYS_TIME
+#include <time.h>
+#endif
+#else
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+#endif
+
+#ifdef WIN32
+#include <io.h>
+#include <fcntl.h>
+#endif
+
+
+/*
+ * Definition of timeval struct for platforms that don't have it.
+ */
+
+#ifndef HAVE_STRUCT_TIMEVAL
+struct timeval {
+ long tv_sec;
+ long tv_usec;
+};
+#endif
+
 
 /*
  * If we have the MSG_NOSIGNAL define, make sure we use
index 6c55a71ba3ff990147b4e8e30dab4c821cc06ff0..565409a2f2e6f3f5ec4fe62a11861c6cb7c5ed37 100644 (file)
 
 #include "setup.h"
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
-#include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#endif
-
-#ifndef HAVE_STRUCT_TIMEVAL
-struct timeval {
- long tv_sec;
- long tv_usec;
-};
-#endif
-
 struct timeval curlx_tvnow(void);
 
 /*
index dc0211026478d2fcc1f1f0740789a07a7654f89d..146660c71342bcd6c216c5738a36d26363f401e5 100644 (file)
@@ -21,6 +21,8 @@
  * $Id$
  ***************************************************************************/
 
+#include "setup.h"
+
 #include "testutil.h"
 
 #ifndef HAVE_GETTIMEOFDAY
index e248c1ebe7c0f43f04c5669ab6586bcf6d4f35fa..6f7839d245dcef17fbc63d50a3cf3f0bcb90ceef 100644 (file)
 
 #include "setup.h"
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
-#include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#endif
-
-#ifndef HAVE_STRUCT_TIMEVAL
-struct timeval {
- long tv_sec;
- long tv_usec;
-};
-#endif
 
 struct timeval tutil_tvnow(void);