2 Copyright (C) 2009 John Emmas
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 #ifndef __msvc_libardour_h__
20 #define __msvc_libardour_h__
24 #ifdef LIBARDOUR_IS_IN_WIN_STATIC_LIB // #define if your project uses libardour (under Windows) as a static library
25 #define LIBARDOUR_IS_IN_WINDLL 0
28 #if !defined(LIBARDOUR_IS_IN_WINDLL)
29 #if defined(COMPILER_MSVC) || defined(COMPILER_MINGW)
30 // If you need '__declspec' compatibility, add extra compilers to the above as necessary
31 #define LIBARDOUR_IS_IN_WINDLL 1
33 #define LIBARDOUR_IS_IN_WINDLL 0
37 #if LIBARDOUR_IS_IN_WINDLL && !defined(LIBARDOUR_API)
38 #if defined(BUILDING_LIBARDOUR)
39 #define LIBARDOUR_API __declspec(dllexport)
40 #define LIBARDOUR_APICALLTYPE __stdcall
41 #elif defined(COMPILER_MSVC) || defined(COMPILER_MINGW) // Probably needs Cygwin too, at some point
42 #define LIBARDOUR_API __declspec(dllimport)
43 #define LIBARDOUR_APICALLTYPE __stdcall
45 #error "Attempting to define __declspec with an incompatible compiler !"
47 #elif !defined(LIBARDOUR_API)
48 // Other compilers / platforms could be accommodated here
50 #define LIBARDOUR_APICALLTYPE
57 #define PATH_MAX _MAX_PATH
64 #endif /* __cplusplus */
66 // LIBARDOUR_API char* LIBARDOUR_APICALLTYPE placeholder_for_non_msvc_specific_function(s);
70 #endif /* __cplusplus */
79 #define __THROW throw()
81 #include <ardourext/sys/time.h>
87 #endif /* __cplusplus */
89 LIBARDOUR_API int LIBARDOUR_APICALLTYPE symlink(const char *dest, const char *shortcut, const char *working_directory = 0);
90 LIBARDOUR_API int LIBARDOUR_APICALLTYPE readlink(const char *__restrict shortcut, char *__restrict buf, size_t bufsize);
94 #endif /* __cplusplus */
98 #endif // COMPILER_MSVC
99 #endif // __mavc_libardour_h__