mdocml: mandoc(1) now imitates groff(1)'s header and footer
[dragonfly.git] / contrib / mdocml / config.h
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 HAVE_STRPTIME
11 #define HAVE_GETSUBOPT
12 #define HAVE_STRLCAT
13 #define HAVE_MMAP
14 #define HAVE_STRLCPY
15
16 /* local DragonFly modifications */
17 #define VERSION "1.12.1"
18 #define OSNAME  "DragonFly 3.5"
19
20 #include <sys/types.h>
21
22 #if !defined(__BEGIN_DECLS)
23 #  ifdef __cplusplus
24 #  define       __BEGIN_DECLS           extern "C" {
25 #  else
26 #  define       __BEGIN_DECLS
27 #  endif
28 #endif
29 #if !defined(__END_DECLS)
30 #  ifdef __cplusplus
31 #  define       __END_DECLS             }
32 #  else
33 #  define       __END_DECLS
34 #  endif
35 #endif
36
37 #if defined(__APPLE__)
38 # define htobe32(x) OSSwapHostToBigInt32(x)
39 # define betoh32(x) OSSwapBigToHostInt32(x)
40 # define htobe64(x) OSSwapHostToBigInt64(x)
41 # define betoh64(x) OSSwapBigToHostInt64(x)
42 #elif defined(__linux__)
43 # define betoh32(x) be32toh(x)
44 # define betoh64(x) be64toh(x)
45 #endif
46
47 #ifndef HAVE_STRLCAT
48 extern  size_t    strlcat(char *, const char *, size_t);
49 #endif
50 #ifndef HAVE_STRLCPY
51 extern  size_t    strlcpy(char *, const char *, size_t);
52 #endif
53 #ifndef HAVE_GETSUBOPT
54 extern  int       getsubopt(char **, char * const *, char **);
55 extern  char     *suboptarg;
56 #endif
57 #ifndef HAVE_FGETLN
58 extern  char     *fgetln(FILE *, size_t *);
59 #endif
60
61 #endif /* MANDOC_CONFIG_H */