1 /*
2 * Copyright 2004-2024 the Pacemaker project contributors
3 *
4 * The version control history for this file may have further details.
5 *
6 * This source code is licensed under the GNU Lesser General Public License
7 * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
8 */
9
10 #ifndef PCMK__CRM_COMMON_UTIL_COMPAT__H
11 #define PCMK__CRM_COMMON_UTIL_COMPAT__H
12
13 #include <stdbool.h> // bool
14 #include <glib.h> // gboolean
15
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19
20 /**
21 * \file
22 * \brief Deprecated Pacemaker utilities
23 * \ingroup core
24 * \deprecated Do not include this header directly. The utilities in this
25 * header, and the header itself, will be removed in a future
26 * release.
27 */
28
29 //! \deprecated Use gnutls_global_init() instead
30 void crm_gnutls_global_init(void);
31
32 //! \deprecated Do not use (will be dropped in a future release)
33 bool crm_is_daemon_name(const char *name);
34
35 // NOTE: sbd (as of at least 1.5.2) uses this
36 //! \deprecated Use pcmk_is_set() or pcmk_all_flags_set() instead
37 static inline gboolean
38 is_set(long long word, long long bit)
/* ![[previous]](../icons/n_left.png)
![[next]](../icons/n_right.png)
![[first]](../icons/n_first.png)
![[last]](../icons/n_last.png)
![[top]](../icons/top.png)
![[bottom]](../icons/bottom.png)
![[index]](../icons/index.png)
*/
39 {
40 return ((word & bit) == bit);
41 }
42
43 #ifdef __cplusplus
44 }
45 #endif
46
47 #endif // PCMK__CRM_COMMON_UTIL_COMPAT__H