GEOS 3.14.0dev
export.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2009 Ragi Y. Burhum <ragi@burhum.com>
7 *
8 * This is free software; you can redistribute and/or modify it under
9 * the terms of the GNU Lesser General Public Licence as published
10 * by the Free Software Foundation.
11 * See the COPYING file for more information.
12 *
13 **********************************************************************/
14#pragma once
15
16#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || \
17 defined( __BCPLUSPLUS__) || defined( __MWERKS__)
18
19# if defined(GEOS_DLL_EXPORT)
20# define GEOS_DLL __declspec(dllexport)
21# elif defined(GEOS_DLL_IMPORT)
22# define GEOS_DLL extern __declspec(dllimport)
23# else
24# define GEOS_DLL
25# endif
26#else
27# define GEOS_DLL
28#endif
29
30
31#if defined(_MSC_VER)
32# pragma warning(disable: 4251) // identifier : class type needs to have dll-interface to be used by clients of class type2
33#endif
34
35
36/**********************************************************************
37 * Portability macros
38 **********************************************************************/
39
40#ifdef _MSC_VER
41#include <sal.h>
42#define GEOS_PRINTF_FORMAT _Printf_format_string_
43#define GEOS_PRINTF_FORMAT_ATTR(format_param, dots_param)
44#elif __GNUC__
45#define GEOS_PRINTF_FORMAT
46#define GEOS_PRINTF_FORMAT_ATTR(format_param, dots_param) \
47 __attribute__((format(printf, format_param, dots_param)))
48#else
49#define GEOS_PRINTF_FORMAT
50#define GEOS_PRINTF_FORMAT_ATTR(format_param, dots_param)
51#endif