1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
#ifndef NCAP_PORT_H
#define NCAP_PORT_H
#include "config.h"
#ifdef __linux__
# define _GNU_SOURCE
# include <features.h>
# define __FAVOR_BSD
#endif
#ifdef __hpux
# define __BIT_TYPES_DEFINED
# define __HPLX
#endif
#ifndef alloca
# ifdef HAVE_ALLOCA_H
# include <alloca.h>
# elif defined __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# else
# include <stddef.h>
void *alloca (size_t);
# endif
#endif
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#else
# ifndef HAVE__BOOL
# ifdef __cplusplus
typedef bool _Bool;
# else
# define _Bool signed char
# endif
# endif
# define bool _Bool
# define false 0
# define true 1
# define __bool_true_false_are_defined 1
#endif
#ifdef NEED_ASPRINTF_DECL
#include <stdarg.h>
int asprintf(char **ret, const char *format, ...);
#endif
#undef __attribute__
#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
# define __attribute__(x) __attribute__(x)
#else
# define __attribute__(x)
#endif
#if (FLEXIBLE_ARRAY_MEMBER+1) == 1
# define ZERO_LENGTH_ARRAY
#else
# define ZERO_LENGTH_ARRAY 0
#endif
#endif
|