xref: /titanic_52/usr/src/cmd/mandoc/config.h (revision 36626562d1ed14759c98d5f99d61b371f7f346aa)
1 #ifndef MANDOC_CONFIG_H
2 #define MANDOC_CONFIG_H
3 
4 #if defined(__linux__) || defined(__MINT__)
5 #define _GNU_SOURCE	/* See test-*.c what needs this. */
6 #endif
7 
8 #include <sys/types.h>
9 #include <stdio.h>
10 
11 /*
12  * The tools build may be on a system without O_DIRECTORY. So we need to
13  * explicitly include sys/fcntl.h and check for O_DIRECTORY and if not present,
14  * use the default of it being zero.
15  */
16 #include <sys/fcntl.h>
17 #ifndef	O_DIRECTORY
18 #define O_DIRECTORY 0
19 #endif
20 
21 #define HAVE_DIRENT_NAMLEN 0
22 #define HAVE_FGETLN 0
23 #define HAVE_FTS 0
24 #define HAVE_GETSUBOPT 1
25 #define HAVE_MMAP 1
26 #define HAVE_REALLOCARRAY 0
27 #define HAVE_STRCASESTR 1
28 #define HAVE_STRLCAT 1
29 #define HAVE_STRLCPY 1
30 #define HAVE_STRPTIME 1
31 #define HAVE_STRSEP 1
32 #define HAVE_STRTONUM 0
33 #define HAVE_WCHAR 1
34 #define HAVE_SQLITE3 0
35 #define HAVE_SQLITE3_ERRSTR 1
36 #define HAVE_OHASH 1
37 #define HAVE_MANPATH 0
38 
39 #define BINM_APROPOS "apropos"
40 #define BINM_MAN "man"
41 #define BINM_WHATIS "whatis"
42 #define BINM_MAKEWHATIS "makewhatis"
43 
44 #if !defined(__BEGIN_DECLS)
45 #  ifdef __cplusplus
46 #  define	__BEGIN_DECLS		extern "C" {
47 #  else
48 #  define	__BEGIN_DECLS
49 #  endif
50 #endif
51 #if !defined(__END_DECLS)
52 #  ifdef __cplusplus
53 #  define	__END_DECLS		}
54 #  else
55 #  define	__END_DECLS
56 #  endif
57 #endif
58 
59 extern	char	 *fgetln(FILE *, size_t *);
60 extern	int	  getsubopt(char **, char * const *, char **);
61 extern	void	 *reallocarray(void *, size_t, size_t);
62 extern	char	 *strcasestr(const char *, const char *);
63 extern	size_t	  strlcat(char *, const char *, size_t);
64 extern	size_t	  strlcpy(char *, const char *, size_t);
65 extern	char	 *strsep(char **, const char *);
66 extern	long long strtonum(const char *, long long, long long, const char **);
67 
68 #endif /* MANDOC_CONFIG_H */
69