Nagios  4.3.4
Dev docs for Nagios core and neb-module hackers
lnag-utils.h File Reference

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))
 Macro for alerting module authors to function deprecation.
 
#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 More...
 

Detailed Description

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.

Macro Definition Documentation

◆ CHAR_MAP_INIT

#define CHAR_MAP_INIT (   k)
Value:
{ \
k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, \
k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, \
k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, \
k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, \
k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, \
k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, \
k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, \
k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, \
k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, \
k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, \
k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, \
k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, \
k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, \
k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, \
k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, \
k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, k, \
}

character map initialization for .bss-allocated char maps