26 |
|
#ifndef STDINC_H /* prevent multiple #includes */ |
27 |
|
#define STDINC_H |
28 |
|
|
29 |
< |
#ifndef IN_AUTOCONF |
30 |
< |
#include "setup.h" |
31 |
< |
#endif |
29 |
> |
#include "config.h" |
30 |
|
|
31 |
|
#include "defaults.h" |
32 |
|
|
33 |
< |
#ifdef HAVE_STDLIB_H |
33 |
> |
#include <stddef.h> |
34 |
|
#include <stdlib.h> |
35 |
< |
#endif |
36 |
< |
#ifdef STRING_WITH_STRINGS |
37 |
< |
# include <string.h> |
40 |
< |
# include <strings.h> |
41 |
< |
#else |
42 |
< |
# ifdef HAVE_STRING_H |
43 |
< |
# include <string.h> |
44 |
< |
# else |
45 |
< |
# ifdef HAVE_STRINGS_H |
46 |
< |
# include <strings.h> |
47 |
< |
# endif |
48 |
< |
# endif |
49 |
< |
#endif |
35 |
> |
#include <string.h> |
36 |
> |
#include <stdint.h> |
37 |
> |
#include <errno.h> |
38 |
|
|
39 |
|
#ifdef HAVE_STRTOK_R |
40 |
|
# define strtoken(x, y, z) strtok_r(y, z, x) |
42 |
|
|
43 |
|
#include <sys/types.h> |
44 |
|
|
57 |
– |
#ifdef HAVE_INTTYPES_H |
58 |
– |
#include <inttypes.h> |
59 |
– |
#else |
60 |
– |
#ifdef HAVE_STDINT_H |
61 |
– |
#include <stdint.h> |
62 |
– |
#endif |
63 |
– |
#endif |
64 |
– |
|
65 |
– |
#ifdef HAVE_STDDEF_H |
66 |
– |
# include <stddef.h> |
67 |
– |
#else /* This is basically what stddef.h provides on most systems */ |
68 |
– |
# ifndef NULL |
69 |
– |
# define NULL ((void*)0) |
70 |
– |
# endif |
71 |
– |
# ifndef offsetof |
72 |
– |
# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) |
73 |
– |
# endif |
74 |
– |
#endif |
75 |
– |
|
45 |
|
#ifdef HAVE_CRYPT_H |
46 |
|
#include <crypt.h> |
47 |
|
#endif |
56 |
|
#include <time.h> |
57 |
|
#include <fcntl.h> |
58 |
|
|
90 |
– |
#ifdef HAVE_LIBGEN_H |
91 |
– |
#include <libgen.h> |
92 |
– |
#endif |
93 |
– |
|
59 |
|
#include <stdarg.h> |
60 |
|
#include <signal.h> |
61 |
|
#include <ctype.h> |
62 |
|
|
98 |
– |
#ifdef _WIN32 |
99 |
– |
#define PATH_MAX (MAX_PATH - 1) |
100 |
– |
#define WIN32_LEAN_AND_MEAN |
101 |
– |
#include <windows.h> |
102 |
– |
#include <winsock.h> |
103 |
– |
#else |
63 |
|
#include <dirent.h> |
64 |
|
#include <netdb.h> |
65 |
|
#include <sys/socket.h> |
67 |
|
#include <arpa/inet.h> |
68 |
|
#include <sys/time.h> |
69 |
|
#include <sys/file.h> |
111 |
– |
#endif |
70 |
|
|
71 |
|
#include <limits.h> |
72 |
|
|
87 |
|
#include <sys/param.h> |
88 |
|
#endif |
89 |
|
|
90 |
< |
#ifdef HAVE_ERRNO_H |
91 |
< |
#include <errno.h> |
90 |
> |
#ifdef PATH_MAX |
91 |
> |
#define HYB_PATH_MAX PATH_MAX |
92 |
|
#else |
93 |
< |
extern int errno; |
93 |
> |
#define HYB_PATH_MAX 4096 |
94 |
|
#endif |
95 |
|
|
96 |
< |
#include "inet_misc.h" |
96 |
> |
#if 0 && __GNUC__ |
97 |
> |
#define AFP(a,b) __attribute__((format (printf, a, b))) |
98 |
> |
#else |
99 |
> |
#define AFP(a,b) |
100 |
> |
#endif |
101 |
|
|
102 |
|
#endif |