Print this page
5051 import mdocml-1.12.3
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Approved by: TBD
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/mandoc/config.h
+++ new/usr/src/cmd/mandoc/config.h
1 1 #ifndef MANDOC_CONFIG_H
2 2 #define MANDOC_CONFIG_H
3 3
4 4 #if defined(__linux__) || defined(__MINT__)
5 5 # define _GNU_SOURCE /* strptime(), getsubopt() */
6 6 #endif
7 7
8 8 #include <stdio.h>
9 9
10 +#define VERSION "1.12.3"
10 11 #define HAVE_STRPTIME
11 12 #define HAVE_GETSUBOPT
12 13 #define HAVE_STRLCAT
13 14 #define HAVE_STRLCPY
15 +#define HAVE_MMAP
14 16
15 17 #include <sys/types.h>
16 18
17 19 #if !defined(__BEGIN_DECLS)
18 20 # ifdef __cplusplus
19 21 # define __BEGIN_DECLS extern "C" {
20 22 # else
21 23 # define __BEGIN_DECLS
22 24 # endif
23 25 #endif
24 26 #if !defined(__END_DECLS)
25 27 # ifdef __cplusplus
26 28 # define __END_DECLS }
27 29 # else
28 30 # define __END_DECLS
29 31 # endif
30 32 #endif
31 33
32 -#if defined(__APPLE__)
33 -# define htobe32(x) OSSwapHostToBigInt32(x)
34 -# define betoh32(x) OSSwapBigToHostInt32(x)
35 -# define htobe64(x) OSSwapHostToBigInt64(x)
36 -# define betoh64(x) OSSwapBigToHostInt64(x)
37 -#elif defined(__linux__)
38 -# define betoh32(x) be32toh(x)
39 -# define betoh64(x) be64toh(x)
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
40 44 #endif
41 45
42 46 #ifndef HAVE_STRLCAT
43 47 extern size_t strlcat(char *, const char *, size_t);
44 48 #endif
45 49 #ifndef HAVE_STRLCPY
46 50 extern size_t strlcpy(char *, const char *, size_t);
47 51 #endif
48 52 #ifndef HAVE_GETSUBOPT
49 53 extern int getsubopt(char **, char * const *, char **);
50 54 extern char *suboptarg;
51 55 #endif
52 56 #ifndef HAVE_FGETLN
53 57 extern char *fgetln(FILE *, size_t *);
54 58 #endif
55 59
56 60 #endif /* MANDOC_CONFIG_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX