1*95c635efSGarrett D'Amore #ifndef MANDOC_CONFIG_H 2*95c635efSGarrett D'Amore #define MANDOC_CONFIG_H 3*95c635efSGarrett D'Amore 4*95c635efSGarrett D'Amore #if defined(__linux__) || defined(__MINT__) 5*95c635efSGarrett D'Amore # define _GNU_SOURCE /* strptime(), getsubopt() */ 6*95c635efSGarrett D'Amore #endif 7*95c635efSGarrett D'Amore 8*95c635efSGarrett D'Amore #include <stdio.h> 9*95c635efSGarrett D'Amore 10*95c635efSGarrett D'Amore #define HAVE_STRPTIME 11*95c635efSGarrett D'Amore #define HAVE_GETSUBOPT 12*95c635efSGarrett D'Amore #define HAVE_STRLCAT 13*95c635efSGarrett D'Amore #define HAVE_STRLCPY 14*95c635efSGarrett D'Amore 15*95c635efSGarrett D'Amore #include <sys/types.h> 16*95c635efSGarrett D'Amore 17*95c635efSGarrett D'Amore #if !defined(__BEGIN_DECLS) 18*95c635efSGarrett D'Amore # ifdef __cplusplus 19*95c635efSGarrett D'Amore # define __BEGIN_DECLS extern "C" { 20*95c635efSGarrett D'Amore # else 21*95c635efSGarrett D'Amore # define __BEGIN_DECLS 22*95c635efSGarrett D'Amore # endif 23*95c635efSGarrett D'Amore #endif 24*95c635efSGarrett D'Amore #if !defined(__END_DECLS) 25*95c635efSGarrett D'Amore # ifdef __cplusplus 26*95c635efSGarrett D'Amore # define __END_DECLS } 27*95c635efSGarrett D'Amore # else 28*95c635efSGarrett D'Amore # define __END_DECLS 29*95c635efSGarrett D'Amore # endif 30*95c635efSGarrett D'Amore #endif 31*95c635efSGarrett D'Amore 32*95c635efSGarrett D'Amore #if defined(__APPLE__) 33*95c635efSGarrett D'Amore # define htobe32(x) OSSwapHostToBigInt32(x) 34*95c635efSGarrett D'Amore # define betoh32(x) OSSwapBigToHostInt32(x) 35*95c635efSGarrett D'Amore # define htobe64(x) OSSwapHostToBigInt64(x) 36*95c635efSGarrett D'Amore # define betoh64(x) OSSwapBigToHostInt64(x) 37*95c635efSGarrett D'Amore #elif defined(__linux__) 38*95c635efSGarrett D'Amore # define betoh32(x) be32toh(x) 39*95c635efSGarrett D'Amore # define betoh64(x) be64toh(x) 40*95c635efSGarrett D'Amore #endif 41*95c635efSGarrett D'Amore 42*95c635efSGarrett D'Amore #ifndef HAVE_STRLCAT 43*95c635efSGarrett D'Amore extern size_t strlcat(char *, const char *, size_t); 44*95c635efSGarrett D'Amore #endif 45*95c635efSGarrett D'Amore #ifndef HAVE_STRLCPY 46*95c635efSGarrett D'Amore extern size_t strlcpy(char *, const char *, size_t); 47*95c635efSGarrett D'Amore #endif 48*95c635efSGarrett D'Amore #ifndef HAVE_GETSUBOPT 49*95c635efSGarrett D'Amore extern int getsubopt(char **, char * const *, char **); 50*95c635efSGarrett D'Amore extern char *suboptarg; 51*95c635efSGarrett D'Amore #endif 52*95c635efSGarrett D'Amore #ifndef HAVE_FGETLN 53*95c635efSGarrett D'Amore extern char *fgetln(FILE *, size_t *); 54*95c635efSGarrett D'Amore #endif 55*95c635efSGarrett D'Amore 56*95c635efSGarrett D'Amore #endif /* MANDOC_CONFIG_H */ 57