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 
  12 #include <sys/types.h>
  13 
  14 #if !defined(__BEGIN_DECLS)
  15 #  ifdef __cplusplus
  16 #  define       __BEGIN_DECLS           extern "C" {
  17 #  else
  18 #  define       __BEGIN_DECLS
  19 #  endif
  20 #endif
  21 #if !defined(__END_DECLS)
  22 #  ifdef __cplusplus
  23 #  define       __END_DECLS             }
  24 #  else
  25 #  define       __END_DECLS
  26 #  endif
  27 #endif
  28 
  29 #ifndef HAVE_BETOH64
  30 #  if defined(__APPLE__)
  31 #    define betoh64(x) OSSwapBigToHostInt64(x)
  32 #    define htobe64(x) OSSwapHostToBigInt64(x)
  33 #  elif defined(__sun)
  34 #    define betoh64(x) BE_64(x)
  35 #    define htobe64(x) BE_64(x)
  36 #  else
  37 #    define betoh64(x) be64toh(x)
  38 #  endif
  39 #endif
  40 
  41 #ifndef HAVE_STRLCAT
  42 extern  size_t    strlcat(char *, const char *, size_t);
  43 #endif
  44 #ifndef HAVE_STRLCPY
  45 extern  size_t    strlcpy(char *, const char *, size_t);
  46 #endif
  47 #ifndef HAVE_GETSUBOPT
  48 extern  int       getsubopt(char **, char * const *, char **);
  49 extern  char     *suboptarg;
  50 #endif
  51 #ifndef HAVE_FGETLN
  52 extern  char     *fgetln(FILE *, size_t *);
  53 #endif
  54 
  55 #endif /* MANDOC_CONFIG_H */