/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk

« back to all changes in this revision

Viewing changes to libssts/defs.h

  • Committer: Gustav Hartvigsson
  • Date: 2015-11-14 17:26:42 UTC
  • mfrom: (110 simpletypesystem_trunk)
  • mto: This revision was merged to the branch mainline in revision 111.
  • Revision ID: gustav.hartvigsson@gmail.com-20151114172642-qwrw5593xue49bgj
* Merged from trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 * Put at the beginning and end of headerfiles.
25
25
 */
26
26
#ifdef __cplusplus
27
 
#define BEGIN_DECLS extern "C" {
28
 
#define END_DECLS }
 
27
#define S_BEGIN_DECLS extern "C" {
 
28
#define S_END_DECLS }
29
29
#else
30
 
#define BEGIN_DECLS
31
 
#define END_DECLS
 
30
#define S_BEGIN_DECLS
 
31
#define S_END_DECLS
32
32
#endif /*__cplusplus*/
33
33
 
34
34
#if defined(__GNUC__)
35
 
#define DEPRECATED __attribute__((deprecated))
36
 
#define UNUSED __attribute__((unused))
37
 
#define ALIGNED_8 __attribute__((aligned (8)))
38
 
#define ALIGNED_16 __attribute__((aligned (16)))
39
 
#elif __MSC_VER
40
 
#define DEPRECATED __declspec(deprecated)
 
35
#define S_DEPRECATED __attribute__((deprecated))
 
36
#define S_UNUSED __attribute__((unused))
 
37
#define S_ALIGNED_8 __attribute__((aligned (8)))
 
38
#define S_ALIGNED_16 __attribute__((aligned (16)))
 
39
#elif defined(__MSC_VER)
 
40
#define S_DEPRECATED __declspec(deprecated)
41
41
// TODO, check if this rely works in MSVC.
42
 
#define UNUSED __pragma(warning(suppress:4100))
43
 
#define ALIGNED_8 __declspec(align(8))
44
 
#define ALIGNED_16 __declspec(align(16))
 
42
#define S_UNUSED __pragma(warning(suppress:4100))
 
43
#define S_ALIGNED_8 __declspec(align(8))
 
44
#define S_ALIGNED_16 __declspec(align(16))
45
45
#else
46
 
#define DEPRECATED
47
 
#define UNUSED
48
 
#define ALIGNED_8
49
 
#define ALIGNED_16
 
46
#define S_DEPRECATED
 
47
#define S_UNUSED
 
48
#define S_ALIGNED_8
 
49
#define S_ALIGNED_16
50
50
#endif
51
51
 
52
 
#if defined(__STDC_NO_ATOMICS__)
 
52
#if __STDC_NO_ATOMICS__
 
53
#define __S_ATOMIC__ volatile
 
54
#else
53
55
#define __S_ATOMIC__ __Atomic
 
56
#endif
 
57
 
 
58
#if defined(__GNUC__) && SSTS_BUILDING
 
59
#define S_EXPORTED __attribute__((__visibility__("default")))
 
60
#elif defined(__MSC_VER) && SSTS_BUILDING
 
61
#define S_EXPORTED __declspec(dllexport)
 
62
#elif defined(__MSC_VER)
 
63
#define S_EXPORTED __declspec(dllimport)
54
64
#else
55
 
#define __S_ATOMIC__ volatile
 
65
#define S_EXPORTED
56
66
#endif
57
67
 
58
 
 
59
 
BEGIN_DECLS
 
68
S_BEGIN_DECLS
60
69
 
61
70
#include <stdio.h>
62
71
#include <stdlib.h>
219
228
 *
220
229
 * 
221
230
 */
222
 
static char * STypeName[] UNUSED = {
 
231
static char * STypeName[] S_UNUSED = {
223
232
  "NONE",
224
233
  "INT",
225
234
  "LONG",
275
284
 * @}
276
285
 */
277
286
 
278
 
END_DECLS
 
287
S_END_DECLS
279
288
 
280
289
#endif