aboutsummaryrefslogtreecommitdiffstats
path: root/kerncompat.h
diff options
context:
space:
mode:
authorOndrej Kozina <okozina@redhat.com>2016-03-04 14:46:11 +0100
committerDavid Sterba <dsterba@suse.com>2016-03-14 13:42:47 +0100
commit5d23b6a7b0adfbeea78cd15e2257fc1859aed444 (patch)
treecd7648edb42c6311b886a9a797a1d36b74db236c /kerncompat.h
parent1e8246a0582bfbe34045a6dc665396f327b82d1f (diff)
downloadbtrfs-progs-5d23b6a7b0adfbeea78cd15e2257fc1859aed444.tar.gz
btrfs-progs-5d23b6a7b0adfbeea78cd15e2257fc1859aed444.tar.xz
btrfs-progs-5d23b6a7b0adfbeea78cd15e2257fc1859aed444.zip
btrfs-progs: libbtrfs: remove max/min macros from API
kerncompat.h header file is part of libbtrfs API. min/max macros cause conflict while building projects dependant on libbtrfs. Moving those macros to btrfs-progs internal header file fixes the conflict. Signed-off-by: Ondrej Kozina <okozina@redhat.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'kerncompat.h')
-rw-r--r--kerncompat.h20
1 files changed, 0 insertions, 20 deletions
diff --git a/kerncompat.h b/kerncompat.h
index 0f207b7..ee65aa7 100644
--- a/kerncompat.h
+++ b/kerncompat.h
@@ -241,26 +241,6 @@ static inline long IS_ERR(const void *ptr)
}
/*
- * max/min macro
- */
-#define min(x,y) ({ \
- typeof(x) _x = (x); \
- typeof(y) _y = (y); \
- (void) (&_x == &_y); \
- _x < _y ? _x : _y; })
-
-#define max(x,y) ({ \
- typeof(x) _x = (x); \
- typeof(y) _y = (y); \
- (void) (&_x == &_y); \
- _x > _y ? _x : _y; })
-
-#define min_t(type,x,y) \
- ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; })
-#define max_t(type,x,y) \
- ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; })
-
-/*
* This looks more complex than it should be. But we need to
* get the type for the ~ right in round_down (it needs to be
* as wide as the result!), and we want to evaluate the macro