Add configure check for sys/time.h

Originally committed to SVN as r4529.
This commit is contained in:
Thomas Goyne 2010-06-16 07:49:35 +00:00
parent d6b68dfb25
commit 61138e9b5d
3 changed files with 14 additions and 11 deletions

View File

@ -341,6 +341,8 @@ AX_OPENMP([], [with_openmp="no"])
AM_CONDITIONAL([HAVE_OPENMP], [test "$with_openmp" != "no"]) AM_CONDITIONAL([HAVE_OPENMP], [test "$with_openmp" != "no"])
AC_SUBST(OPENMP_CXXFLAGS) AC_SUBST(OPENMP_CXXFLAGS)
AC_CHECK_HEADERS([sys/time.h])
############################## ##############################
# Program Support and Features # Program Support and Features

View File

@ -19,17 +19,15 @@
/// @ingroup libaegisub /// @ingroup libaegisub
#ifndef LAGI_PRE #ifndef LAGI_PRE
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#else
# include <time.h>
#endif
#endif // LAGI_PRE #endif // LAGI_PRE
#ifdef _WIN32
#include <time.h>
#else // Unix / OSX
#include <sys/time.h>
#endif // if _WIN32
#pragma once #pragma once
namespace agi { namespace agi {

View File

@ -8,8 +8,11 @@
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <time.h> #ifdef HAVE_SYS_TIME_H
#include <sys/time.h> # include <sys/time.h>
#else
# include <time.h>
#endif
// Windows C // Windows C
#ifdef _WIN32 #ifdef _WIN32