LMMS
Loading...
Searching...
No Matches
tap_platform.h
Go to the documentation of this file.
1/*
2 This program is free software; you can redistribute it and/or modify
3 it under the terms of the GNU General Public License as published by
4 the Free Software Foundation; either version 2 of the License, or
5 (at your option) any later version.
6
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
11
12 You should have received a copy of the GNU General Public License
13 along with this program; if not, write to the Free Software
14 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
15*/
16
17#ifndef TAP_PLATFORM_H
18#define TAP_PLATFORM_H
19
20
21#ifndef _USE_MATH_DEFINES
22#define _USE_MATH_DEFINES
23#endif
24#include <math.h>
25
26#ifdef _MSC_VER
27
28#include <Windows.h>
29#define __CONSTRUCTOR
30#define __DESTRUCTOR
31#define __INIT_FINI(initfn, finifn) \
32BOOL APIENTRY DllMain(HMODULE hModule, DWORD ulReason, LPVOID lpReserved) \
33{ \
34 switch (ulReason) \
35 { \
36 case DLL_PROCESS_ATTACH: \
37 initfn(); \
38 break; \
39 case DLL_PROCESS_DETACH: \
40 finifn(); \
41 break; \
42 } \
43 return TRUE; \
44}
45
46#else /* ! _MSC_VER */
47
48#define __CONSTRUCTOR __attribute__((constructor))
49#define __DESTRUCTOR __attribute__((destructor))
50#define __INIT_FINI(init, fini)
51
52#endif /* _MSC_VER */
53
54#endif