libFirm
begin.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5 
11 #ifndef FIRM_BEGIN_H
12 #define FIRM_BEGIN_H
13 
19 #ifdef FIRM_DLL
20  #ifdef FIRM_BUILD
21  #ifdef _WIN32
22  #define FIRM_API extern __declspec(dllexport)
23  #else
24  #define FIRM_API extern __attribute__((visibility("default")))
25  #endif
26  #else
27  #ifdef _WIN32
28  #define FIRM_API extern __declspec(dllimport)
29  #else
30  #define FIRM_API extern
31  #endif
32  #endif
33 #else
34  #define FIRM_API extern
35 #endif
36 
37 #endif
38 
39 /* mark declarations as C function (note that we always need this,
40  * so don't put it in the include guard) */
41 #ifdef __cplusplus
42 extern "C" {
43 #endif