From 7e83443c3e52cd4471d62140c1cfa75af5eb1c91 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Tue, 1 Jun 2010 08:03:17 +0000 Subject: [PATCH] Fix the Windows build, there are a couple of things to note: * I rebroke the stdout logger I'll fix that in unix. * There is a new header libaegisub/types.h which is a temp solution until I sort out something more realistic. It's too early to tell what the proper solution will be. Originally committed to SVN as r4394. --- aegisub/libaegisub/common/log.cpp | 2 +- aegisub/libaegisub/include/libaegisub/log.h | 1 + aegisub/libaegisub/include/libaegisub/types.h | 35 +++++++++++++++++++ aegisub/libaegisub/include/libaegisub/util.h | 1 + 4 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 aegisub/libaegisub/include/libaegisub/types.h diff --git a/aegisub/libaegisub/common/log.cpp b/aegisub/libaegisub/common/log.cpp index 02179c30d..e2854173e 100644 --- a/aegisub/libaegisub/common/log.cpp +++ b/aegisub/libaegisub/common/log.cpp @@ -20,7 +20,7 @@ #include -#include +#include #include #include "libaegisub/log.h" diff --git a/aegisub/libaegisub/include/libaegisub/log.h b/aegisub/libaegisub/include/libaegisub/log.h index 51333cac9..601c79e66 100644 --- a/aegisub/libaegisub/include/libaegisub/log.h +++ b/aegisub/libaegisub/include/libaegisub/log.h @@ -33,6 +33,7 @@ #include #endif //#include +#include // These macros below aren't a perm solution, it will depend on how annoying they are through // actual usage, and also depends on msvc support. diff --git a/aegisub/libaegisub/include/libaegisub/types.h b/aegisub/libaegisub/include/libaegisub/types.h new file mode 100644 index 000000000..dc013e83e --- /dev/null +++ b/aegisub/libaegisub/include/libaegisub/types.h @@ -0,0 +1,35 @@ +// Copyright (c) 2010, Amar Takhar +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// +// $Id$ + +/// @file types.h +/// @brief Platform specific types. +/// @ingroup libaegisub + +#ifndef LAGI_PRE +#endif // LAGI_PRE + +#pragma once + +namespace agi { + +#if defined(_WIN32) +typedef struct timeval { + long tv_sec; + long tv_usec; +} timeval; +#endif + +} // namespace agi diff --git a/aegisub/libaegisub/include/libaegisub/util.h b/aegisub/libaegisub/include/libaegisub/util.h index 6667f80cd..0e479df80 100644 --- a/aegisub/libaegisub/include/libaegisub/util.h +++ b/aegisub/libaegisub/include/libaegisub/util.h @@ -25,6 +25,7 @@ #endif // LAGI_PRE #include +#include namespace agi { namespace util {