blob: 6aa827a0ddf2c2cbf3750f798446676c947610ee (
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
|
/* Only include this in libembroidery header files around functions to be exported as shared library */
#if defined(API_START_H)
#error Nested inclusion of api-start.h is not allowed
#endif
#define API_START_H
/* Sanity check */
#if defined(LIBEMBROIDERY_SHARED) && defined(LIBEMBROIDERY_STATIC)
#error Library cannot be shared and static at the same time
#endif
/* When building a shared library, use the proper export keyword depending on the compiler */
#if defined(LIBEMBROIDERY_SHARED)
#if defined(__WIN32__)
#define EMB_PUBLIC __declspec(dllexport)
#define EMB_PRIVATE
#else
#if defined(__GNUC__) && __GNUC__ >= 4
#define EMB_PUBLIC __attribute__ ((visibility("default")))
#define EMB_PRIVATE __attribute__ ((visibility("hidden")))
#elif defined(__GNUC__) && __GNUC__ >= 2
#define EMB_PUBLIC __declspec(dllexport)
#define EMB_PRIVATE
#else
#define EMB_PUBLIC
#define EMB_PRIVATE
#endif
#endif
#else
#define EMB_PUBLIC
#define EMB_PRIVATE
#endif
/* Use the C calling convention */
#ifndef EMB_CALL
#if defined(__WIN32__) && !defined(__GNUC__)
#define EMB_CALL __cdecl
#else
#define EMB_CALL
#endif
#endif /* EMBCALL */
/* Disable warnings about unsafe use of fopen, fseek etc */
#if !defined(__GNUC__)
#pragma warning(disable: 4996)
#endif
/* kate: bom off; indent-mode cstyle; indent-width 4; replace-trailing-space-save on; */
|