summaryrefslogtreecommitdiffstats
path: root/src/openal-1-fixes.patch
blob: 1d4b281fed0b46c5e6fa534fe1abd409e04a18d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
This file is part of mingw-cross-env.
See doc/index.html for further information.

Contains ad hoc patches for cross building.

From 0ea58dd9662da43ee86682a35608f913f522aadb Mon Sep 17 00:00:00 2001
From: mingw-cross-env
Date: Fri, 1 Oct 2010 18:44:51 +0200
Subject: [PATCH] cross building workarounds


diff --git a/Alc/ALc.c b/Alc/ALc.c
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -239,34 +239,8 @@
 
 ///////////////////////////////////////////////////////
 // ALC Related helper functions
-#ifdef _WIN32
-static void alc_init(void);
-static void alc_deinit(void);
-
-BOOL APIENTRY DllMain(HANDLE hModule,DWORD ul_reason_for_call,LPVOID lpReserved)
-{
-    (void)lpReserved;
-
-    // Perform actions based on the reason for calling.
-    switch(ul_reason_for_call)
-    {
-        case DLL_PROCESS_ATTACH:
-            DisableThreadLibraryCalls(hModule);
-            alc_init();
-            break;
-
-        case DLL_PROCESS_DETACH:
-            alc_deinit();
-            break;
-    }
-    return TRUE;
-}
-#else
-#ifdef HAVE_GCC_DESTRUCTOR
 static void alc_init(void) __attribute__((constructor));
 static void alc_deinit(void) __attribute__((destructor));
-#endif
-#endif
 
 static void alc_init(void)
 {
diff --git a/include/AL/al.h b/include/AL/al.h
index c409701..f4cf45b 100644
--- a/include/AL/al.h
+++ b/include/AL/al.h
@@ -5,6 +5,10 @@
 extern "C" {
 #endif
 
+#if 1
+ #define AL_API
+ #define AL_APIENTRY
+#else
 #if defined(_WIN32) && !defined(_XBOX)
  #if defined(AL_BUILD_LIBRARY)
   #define AL_API __declspec(dllexport)
@@ -18,6 +22,7 @@ extern "C" {
   #define AL_API extern
  #endif
 #endif
+#endif
 
 #if defined(_WIN32)
  #define AL_APIENTRY __cdecl
diff --git a/include/AL/alc.h b/include/AL/alc.h
index 4e84af4..67f8797 100644
--- a/include/AL/alc.h
+++ b/include/AL/alc.h
@@ -5,6 +5,10 @@
 extern "C" {
 #endif
 
+#if 1
+ #define ALC_API
+ #define ALC_APIENTRY
+#else
 #if defined(_WIN32) && !defined(_XBOX)
  #if defined(AL_BUILD_LIBRARY)
   #define ALC_API __declspec(dllexport)
@@ -18,6 +22,7 @@ extern "C" {
   #define ALC_API extern
  #endif
 #endif
+#endif
 
 #if defined(_WIN32)
  #define ALC_APIENTRY __cdecl
diff --git a/openal.pc.in b/openal.pc.in
index aaf95bb..d78376f 100644
--- a/openal.pc.in
+++ b/openal.pc.in
@@ -7,5 +7,5 @@ Name: OpenAL
 Description: OpenAL is a cross-platform 3D audio API
 Requires: @PKG_CONFIG_REQUIRES@
 Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -l@LIBNAME@ @PKG_CONFIG_LIBS@
+Libs: -L${libdir} -l@LIBNAME@ @PKG_CONFIG_LIBS@ -lwinmm
 Cflags: -I${includedir}
-- 
1.7.1