diff options
author | uqs <uqs@FreeBSD.org> | 2012-10-19 22:21:01 +0000 |
---|---|---|
committer | uqs <uqs@FreeBSD.org> | 2012-10-19 22:21:01 +0000 |
commit | bdec3cb5a747bba9c264cfc079075a9cdd270b9b (patch) | |
tree | f3e4c243809ab9802585681d5a07885f772eb5b0 /contrib/mdocml/config.h | |
parent | 3362252a56bf0d1c15907a461e1692760af910c7 (diff) | |
parent | c2dfbbd38125b2ba3608eb48ca3b5e2e23f819df (diff) | |
download | FreeBSD-src-bdec3cb5a747bba9c264cfc079075a9cdd270b9b.zip FreeBSD-src-bdec3cb5a747bba9c264cfc079075a9cdd270b9b.tar.gz |
Merge mandoc from vendor into contrib and provide the necessary Makefile glue.
It's not yet connected to the build.
Diffstat (limited to 'contrib/mdocml/config.h')
-rw-r--r-- | contrib/mdocml/config.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/contrib/mdocml/config.h b/contrib/mdocml/config.h new file mode 100644 index 0000000..12d3355 --- /dev/null +++ b/contrib/mdocml/config.h @@ -0,0 +1,58 @@ +#ifndef MANDOC_CONFIG_H +#define MANDOC_CONFIG_H + +#if defined(__linux__) || defined(__MINT__) +# define _GNU_SOURCE /* strptime(), getsubopt() */ +#endif + +#include <stdio.h> + +#define HAVE_FGETLN +#define HAVE_STRPTIME +#define HAVE_GETSUBOPT +#define HAVE_STRLCAT +#define HAVE_MMAP +#define HAVE_STRLCPY + +#include <sys/types.h> + +#if !defined(__BEGIN_DECLS) +# ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# else +# define __BEGIN_DECLS +# endif +#endif +#if !defined(__END_DECLS) +# ifdef __cplusplus +# define __END_DECLS } +# else +# define __END_DECLS +# endif +#endif + +#if defined(__APPLE__) +# define htobe32(x) OSSwapHostToBigInt32(x) +# define betoh32(x) OSSwapBigToHostInt32(x) +# define htobe64(x) OSSwapHostToBigInt64(x) +# define betoh64(x) OSSwapBigToHostInt64(x) +#elif defined(__linux__) +# define betoh32(x) be32toh(x) +# define betoh64(x) be64toh(x) +#endif + +#ifndef HAVE_STRLCAT +extern size_t strlcat(char *, const char *, size_t); +#endif +#ifndef HAVE_STRLCPY +extern size_t strlcpy(char *, const char *, size_t); +#endif +#ifndef HAVE_GETSUBOPT +extern int getsubopt(char **, char * const *, char **); +extern char *suboptarg; +#endif +#ifndef HAVE_FGETLN +extern char *fgetln(FILE *, size_t *); +#endif + +#endif /* MANDOC_CONFIG_H */ |