2010-06-18 06:59:55 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
2011-07-16 05:01:36 +00:00
|
|
|
#define LAGI_PRE
|
|
|
|
|
2010-05-21 01:19:40 +00:00
|
|
|
// Common C
|
2011-07-15 04:04:34 +00:00
|
|
|
#include <cassert>
|
|
|
|
#include <cerrno>
|
2011-07-26 22:24:59 +00:00
|
|
|
#include <climits>
|
2011-07-15 04:04:34 +00:00
|
|
|
#include <cmath>
|
|
|
|
#include <cstdarg>
|
|
|
|
#include <cstdio>
|
|
|
|
#include <cstring>
|
2010-05-21 01:13:36 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <sys/stat.h>
|
2010-06-16 07:49:35 +00:00
|
|
|
#ifdef HAVE_SYS_TIME_H
|
|
|
|
# include <sys/time.h>
|
|
|
|
#else
|
2011-07-26 22:25:10 +00:00
|
|
|
# include <ctime>
|
2010-06-16 07:49:35 +00:00
|
|
|
#endif
|
2010-05-21 01:13:36 +00:00
|
|
|
|
2010-05-21 01:19:40 +00:00
|
|
|
// Windows C
|
2010-05-21 03:07:48 +00:00
|
|
|
#ifdef _WIN32
|
2011-07-26 22:25:10 +00:00
|
|
|
// "Lean and mean" causes windows.h to include less stuff, mostly rarely-used things.
|
|
|
|
// We can't build without being "lean and mean", some of the things included by it has
|
|
|
|
// macros that clash with variable names around Aegisub causing strange build errors.
|
2010-05-21 03:07:48 +00:00
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
|
|
#include <windows.h>
|
2010-05-21 01:19:40 +00:00
|
|
|
#include <io.h>
|
|
|
|
#endif
|
|
|
|
|
2011-02-22 19:03:03 +00:00
|
|
|
// Unix C
|
|
|
|
#ifndef _WIN32
|
2011-02-23 03:29:30 +00:00
|
|
|
#include <sys/statvfs.h>
|
|
|
|
#include <sys/param.h>
|
2011-02-22 19:03:03 +00:00
|
|
|
#endif
|
|
|
|
|
2010-05-21 01:19:40 +00:00
|
|
|
// Common C++
|
2011-07-15 04:04:34 +00:00
|
|
|
#include <algorithm>
|
2010-05-31 20:55:29 +00:00
|
|
|
#include <deque>
|
2010-05-21 01:13:36 +00:00
|
|
|
#include <fstream>
|
2011-12-22 21:10:10 +00:00
|
|
|
#include <iomanip>
|
2010-05-21 01:13:36 +00:00
|
|
|
#include <iostream>
|
2010-07-07 05:24:16 +00:00
|
|
|
#include <iterator>
|
2011-07-15 04:04:34 +00:00
|
|
|
#include <list>
|
2011-02-09 23:56:24 +00:00
|
|
|
#include <locale>
|
2010-05-21 01:13:36 +00:00
|
|
|
#include <map>
|
2011-07-15 04:04:34 +00:00
|
|
|
#include <numeric>
|
2011-12-22 21:10:10 +00:00
|
|
|
#include <set>
|
2010-08-26 18:38:37 +00:00
|
|
|
#include <sstream>
|
2011-12-22 21:10:10 +00:00
|
|
|
#include <stdexcept>
|
2010-08-26 18:38:37 +00:00
|
|
|
#include <string>
|
2011-07-15 04:04:34 +00:00
|
|
|
#include <vector>
|
2010-08-26 18:38:37 +00:00
|
|
|
|
2010-07-07 02:41:46 +00:00
|
|
|
#ifdef _WIN32
|
2010-08-26 18:38:37 +00:00
|
|
|
#include <functional>
|
2010-05-23 06:58:11 +00:00
|
|
|
#include <memory>
|
2010-07-07 02:41:46 +00:00
|
|
|
#else
|
2010-08-26 18:38:37 +00:00
|
|
|
#include <tr1/functional>
|
2010-07-07 02:41:46 +00:00
|
|
|
#include <tr1/memory>
|
|
|
|
#endif
|
2010-05-21 01:13:36 +00:00
|
|
|
|
2010-05-31 20:55:29 +00:00
|
|
|
#ifdef __DEPRECATED // Dodge GCC warnings
|
|
|
|
# undef __DEPRECATED
|
|
|
|
# include <strstream>
|
|
|
|
# define __DEPRECATED
|
|
|
|
#else
|
|
|
|
# include <strstream>
|
|
|
|
#endif
|