195c635efSGarrett D'Amore #ifndef MANDOC_CONFIG_H 295c635efSGarrett D'Amore #define MANDOC_CONFIG_H 395c635efSGarrett D'Amore 495c635efSGarrett D'Amore #if defined(__linux__) || defined(__MINT__) 5260e9a87SYuri Pankov #define _GNU_SOURCE /* See test-*.c what needs this. */ 695c635efSGarrett D'Amore #endif 795c635efSGarrett D'Amore 8260e9a87SYuri Pankov #include <sys/types.h> 995c635efSGarrett D'Amore #include <stdio.h> 1095c635efSGarrett D'Amore 11*36626562SRobert Mustacchi /* 12*36626562SRobert Mustacchi * The tools build may be on a system without O_DIRECTORY. So we need to 13*36626562SRobert Mustacchi * explicitly include sys/fcntl.h and check for O_DIRECTORY and if not present, 14*36626562SRobert Mustacchi * use the default of it being zero. 15*36626562SRobert Mustacchi */ 16*36626562SRobert Mustacchi #include <sys/fcntl.h> 17*36626562SRobert Mustacchi #ifndef O_DIRECTORY 18*36626562SRobert Mustacchi #define O_DIRECTORY 0 19*36626562SRobert Mustacchi #endif 20*36626562SRobert Mustacchi 21260e9a87SYuri Pankov #define HAVE_DIRENT_NAMLEN 0 22260e9a87SYuri Pankov #define HAVE_FGETLN 0 23260e9a87SYuri Pankov #define HAVE_FTS 0 24260e9a87SYuri Pankov #define HAVE_GETSUBOPT 1 25260e9a87SYuri Pankov #define HAVE_MMAP 1 26260e9a87SYuri Pankov #define HAVE_REALLOCARRAY 0 27260e9a87SYuri Pankov #define HAVE_STRCASESTR 1 28260e9a87SYuri Pankov #define HAVE_STRLCAT 1 29260e9a87SYuri Pankov #define HAVE_STRLCPY 1 30260e9a87SYuri Pankov #define HAVE_STRPTIME 1 31260e9a87SYuri Pankov #define HAVE_STRSEP 1 32260e9a87SYuri Pankov #define HAVE_STRTONUM 0 33260e9a87SYuri Pankov #define HAVE_WCHAR 1 34260e9a87SYuri Pankov #define HAVE_SQLITE3 0 35260e9a87SYuri Pankov #define HAVE_SQLITE3_ERRSTR 1 36260e9a87SYuri Pankov #define HAVE_OHASH 1 37260e9a87SYuri Pankov #define HAVE_MANPATH 0 3895c635efSGarrett D'Amore 39260e9a87SYuri Pankov #define BINM_APROPOS "apropos" 40260e9a87SYuri Pankov #define BINM_MAN "man" 41260e9a87SYuri Pankov #define BINM_WHATIS "whatis" 42260e9a87SYuri Pankov #define BINM_MAKEWHATIS "makewhatis" 4395c635efSGarrett D'Amore 4495c635efSGarrett D'Amore #if !defined(__BEGIN_DECLS) 4595c635efSGarrett D'Amore # ifdef __cplusplus 4695c635efSGarrett D'Amore # define __BEGIN_DECLS extern "C" { 4795c635efSGarrett D'Amore # else 4895c635efSGarrett D'Amore # define __BEGIN_DECLS 4995c635efSGarrett D'Amore # endif 5095c635efSGarrett D'Amore #endif 5195c635efSGarrett D'Amore #if !defined(__END_DECLS) 5295c635efSGarrett D'Amore # ifdef __cplusplus 5395c635efSGarrett D'Amore # define __END_DECLS } 5495c635efSGarrett D'Amore # else 5595c635efSGarrett D'Amore # define __END_DECLS 5695c635efSGarrett D'Amore # endif 5795c635efSGarrett D'Amore #endif 5895c635efSGarrett D'Amore 5995c635efSGarrett D'Amore extern char *fgetln(FILE *, size_t *); 60260e9a87SYuri Pankov extern int getsubopt(char **, char * const *, char **); 61260e9a87SYuri Pankov extern void *reallocarray(void *, size_t, size_t); 62260e9a87SYuri Pankov extern char *strcasestr(const char *, const char *); 63260e9a87SYuri Pankov extern size_t strlcat(char *, const char *, size_t); 64260e9a87SYuri Pankov extern size_t strlcpy(char *, const char *, size_t); 65260e9a87SYuri Pankov extern char *strsep(char **, const char *); 66260e9a87SYuri Pankov extern long long strtonum(const char *, long long, long long, const char **); 6795c635efSGarrett D'Amore 6895c635efSGarrett D'Amore #endif /* MANDOC_CONFIG_H */ 69