[BACK]Return to config.h.post CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

File: [cvsweb.bsd.lv] / mandoc / Attic / config.h.post (download)

Revision 1.6.2.2, Thu Oct 3 00:46:36 2013 UTC (10 years, 5 months ago) by schwarze
Branch: VERSION_1_12
CVS Tags: VERSION_1_12_2
Changes since 1.6.2.1: +7 -1 lines

Byte-order functions for Mac OS X.
Same patch sent in by Franco Fichtner and Kristaps Dzonsons.
Tested by Franco Fichtner <franco at lastsummer dot de>.

#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

#ifndef HAVE_BETOH64
#  if defined(__APPLE__)
#    define betoh64(x) OSSwapBigToHostInt64(x)
#    define htobe64(x) OSSwapHostToBigInt64(x)
#  else
#    define betoh64(x) be64toh(x)
#  endif
#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 */