xref: /titanic_41/usr/src/cmd/mandoc/config.h (revision ffb8ebfab4941f959e7caea93ecfb348cfa3515e)
1 #ifndef	MANDOC_CONFIG_H
2 #define	MANDOC_CONFIG_H
3 
4 #if defined(__linux__) || defined(__MINT__)
5 # define _GNU_SOURCE /* strptime(), getsubopt() */
6 #endif
7 
8 #include <stdio.h>
9 
10 #define VERSION "1.12.3"
11 #define HAVE_STRPTIME
12 #define HAVE_GETSUBOPT
13 #define HAVE_STRLCAT
14 #define HAVE_STRLCPY
15 #define HAVE_MMAP
16 
17 #include <sys/types.h>
18 
19 #if !defined(__BEGIN_DECLS)
20 #  ifdef __cplusplus
21 #  define	__BEGIN_DECLS		extern "C" {
22 #  else
23 #  define	__BEGIN_DECLS
24 #  endif
25 #endif
26 #if !defined(__END_DECLS)
27 #  ifdef __cplusplus
28 #  define	__END_DECLS		}
29 #  else
30 #  define	__END_DECLS
31 #  endif
32 #endif
33 
34 #ifndef HAVE_BETOH64
35 #  if defined(__APPLE__)
36 #    define betoh64(x) OSSwapBigToHostInt64(x)
37 #    define htobe64(x) OSSwapHostToBigInt64(x)
38 #  elif defined(__sun)
39 #    define betoh64(x) BE_64(x)
40 #    define htobe64(x) BE_64(x)
41 #  else
42 #    define betoh64(x) be64toh(x)
43 #  endif
44 #endif
45 
46 #ifndef HAVE_STRLCAT
47 extern	size_t	  strlcat(char *, const char *, size_t);
48 #endif
49 #ifndef HAVE_STRLCPY
50 extern	size_t	  strlcpy(char *, const char *, size_t);
51 #endif
52 #ifndef HAVE_GETSUBOPT
53 extern	int	  getsubopt(char **, char * const *, char **);
54 extern	char	 *suboptarg;
55 #endif
56 #ifndef HAVE_FGETLN
57 extern	char	 *fgetln(FILE *, size_t *);
58 #endif
59 
60 #endif /* MANDOC_CONFIG_H */
61