/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: 2021-11-11 11:33:24 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20211111113324-3go0vz4d3gy4pc1g
Small cleanup and use _Bool
* Made the macros in defs.h easier to read.
* Use _Bool instead of uint32_t

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
 */
59
59
 
60
60
#ifdef __cplusplus
61
 
#define S_BEGIN_DECLS extern "C" {
62
 
#define S_END_DECLS }
 
61
  #define S_BEGIN_DECLS extern "C" {
 
62
  #define S_END_DECLS }
63
63
#else
64
 
#define S_BEGIN_DECLS
65
 
#define S_END_DECLS
 
64
  #define S_BEGIN_DECLS
 
65
  #define S_END_DECLS
66
66
#endif /*__cplusplus*/
67
67
 
68
68
S_BEGIN_DECLS
92
92
 * Macro to align memory to 16 bit.
93
93
 */
94
94
#if defined(__GNUC__)
95
 
#define S_DEPRECATED __attribute__((deprecated))
96
 
#define S_UNUSED __attribute__((unused))
97
 
#define S_ALIGNED_8 __attribute__((aligned (8)))
98
 
#define S_ALIGNED_16 __attribute__((aligned (16)))
 
95
  #define S_DEPRECATED __attribute__((deprecated))
 
96
  #define S_UNUSED __attribute__((unused))
 
97
  #define S_ALIGNED_8 __attribute__((aligned (8)))
 
98
  #define S_ALIGNED_16 __attribute__((aligned (16)))
99
99
#elif defined(__MSC_VER)
100
 
#define S_DEPRECATED __declspec(deprecated)
101
 
// TODO, check if this rely works in MSVC.
102
 
#define S_UNUSED __pragma(warning(suppress:4100))
103
 
#define S_ALIGNED_8 __declspec(align(8))
104
 
#define S_ALIGNED_16 __declspec(align(16))
 
100
  #define S_DEPRECATED __declspec(deprecated)
 
101
  // TODO, check if this rely works in MSVC.
 
102
  #define S_UNUSED __pragma(warning(suppress:4100))
 
103
  #define S_ALIGNED_8 __declspec(align(8))
 
104
  #define S_ALIGNED_16 __declspec(align(16))
105
105
#else
106
 
#define S_DEPRECATED
107
 
#define S_UNUSED
108
 
#define S_ALIGNED_8
109
 
#define S_ALIGNED_16
 
106
  #define S_DEPRECATED
 
107
  #define S_UNUSED
 
108
  #define S_ALIGNED_8
 
109
  #define S_ALIGNED_16
110
110
#endif
111
111
 
112
112
/**
114
114
 * The stupid atomic value.
115
115
 */
116
116
#if __STDC_NO_ATOMICS__
117
 
#define __S_ATOMIC__ volatile
 
117
  #define __S_ATOMIC__ volatile
118
118
#else
119
 
#define __S_ATOMIC__ __Atomic
 
119
  #define __S_ATOMIC__ __Atomic
120
120
#endif
121
121
 
122
122
/**