libosmocore
1.10.0.64-ff3d
Osmocom core library
defs.h
Go to the documentation of this file.
1
5
#pragma once
6
19
#if defined __GNUC__ && defined __GNUC_MINOR__
20
# define OSMO_GNUC_PREREQ(maj, min) \
21
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
22
#else
23
# define OSMO_GNUC_PREREQ(maj, min) 0
24
#endif
25
28
#if defined(__clang__)
29
# define _OSMO_HAS_ATTRIBUTE_DEPRECATED __has_attribute(deprecated)
30
# define _OSMO_HAS_ATTRIBUTE_DEPRECATED_WITH_MESSAGE __has_extension(attribute_deprecated_with_message)
31
#elif defined(__GNUC__)
32
# define _OSMO_HAS_ATTRIBUTE_DEPRECATED 1
33
# define _OSMO_HAS_ATTRIBUTE_DEPRECATED_WITH_MESSAGE OSMO_GNUC_PREREQ(4,5)
34
#endif
35
36
#if _OSMO_HAS_ATTRIBUTE_DEPRECATED_WITH_MESSAGE
37
# define OSMO_DEPRECATED(text) __attribute__((__deprecated__(text)))
38
#elif _OSMO_HAS_ATTRIBUTE_DEPRECATED
39
# define OSMO_DEPRECATED(text) __attribute__((__deprecated__))
40
#else
41
# define OSMO_DEPRECATED(text)
42
#endif
43
44
#if BUILDING_LIBOSMOCORE
45
# define OSMO_DEPRECATED_OUTSIDE_LIBOSMOCORE
46
# define OSMO_DEPRECATED_OUTSIDE(text)
47
#else
48
# define OSMO_DEPRECATED_OUTSIDE_LIBOSMOCORE OSMO_DEPRECATED("For internal use inside libosmocore only."
)
49
# define OSMO_DEPRECATED_OUTSIDE(text) OSMO_DEPRECATED(text)
50
#endif
51
52
#undef _OSMO_HAS_ATTRIBUTE_DEPRECATED_WITH_MESSAGE
53
#undef _OSMO_HAS_ATTRIBUTE_DEPRECATED
54
include
osmocom
core
defs.h
Generated by
1.9.4