aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/compat.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-15 03:29:56 -0800
committerChris Robinson <[email protected]>2018-11-15 03:29:56 -0800
commitb7daddb564cfa551c9dcc983bdc0e6bc53cc67d3 (patch)
tree9dd08fb0d692ac6a2287a3581d0c61afa2a27e41 /Alc/compat.h
parent8f771a03877332f0dcbd6350b57c354a0c5254d3 (diff)
Try to clean up compat.h's macro block spaghetti a bit
Diffstat (limited to 'Alc/compat.h')
-rw-r--r--Alc/compat.h41
1 files changed, 11 insertions, 30 deletions
diff --git a/Alc/compat.h b/Alc/compat.h
index 31c84d48..18ba8da9 100644
--- a/Alc/compat.h
+++ b/Alc/compat.h
@@ -1,22 +1,13 @@
#ifndef AL_COMPAT_H
#define AL_COMPAT_H
-#include "alstring.h"
-
#ifdef __cplusplus
-extern "C" {
-#endif
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-#define HAVE_DYNLOAD 1
-
-#ifdef __cplusplus
-} // extern "C"
-
#include <array>
#include <string>
#include <fstream>
@@ -210,18 +201,9 @@ public:
} // namespace al
-extern "C" {
-#endif /* __cplusplus */
-
-#else
-
-#if defined(HAVE_DLFCN_H)
#define HAVE_DYNLOAD 1
-#endif
-
-#ifdef __cplusplus
-} // extern "C"
+#else /* _WIN32 */
#include <fstream>
@@ -232,24 +214,23 @@ using ifstream = std::ifstream;
} // namespace al
-extern "C" {
-#endif /* __cplusplus */
-
-#endif
-
-#ifdef HAVE_DYNLOAD
-void *LoadLib(const char *name);
-void CloseLib(void *handle);
-void *GetSymbol(void *handle, const char *name);
+#if defined(HAVE_DLFCN_H)
+#define HAVE_DYNLOAD 1
#endif
-#ifdef __cplusplus
-} /* extern "C" */
+#endif /* _WIN32 */
#include <string>
struct PathNamePair { std::string path, fname; };
PathNamePair GetProcBinary(void);
+
+#ifdef HAVE_DYNLOAD
+void *LoadLib(const char *name);
+void CloseLib(void *handle);
+void *GetSymbol(void *handle, const char *name);
#endif
+#endif /* __cplusplus */
+
#endif /* AL_COMPAT_H */