Go to the documentation of this file.
25 #ifndef __CDIO_TYPES_H__
26 #define __CDIO_TYPES_H__
32 #ifndef EXTERNAL_LIBCDIO_CONFIG_H
33 #define EXTERNAL_LIBCDIO_CONFIG_H
34 #include <cdio/cdio_config.h>
37 #ifdef HAVE_SYS_TYPES_H
38 #include <sys/types.h>
43 #if defined(HAVE_SYS_TYPES_H)
44 #include <sys/types.h>
47 #if defined(HAVE_STDINT_H)
49 #elif defined(HAVE_INTTYPES_H)
50 # include <inttypes.h>
51 #elif defined(AMIGA) || defined(__linux__)
52 typedef u_int8_t uint8_t;
53 typedef u_int16_t uint16_t;
54 typedef u_int32_t uint32_t;
55 typedef u_int64_t uint64_t;
75 # define UINT16_C(c) c ## U
79 # if defined (SIZEOF_INT) && SIZEOF_INT == 4
80 # define UINT32_C(c) c ## U
81 # elif defined (SIZEOF_LONG) && SIZEOF_LONG == 4
82 # define UINT32_C(c) c ## UL
84 # define UINT32_C(c) c ## U
89 # if defined (SIZEOF_LONG) && SIZEOF_LONG == 8
90 # define UINT64_C(c) c ## UL
91 # elif defined (SIZEOF_INT) && SIZEOF_INT == 8
92 # define UINT64_C(c) c ## U
94 # define UINT64_C(c) c ## ULL
99 # if defined (SIZEOF_LONG) && SIZEOF_LONG == 8
100 # define INT64_C(c) c ## L
101 # elif defined (SIZEOF_INT) && SIZEOF_INT == 8
102 # define INT64_C(c) c
104 # define INT64_C(c) c ## LL
109 # if defined(HAVE_STDBOOL_H)
110 # include <stdbool.h>
116 # define bool uint8_t
122 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
123 #define GNUC_PRINTF( format_idx, arg_idx ) \
124 __attribute__((format (printf, format_idx, arg_idx)))
125 #define GNUC_SCANF( format_idx, arg_idx ) \
126 __attribute__((format (scanf, format_idx, arg_idx)))
127 #define GNUC_FORMAT( arg_idx ) \
128 __attribute__((format_arg (arg_idx)))
129 #define GNUC_NORETURN \
130 __attribute__((noreturn))
132 __attribute__((const))
133 #define GNUC_UNUSED \
134 __attribute__((unused))
135 #define GNUC_PACKED \
136 __attribute__((packed))
138 #define GNUC_PRINTF( format_idx, arg_idx )
139 #define GNUC_SCANF( format_idx, arg_idx )
140 #define GNUC_FORMAT( arg_idx )
141 #define GNUC_NORETURN
147 #if defined(__GNUC__)
149 # define PRAGMA_BEGIN_PACKED
150 # define PRAGMA_END_PACKED
151 #elif defined(HAVE_ISOC99_PRAGMA)
153 # define PRAGMA_BEGIN_PACKED _Pragma("pack(1)")
154 # define PRAGMA_END_PACKED _Pragma("pack()")
157 # define PRAGMA_BEGIN_PACKED
158 # define PRAGMA_END_PACKED
164 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 95)
165 # define GNUC_LIKELY(x) __builtin_expect((x),true)
166 # define GNUC_UNLIKELY(x) __builtin_expect((x),false)
168 # define GNUC_LIKELY(x) (x)
169 # define GNUC_UNLIKELY(x) (x)
173 # define NULL ((void*) 0)
177 #define __cd_offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
201 #define msf_t_SIZEOF 3
218 #if defined(__GNUC__)
259 #define CDIO_INVALID_SESSION 0xFF
266 #define CDIO_INVALID_LBA -45301
271 #define CDIO_INVALID_LSN CDIO_INVALID_LBA
277 #define CDIO_MCN_SIZE 13
289 #define CDIO_ISRC_SIZE 12
Generated for libcdio by
1.8.1.1