|
Nagios 4.5.2
Dev docs for Nagios core and neb-module hackers
|
libnagios helper and compatibility macros that lack a "real" home. More...
#include <unistd.h>#include <stdlib.h>Go to the source code of this file.
Macros | |
| #define | NAGIOS_MKVERSION(a, b, c) (((a) * 10000) + ((b) * 100) + (c)) |
| #define | NAGIOS_BEGIN_DECL /* nothing */ |
| C++ compatibility macro that avoids confusing indentation programs. | |
| #define | NAGIOS_END_DECL /* more of nothing */ |
| C++ compatibility macro that avoid confusing indentation programs. | |
| #define | NAGIOS_DEPRECATED(version, hint) __attribute__((deprecated("This function will be removed in Nagios v" #version ". Please use " #hint " instead"))) |
| #define | OK 0 |
| Indicates successful function call in Nagios. | |
| #define | ERROR -2 |
| Non-successful function call in Nagios. | |
| #define | FALSE 0 |
| Not true. | |
| #define | TRUE (!FALSE) |
| Not false. | |
| #define | my_free(ptr) do { if(ptr) { free(ptr); ptr = NULL; } } while(0) |
| Useful macro to safely avoid double-free memory corruption. | |
| #define | ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) |
| Useful for iterating over all elements in a static array. | |
| #define | veclen ARRAY_SIZE |
| useful for iterating over all elements in a static array | |
| #define | offsetof(t, f) ((unsigned long)&((t *)0)->f) |
| standard offsetof macro | |
| #define | CHAR_MAP_INIT(k) |
| character map initialization for .bss-allocated char maps | |
libnagios helper and compatibility macros that lack a "real" home.
This is the home of random macros that must be present for compilation to succeed but are missing on some platforms.
| #define CHAR_MAP_INIT | ( | k | ) |
character map initialization for .bss-allocated char maps