diff options
author | 2013-04-02 21:13:05 +0000 | |
---|---|---|
committer | 2013-04-02 21:13:05 +0000 | |
commit | c689b5deb6dff53eaf98ec3b8eae56f030e27062 (patch) | |
tree | 4735377879ce4010e0e2d95698e67b298a4de15e /porting.h | |
parent | lddtree.py: drop superfluous () around help strings (diff) | |
download | pax-utils-c689b5deb6dff53eaf98ec3b8eae56f030e27062.tar.gz pax-utils-c689b5deb6dff53eaf98ec3b8eae56f030e27062.tar.bz2 pax-utils-c689b5deb6dff53eaf98ec3b8eae56f030e27062.zip |
scanelf: add support for multiple quiet levels and fix the wrap around behavior to max out instead
Diffstat (limited to 'porting.h')
-rw-r--r-- | porting.h | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* * Copyright 2005-2012 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 - * $Header: /var/cvsroot/gentoo-projects/pax-utils/porting.h,v 1.43 2012/11/04 07:26:24 vapier Exp $ + * $Header: /var/cvsroot/gentoo-projects/pax-utils/porting.h,v 1.44 2013/04/02 21:13:05 vapier Exp $ * * Copyright 2005-2012 Ned Ludd - <solar@gentoo.org> * Copyright 2005-2012 Mike Frysinger - <vapier@gentoo.org> @@ -120,6 +120,15 @@ # endif #endif +#define _minmax(x, y, op) \ + ({ typeof(x) __x = (x); typeof(y) __y = (y); (__x op __y ? __x : __y); }) +#if !defined(min) +# define min(x, y) _minmax(x, y, <) +#endif +#if !defined(max) +# define max(x, y) _minmax(x, y, >) +#endif + #if !defined(_POSIX_PATH_MAX) && !defined(PATH_MAX) /* __PAX_UTILS_PATH_MAX */ # define __PAX_UTILS_PATH_MAX 8192 #elif _POSIX_PATH_MAX > PATH_MAX /* __PAX_UTILS_PATH_MAX */ |