25 #ifndef __STDC_VERSION__
27 #define __STDC_VERSION__ 0
39 #include <sys/types.h>
45 #elif defined(HAVE_ALLOCA) && defined(__MINGW32__)
53 #ifndef AST_POLL_COMPAT
56 #include "asterisk/poll-compat.h"
59 #ifndef HAVE_LLONG_MAX
60 #define LLONG_MAX 9223372036854775807LL
63 #ifndef HAVE_CLOSEFROM
64 void closefrom(
int lowfd);
67 #if !defined(HAVE_ASPRINTF)
68 int __attribute__((format(printf, 2, 3))) asprintf(
char **str, const
char *fmt, ...);
72 int ffsll(
long long n);
75 #ifndef HAVE_GETLOADAVG
76 int getloadavg(
double *list,
int nelem);
80 uint64_t htonll(uint64_t host64);
84 char *mkdtemp(
char *template_s);
88 uint64_t ntohll(uint64_t net64);
92 int setenv(
const char *name,
const char *value,
int overwrite);
95 #ifndef HAVE_STRCASESTR
96 char *strcasestr(
const char *,
const char *);
99 #if !defined(HAVE_STRNDUP)
100 char *strndup(
const char *,
size_t);
104 size_t strnlen(
const char *,
size_t);
108 char* strsep(
char** str,
const char* delims);
112 uint64_t strtoq(
const char *nptr,
char **endptr,
int base);
115 #ifndef HAVE_UNSETENV
116 int unsetenv(
const char *name);
119 #if !defined(HAVE_VASPRINTF)
120 int __attribute__((format(printf, 2, 0))) vasprintf(
char **strp, const
char *fmt, va_list ap);
123 #ifndef HAVE_TIMERSUB
124 void timersub(
struct timeval *tvend,
struct timeval *tvstart,
struct timeval *tvdiff);
127 #define strlcat __use__ast_str__functions_not__strlcat__
128 #define strlcpy __use__ast_copy_string__not__strlcpy__
133 #define __BEGIN_DECLS
143 #include <sys/stat.h>
145 #include <netinet/in.h>
146 #include <sys/loadavg.h>
147 #include <dat/dat_platform_specific.h>
150 #define LITTLE_ENDIAN 1234
151 #define BIG_ENDIAN 4321
154 #define BYTE_ORDER BIG_ENDIAN
156 #define BYTE_ORDER LITTLE_ENDIAN
161 #define __LITTLE_ENDIAN LITTLE_ENDIAN
162 #define __BIG_ENDIAN BIG_ENDIAN
163 #define __BYTE_ORDER BYTE_ORDER
166 #ifndef __BIT_TYPES_DEFINED__
167 #define __BIT_TYPES_DEFINED__
168 typedef unsigned char u_int8_t;
169 typedef unsigned short u_int16_t;
170 typedef unsigned int u_int32_t;
171 typedef unsigned int uint;
177 #define _WIN32_WINNT 0x0500
178 #ifndef INET_ADDRSTRLEN
179 #define INET_ADDRSTRLEN 16
181 #ifndef INET6_ADDRSTRLEN
182 #define INET6_ADDRSTRLEN 46
187 typedef unsigned long long uint64_t;
191 #if defined(__Darwin__) || defined(__CYGWIN__)
192 #define GLOB_ABORTED GLOB_ABEND
195 #if !defined(HAVE_GLOB_NOMAGIC) || !defined(HAVE_GLOB_BRACE)
196 #define MY_GLOB_FLAGS GLOB_NOCHECK
198 #define MY_GLOB_FLAGS (GLOB_NOMAGIC | GLOB_BRACE)
203 #define roundf(x) ((float)round(x))
205 float roundf(
float x);
210 #define INFINITY (1.0/0.0)
214 #define NAN (0.0/0.0)
String manipulation functions.
Compiler-specific macros and other items.