2010-06-18 08:59:55 +02:00
|
|
|
#include "config.h"
|
|
|
|
|
2011-07-16 07:01:36 +02:00
|
|
|
#define LAGI_PRE
|
|
|
|
|
2010-05-21 03:19:40 +02:00
|
|
|
// Common C
|
2011-07-15 06:04:34 +02:00
|
|
|
#include <cassert>
|
|
|
|
#include <cerrno>
|
2011-07-27 00:24:59 +02:00
|
|
|
#include <climits>
|
2011-07-15 06:04:34 +02:00
|
|
|
#include <cmath>
|
|
|
|
#include <cstdarg>
|
|
|
|
#include <cstdio>
|
|
|
|
#include <cstring>
|
2010-05-21 03:13:36 +02:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <sys/stat.h>
|
2010-06-16 09:49:35 +02:00
|
|
|
#ifdef HAVE_SYS_TIME_H
|
|
|
|
# include <sys/time.h>
|
|
|
|
#else
|
2011-07-27 00:25:10 +02:00
|
|
|
# include <ctime>
|
2010-06-16 09:49:35 +02:00
|
|
|
#endif
|
2010-05-21 03:13:36 +02:00
|
|
|
|
2010-05-21 03:19:40 +02:00
|
|
|
// Windows C
|
2010-05-21 05:07:48 +02:00
|
|
|
#ifdef _WIN32
|
2011-07-27 00:25:10 +02: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 05:07:48 +02:00
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
|
|
#include <windows.h>
|
2010-05-21 03:19:40 +02:00
|
|
|
#include <io.h>
|
|
|
|
#endif
|
|
|
|
|
2011-02-22 20:03:03 +01:00
|
|
|
// Unix C
|
|
|
|
#ifndef _WIN32
|
2011-02-23 04:29:30 +01:00
|
|
|
#include <sys/statvfs.h>
|
|
|
|
#include <sys/param.h>
|
2011-02-22 20:03:03 +01:00
|
|
|
#endif
|
|
|
|
|
2010-05-21 03:19:40 +02:00
|
|
|
// Common C++
|
2011-07-15 06:04:34 +02:00
|
|
|
#include <algorithm>
|
2010-05-31 22:55:29 +02:00
|
|
|
#include <deque>
|
2010-05-21 03:13:36 +02:00
|
|
|
#include <fstream>
|
2011-12-22 22:10:10 +01:00
|
|
|
#include <iomanip>
|
2010-05-21 03:13:36 +02:00
|
|
|
#include <iostream>
|
2010-07-07 07:24:16 +02:00
|
|
|
#include <iterator>
|
2011-07-15 06:04:34 +02:00
|
|
|
#include <list>
|
2011-02-10 00:56:24 +01:00
|
|
|
#include <locale>
|
2010-05-21 03:13:36 +02:00
|
|
|
#include <map>
|
2011-07-15 06:04:34 +02:00
|
|
|
#include <numeric>
|
2011-12-22 22:10:10 +01:00
|
|
|
#include <set>
|
2010-08-26 20:38:37 +02:00
|
|
|
#include <sstream>
|
2011-12-22 22:10:10 +01:00
|
|
|
#include <stdexcept>
|
2010-08-26 20:38:37 +02:00
|
|
|
#include <string>
|
2011-07-15 06:04:34 +02:00
|
|
|
#include <vector>
|
2010-08-26 20:38:37 +02:00
|
|
|
|
2010-07-07 04:41:46 +02:00
|
|
|
#ifdef _WIN32
|
2010-08-26 20:38:37 +02:00
|
|
|
#include <functional>
|
2010-05-23 08:58:11 +02:00
|
|
|
#include <memory>
|
2010-07-07 04:41:46 +02:00
|
|
|
#else
|
2010-08-26 20:38:37 +02:00
|
|
|
#include <tr1/functional>
|
2010-07-07 04:41:46 +02:00
|
|
|
#include <tr1/memory>
|
|
|
|
#endif
|
2010-05-21 03:13:36 +02:00
|
|
|
|
2010-05-31 22:55:29 +02:00
|
|
|
#ifdef __DEPRECATED // Dodge GCC warnings
|
|
|
|
# undef __DEPRECATED
|
|
|
|
# include <strstream>
|
|
|
|
# define __DEPRECATED
|
|
|
|
#else
|
|
|
|
# include <strstream>
|
|
|
|
#endif
|