openshot-audio  0.1.2
juce_BasicNativeHeaders.h
Go to the documentation of this file.
1 /*
2  ==============================================================================
3 
4  This file is part of the juce_core module of the JUCE library.
5  Copyright (c) 2015 - ROLI Ltd.
6 
7  Permission to use, copy, modify, and/or distribute this software for any purpose with
8  or without fee is hereby granted, provided that the above copyright notice and this
9  permission notice appear in all copies.
10 
11  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
12  TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
13  NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
15  IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
16  CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 
18  ------------------------------------------------------------------------------
19 
20  NOTE! This permissive ISC license applies ONLY to files within the juce_core module!
21  All other JUCE modules are covered by a dual GPL/commercial license, so if you are
22  using any other modules, be sure to check that you also comply with their license.
23 
24  For more details, visit www.juce.com
25 
26  ==============================================================================
27 */
28 
29 #ifndef JUCE_BASICNATIVEHEADERS_H_INCLUDED
30 #define JUCE_BASICNATIVEHEADERS_H_INCLUDED
31 
32 #include "../system/juce_TargetPlatform.h"
33 #undef T
34 
35 //==============================================================================
36 #if JUCE_MAC || JUCE_IOS
37 
38  #if JUCE_IOS
39  #import <Foundation/Foundation.h>
40  #import <UIKit/UIKit.h>
41  #import <CoreData/CoreData.h>
42  #import <MobileCoreServices/MobileCoreServices.h>
43  #include <sys/fcntl.h>
44  #else
45  #define Point CarbonDummyPointName
46  #define Component CarbonDummyCompName
47  #import <Cocoa/Cocoa.h>
48  #import <CoreAudio/HostTime.h>
49  #undef Point
50  #undef Component
51  #include <sys/dir.h>
52  #endif
53 
54  #include <sys/socket.h>
55  #include <sys/sysctl.h>
56  #include <sys/stat.h>
57  #include <sys/param.h>
58  #include <sys/mount.h>
59  #include <sys/utsname.h>
60  #include <sys/mman.h>
61  #include <fnmatch.h>
62  #include <utime.h>
63  #include <dlfcn.h>
64  #include <ifaddrs.h>
65  #include <net/if_dl.h>
66  #include <mach/mach_time.h>
67  #include <mach-o/dyld.h>
68  #include <objc/runtime.h>
69  #include <objc/objc.h>
70  #include <objc/message.h>
71 
72 //==============================================================================
73 #elif JUCE_WINDOWS
74  #if JUCE_MSVC
75  #ifndef _CPPRTTI
76  #error "You're compiling without RTTI enabled! This is needed for a lot of JUCE classes, please update your compiler settings!"
77  #endif
78 
79  #ifndef _CPPUNWIND
80  #error "You're compiling without exceptions enabled! This is needed for a lot of JUCE classes, please update your compiler settings!"
81  #endif
82 
83  #pragma warning (push)
84  #pragma warning (disable : 4100 4201 4514 4312 4995)
85  #endif
86 
87  #define STRICT 1
88  #define WIN32_LEAN_AND_MEAN 1
89  #if JUCE_MINGW
90  #define _WIN32_WINNT 0x0501
91  #else
92  #define _WIN32_WINNT 0x0600
93  #endif
94  #define _UNICODE 1
95  #define UNICODE 1
96  #ifndef _WIN32_IE
97  #define _WIN32_IE 0x0500
98  #endif
99 
100  #include <windows.h>
101  #include <shellapi.h>
102  #include <tchar.h>
103  #include <stddef.h>
104  #include <ctime>
105  #include <wininet.h>
106  #include <nb30.h>
107  #if JUCE_MINGW
108  #include <winsock2.h>
109  #endif
110  #include <iphlpapi.h>
111  #include <mapi.h>
112  #include <float.h>
113  #include <process.h>
114  #include <shlobj.h>
115  #include <shlwapi.h>
116  #include <mmsystem.h>
117 
118  #if JUCE_MINGW
119  #include <basetyps.h>
120  #else
121  #include <crtdbg.h>
122  #include <comutil.h>
123  #endif
124 
125  #undef PACKED
126 
127  #if JUCE_MSVC
128  #pragma warning (pop)
129  #pragma warning (4: 4511 4512 4100 /*4365*/) // (enable some warnings that are turned off in VC8)
130  #endif
131 
132  #if JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
133  #pragma comment (lib, "kernel32.lib")
134  #pragma comment (lib, "user32.lib")
135  #pragma comment (lib, "wininet.lib")
136  #pragma comment (lib, "advapi32.lib")
137  #pragma comment (lib, "ws2_32.lib")
138  #pragma comment (lib, "version.lib")
139  #pragma comment (lib, "shlwapi.lib")
140  #pragma comment (lib, "winmm.lib")
141 
142  #ifdef _NATIVE_WCHAR_T_DEFINED
143  #ifdef _DEBUG
144  #pragma comment (lib, "comsuppwd.lib")
145  #else
146  #pragma comment (lib, "comsuppw.lib")
147  #endif
148  #else
149  #ifdef _DEBUG
150  #pragma comment (lib, "comsuppd.lib")
151  #else
152  #pragma comment (lib, "comsupp.lib")
153  #endif
154  #endif
155  #endif
156 
157  /* Used with DynamicLibrary to simplify importing functions from a win32 DLL.
158 
159  dll: the DynamicLibrary object
160  functionName: function to import
161  localFunctionName: name you want to use to actually call it (must be different)
162  returnType: the return type
163  params: list of params (bracketed)
164  */
165  #define JUCE_LOAD_WINAPI_FUNCTION(dll, functionName, localFunctionName, returnType, params) \
166  typedef returnType (WINAPI *type##localFunctionName) params; \
167  type##localFunctionName localFunctionName = (type##localFunctionName) dll.getFunction (#functionName);
168 
169 //==============================================================================
170 #elif JUCE_LINUX
171  #include <sched.h>
172  #include <pthread.h>
173  #include <sys/time.h>
174  #include <errno.h>
175  #include <sys/stat.h>
176  #include <sys/dir.h>
177  #include <sys/ptrace.h>
178  #include <sys/vfs.h>
179  #include <sys/wait.h>
180  #include <sys/mman.h>
181  #include <fnmatch.h>
182  #include <utime.h>
183  #include <pwd.h>
184  #include <fcntl.h>
185  #include <dlfcn.h>
186  #include <netdb.h>
187  #include <arpa/inet.h>
188  #include <netinet/in.h>
189  #include <sys/types.h>
190  #include <sys/ioctl.h>
191  #include <sys/socket.h>
192  #include <net/if.h>
193  #include <sys/sysinfo.h>
194  #include <sys/file.h>
195  #include <sys/prctl.h>
196  #include <signal.h>
197  #include <stddef.h>
198 
199 //==============================================================================
200 #elif JUCE_ANDROID
201  #include <jni.h>
202  #include <pthread.h>
203  #include <sched.h>
204  #include <sys/time.h>
205  #include <utime.h>
206  #include <errno.h>
207  #include <fcntl.h>
208  #include <dlfcn.h>
209  #include <sys/stat.h>
210  #include <sys/statfs.h>
211  #include <sys/ptrace.h>
212  #include <sys/sysinfo.h>
213  #include <sys/mman.h>
214  #include <pwd.h>
215  #include <dirent.h>
216  #include <fnmatch.h>
217  #include <sys/wait.h>
218 #endif
219 
220 // Need to clear various moronic redefinitions made by system headers..
221 #undef max
222 #undef min
223 #undef direct
224 #undef check
225 
226 #endif // JUCE_BASICNATIVEHEADERS_H_INCLUDED