| 1 | #ifndef __COMPAT_H__ |
| 2 | #define __COMPAT_H__ |
| 3 | |
| 4 | #ifdef HAVE_CONFIG_H |
| 5 | # include "config.h" |
| 6 | #endif /* HAVE_CONFIG_H */ |
| 7 | |
| 8 | #include <sys/types.h> |
| 9 | |
| 10 | #ifndef HAVE_GETOPT |
| 11 | extern int opterr; |
| 12 | extern int optind; |
| 13 | extern int optopt; |
| 14 | extern int optreset; |
| 15 | extern char *optarg; |
| 16 | |
| 17 | int getopt(int, char * const *, const char *); |
| 18 | #endif /* !HAVE_GETOPT */ |
| 19 | |
| 20 | #ifndef HAVE_STRLCAT |
| 21 | size_t strlcat(char *, const char *, size_t); |
| 22 | #endif /* !HAVE_STRLCAT */ |
| 23 | |
| 24 | #ifndef HAVE_STRLCPY |
| 25 | size_t strlcpy(char *, const char *, size_t); |
| 26 | #endif /* !HAVE_STRLCPY */ |
| 27 | |
| 28 | #ifndef HAVE_STRTONUM |
| 29 | long long strtonum(const char *, long long, long long, const char **); |
| 30 | #endif /* !HAVE_STROTONUM */ |
| 31 | |
| 32 | #ifndef HAVE_REALLOCARRAY |
| 33 | void * reallocarray(void *, size_t, size_t); |
| 34 | #endif /* !HAVE_REALLOCARRAY */ |
| 35 | |
| 36 | #endif /* __COMPAT_H__ */ |