commit cb7cbde72233be91b1a5fdbae5aa6f78a8ba4cd9 parent 56709a2414b40520b647069914489ed97c7d69da Author: sin <sin@2f30.org> Date: Mon, 17 Nov 2014 15:45:09 +0000 Add compat.h Diffstat:
M | Makefile | | | 1 | + |
A | compat.h | | | 6 | ++++++ |
M | util.h | | | 8 | +++----- |
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile @@ -5,6 +5,7 @@ include config.mk HDR =\ arg.h\ + compat.h\ crypt.h\ fs.h\ md5.h\ diff --git a/compat.h b/compat.h @@ -0,0 +1,6 @@ +/* See LICENSE file for copyright and license details. */ +#include <limits.h> + +#ifndef HOST_NAME_MAX +#define HOST_NAME_MAX _POSIX_HOST_NAME_MAX +#endif diff --git a/util.h b/util.h @@ -1,13 +1,11 @@ /* See LICENSE file for copyright and license details. */ #include <sys/types.h> -#include <limits.h> + #include <regex.h> #include <stddef.h> -#include "arg.h" -#ifndef HOST_NAME_MAX -#define HOST_NAME_MAX _POSIX_HOST_NAME_MAX -#endif +#include "arg.h" +#include "compat.h" #define UTF8_POINT(c) (((c) & 0xc0) != 0x80)