Move max() to util.h
This commit is contained in:
parent
7764f3f321
commit
9b825f7b18
@ -1,7 +1,13 @@
|
|||||||
include_HEADERS = jansson.h
|
include_HEADERS = jansson.h
|
||||||
|
|
||||||
lib_LTLIBRARIES = libjansson.la
|
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
|
libjansson_la_LDFLAGS = -version-info 0:0:0
|
||||||
|
|
||||||
AM_CFLAGS = -Wall -Wextra -std=c99
|
AM_CFLAGS = -Wall -Wextra -std=c99
|
||||||
|
6
src/util.h
Normal file
6
src/util.h
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#ifndef UTIL_H
|
||||||
|
#define UTIL_H
|
||||||
|
|
||||||
|
#define max(a, b) ((a) > (b) ? (a) : (b))
|
||||||
|
|
||||||
|
#endif
|
@ -4,8 +4,7 @@
|
|||||||
|
|
||||||
#include <jansson.h>
|
#include <jansson.h>
|
||||||
#include "hashtable.h"
|
#include "hashtable.h"
|
||||||
|
#include "util.h"
|
||||||
#define max(a, b) ((a) > (b) ? (a) : (b))
|
|
||||||
|
|
||||||
#define container_of(ptr_, type_, member_) \
|
#define container_of(ptr_, type_, member_) \
|
||||||
((type_ *)((char *)ptr_ - (size_t)&((type_ *)0)->member_))
|
((type_ *)((char *)ptr_ - (size_t)&((type_ *)0)->member_))
|
||||||
|
Loading…
Reference in New Issue
Block a user