summaryrefslogtreecommitdiff
path: root/3rdparty/libconfig/wincompat.h
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-02-16 16:59:09 +0100
committerHaru <haru@dotalux.com>2016-02-17 10:39:53 +0100
commitd38019541508d0efb3477ef4938ea8e939444333 (patch)
tree095efa7663585f56bcf3fa2f641a0e1f633f10d6 /3rdparty/libconfig/wincompat.h
parent1bfb8c1283a0c662902cc8cb94d30159a9bc1183 (diff)
downloadhercules-d38019541508d0efb3477ef4938ea8e939444333.tar.gz
hercules-d38019541508d0efb3477ef4938ea8e939444333.tar.bz2
hercules-d38019541508d0efb3477ef4938ea8e939444333.tar.xz
hercules-d38019541508d0efb3477ef4938ea8e939444333.zip
Updated libconfig to version 1.5
- Based on https://github.com/hyperrealm/libconfig/releases/tag/v1.5 f9f23d7a95608936ea7d839731dbd56f1667b7ed - Improvements that come with this libconfig version: * Don't fclose() a null pointer. * check if file being opened is a directory * added config_set_options(), config_get_options(), setOptions(), getOptions(). * renamed config_setting_lookup_from() to config_setting_lookup() and documented it * floating point precision loss patch * scanner code cleanup * parser code cleanup * bugfix; capture root filename - Parser generated with Bison 2.7 - Scanner generated with flex 2.6 - This includes the windows-compatibility commit 909b06c07e30e456cc63f58d31b0e2f3aad4cc43 from upstream (although not part of version 1.5) Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to '3rdparty/libconfig/wincompat.h')
-rw-r--r--3rdparty/libconfig/wincompat.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/3rdparty/libconfig/wincompat.h b/3rdparty/libconfig/wincompat.h
index 418191972..7e30f0e8d 100644
--- a/3rdparty/libconfig/wincompat.h
+++ b/3rdparty/libconfig/wincompat.h
@@ -1,7 +1,7 @@
/* ----------------------------------------------------------------------------
libconfig - A library for processing structured configuration files
- Copyright (C) 2013-2015 Hercules Dev Team
- Copyright (C) 2005-2010 Mark A Lindner
+ Copyright (C) 2013-2016 Hercules Dev Team
+ Copyright (C) 2005-2014 Mark A Lindner
This file is part of libconfig.
@@ -32,12 +32,19 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
+#define fileno _fileno
+#define fstat _fstat
+#define stat _stat // struct stat for fstat()
#define snprintf _snprintf
-#ifndef __MINGW32__
+#if !defined(__MINGW32__) && _MSC_VER < 1800
#define atoll _atoi64
#define strtoull _strtoui64
-#endif /* __MINGW32__ */
+#endif
+
+#if !defined(S_ISDIR) && defined(S_IFMT) && defined(S_IFDIR)
+#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+#endif
#endif