diff --git a/Makefile.am b/Makefile.am index ba1e6aa..59d6e54 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,7 +22,6 @@ endif r3_includedir = $(includedir)/r3 r3_include_HEADERS = \ include/r3.h \ - include/r3_define.h \ include/r3_list.h \ include/r3_slug.h \ include/r3_gvc.h \ diff --git a/configure.ac b/configure.ac index df52731..449dfbd 100644 --- a/configure.ac +++ b/configure.ac @@ -10,6 +10,7 @@ AC_PROG_CC AC_PROG_CC_STDC AC_PROG_CXX AC_PROG_INSTALL +AC_HEADER_STDBOOL # older debian AC_PROG_LIBTOOL diff --git a/include/r3.h b/include/r3.h index 9445beb..592d64d 100644 --- a/include/r3.h +++ b/include/r3.h @@ -11,11 +11,31 @@ #include #include #include + + + +#ifdef HAVE_STDBOOL_H + #include -#include "r3_define.h" + +#else + +#if !defined(bool) && !defined(__cplusplus) +typedef unsigned char bool; +#endif +#ifndef FALSE +# define FALSE 0 +#endif +#ifndef TRUE +# define TRUE 1 +#endif + +#endif + #include "str_array.h" #include "r3_slug.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/include/r3_define.h b/include/r3_define.h deleted file mode 100644 index f0903ee..0000000 --- a/include/r3_define.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * r3_define.h - * Copyright (C) 2014 c9s - * - * Distributed under terms of the MIT license. - */ - -#ifndef DEFINE_H -#define DEFINE_H -#include -#if !defined(bool) && !defined(__cplusplus) -typedef unsigned char bool; -#endif -#ifndef FALSE -# define FALSE 0 -#endif -#ifndef TRUE -# define TRUE 1 -#endif -#endif /* !DEFINE_H */ diff --git a/package.json b/package.json index 061026a..7a6f5a8 100644 --- a/package.json +++ b/package.json @@ -5,5 +5,5 @@ "description": "high-performance path dispatching library", "keywords": ["path", "dispatch", "performance", "r3", "c9s"], "license": "MIT", - "src": ["3rdparty/zmalloc.c", "3rdparty/zmalloc.h", "include/r3.h", "include/r3.hpp", "include/r3_define.h", "include/r3_gvc.h", "include/r3_json.h", "include/r3_list.h", "include/r3_slug.h", "include/str_array.h", "src/edge.c", "src/gvc.c", "src/json.c", "src/list.c", "src/match_entry.c", "src/node.c", "src/slug.c", "src/slug.h", "src/str.c", "src/token.c"] + "src": ["3rdparty/zmalloc.c", "3rdparty/zmalloc.h", "include/r3.h", "include/r3.hpp", "include/r3_gvc.h", "include/r3_json.h", "include/r3_list.h", "include/r3_slug.h", "include/str_array.h", "src/edge.c", "src/gvc.c", "src/json.c", "src/list.c", "src/match_entry.c", "src/node.c", "src/slug.c", "src/slug.h", "src/str.c", "src/token.c"] }