diff --git a/src/Makefile.am b/src/Makefile.am index 4471220..b75a60d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,13 @@ include_HEADERS = jansson.h lib_LTLIBRARIES = libjansson.la -libjansson_la_SOURCES = dump.c hashtable.h hashtable.c load.c value.c +libjansson_la_SOURCES = \ + dump.c \ + hashtable.c \ + hashtable.h \ + load.c \ + util.h \ + value.c libjansson_la_LDFLAGS = -version-info 0:0:0 AM_CFLAGS = -Wall -Wextra -std=c99 diff --git a/src/util.h b/src/util.h new file mode 100644 index 0000000..5bffa9b --- /dev/null +++ b/src/util.h @@ -0,0 +1,6 @@ +#ifndef UTIL_H +#define UTIL_H + +#define max(a, b) ((a) > (b) ? (a) : (b)) + +#endif diff --git a/src/value.c b/src/value.c index ea539ff..998446c 100644 --- a/src/value.c +++ b/src/value.c @@ -4,8 +4,7 @@ #include #include "hashtable.h" - -#define max(a, b) ((a) > (b) ? (a) : (b)) +#include "util.h" #define container_of(ptr_, type_, member_) \ ((type_ *)((char *)ptr_ - (size_t)&((type_ *)0)->member_))