libptpmgmt  1.4
libptpmgmt library that provides the functionality of linuxptp pmc
name.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: LGPL-3.0-or-later
2  SPDX-FileCopyrightText: Copyright © 2022 Erez Geva <ErezGeva2@gmail.com> */
3 
13 #ifndef __PTPMGMT_NAME_H
14 #define __PTPMGMT_NAME_H
15 
18 #ifdef __cplusplus
19 /* system headers used by all modules */
20 #include <string>
21 #include <cstdint>
22 #include <cstring>
23 #include <cstdio>
24 
25 #ifndef __PTPMGMT_NAMESPACE_BEGIN
27 #define __PTPMGMT_NAMESPACE_BEGIN namespace ptpmgmt {
29 #define __PTPMGMT_NAMESPACE_END };
30 #endif /* __PTPMGMT_NAMESPACE_BEGIN */
31 #if __cplusplus >= 201400L /* C++14 */
32 #define __PTPMGMT_DEPRECATED(_func, _body) [[deprecated]] _func { _body; }
33 #define __PTPMGMT_DEPRECATED_DEC(_func) [[deprecated]] _func
34 #endif
35 
36 #else /* __cplusplus */
37 
38 #include <stdint.h>
39 #include <string.h>
40 #include <stdio.h>
41 
42 #define __PTPMGMT_NAMESPACE_BEGIN
43 #define __PTPMGMT_NAMESPACE_END
44 
45 #endif /* __cplusplus */
46 
48 #ifndef __PTPMGMT_DEPRECATED
49 #ifdef __GNUC__
50 #define __PTPMGMT_DEPRECATED(_func, _body)\
51  _func __attribute__ ((deprecated)) { _body; }
52 #define __PTPMGMT_DEPRECATED_DEC(_func) _func __attribute__ ((deprecated))
53 #elif defined(_MSC_VER)
54 #define __PTPMGMT_DEPRECATED(_func, _body) __declspec(deprecated) _func { _body; }
55 #define __PTPMGMT_DEPRECATED_DEC(_func) __declspec(deprecated) _func
56 #else
57 #define __PTPMGMT_DEPRECATED(_func, _body) _func { _body; }
58 #define __PTPMGMT_DEPRECATED_DEC(_func) _func
59 #endif
60 #endif /* __PTPMGMT_DEPRECATED */
61 
62 /*
63  * POSIX and GNU probed headers and features
64  *
65  * The Open Group Base Specifications Issue 6
66  * IEEE Std 1003.1, 2004 Edition
67  * based url: https://pubs.opengroup.org/onlinepubs/009695399/basedefs/
68  */
69 
70 /* Defined if we have the POSIX <unistd.h> header.
71  * Standard symbolic constants and types.
72  * url: <base>/unistd.h.html
73  */
74 #define __PTPMGMT_HAVE_UNISTD_H 1
75 
76 /* Defined if we have the POSIX <sys/types.h> header.
77  * Data types.
78  * url: <base>/sys/types.h.html
79  */
80 #define __PTPMGMT_HAVE_SYS_TYPES_H 1
81 
82 /* Defined if we have the POSIX <sys/un.h> header.
83  * Definitions for UNIX domain sockets.
84  * url: <base>/sys/un.h.html
85  */
86 #define __PTPMGMT_HAVE_SYS_UN_H 1
87 
88 /* Defined if we have the POSIX <netinet/in.h> header.
89  * Internet address family.
90  * url: <base>/netinet/in.h.html
91  */
92 #define __PTPMGMT_HAVE_NETINET_IN_H 1
93 
94 /* Defined if we have the GNU <getopt.h> header.
95  * GNU-style long options getopt.
96  */
97 #define __PTPMGMT_HAVE_GETOPT_H 1
98 
101 #endif /* __PTPMGMT_NAME_H */