1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-26 14:04:03 +03:00

macro: don't redefine CLAMP if it is already defined by glib or some other library

This commit is contained in:
Lennart Poettering 2013-03-19 20:00:29 +01:00
parent d34cd37490
commit 907809fc6a
2 changed files with 2 additions and 1 deletions

View File

@ -110,7 +110,6 @@ static int open_journal(RequestMeta *m) {
return sd_journal_open(&m->journal, SD_JOURNAL_LOCAL_ONLY|SD_JOURNAL_SYSTEM_ONLY);
}
static int respond_oom_internal(struct MHD_Connection *connection) {
struct MHD_Response *response;
const char m[] = "Out of memory.\n";

View File

@ -92,6 +92,7 @@ static inline size_t ALIGN_TO(size_t l, size_t ali) {
#define MIN3(a,b,c) \
MIN(MIN(a,b),c)
#ifndef CLAMP
#define CLAMP(x, low, high) \
__extension__ ({ \
typeof(x) _x = (x); \
@ -99,6 +100,7 @@ static inline size_t ALIGN_TO(size_t l, size_t ali) {
typeof(high) _high = (high); \
((_x > _high) ? _high : ((_x < _low) ? _low : _x)); \
})
#endif
#define assert_se(expr) \
do { \