Move max() to util.h

This commit is contained in:
Petri Lehtinen 2009-06-11 08:54:40 +03:00
parent 7764f3f321
commit 9b825f7b18
3 changed files with 14 additions and 3 deletions

View File

@ -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

6
src/util.h Normal file
View File

@ -0,0 +1,6 @@
#ifndef UTIL_H
#define UTIL_H
#define max(a, b) ((a) > (b) ? (a) : (b))
#endif

View File

@ -4,8 +4,7 @@
#include <jansson.h>
#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_))