diff options
author | 2011-10-02 21:52:29 +0000 | |
---|---|---|
committer | 2011-10-02 21:52:29 +0000 | |
commit | f600bdbfd5ad7b3d67f82e448050c91621ca955c (patch) | |
tree | fcad082951e661144891b2cc5565265f812f5a18 /main.h | |
parent | add O_CLOEXEC fallback define #363271 (diff) | |
download | portage-utils-f600bdbfd5ad7b3d67f82e448050c91621ca955c.tar.gz portage-utils-f600bdbfd5ad7b3d67f82e448050c91621ca955c.tar.bz2 portage-utils-f600bdbfd5ad7b3d67f82e448050c91621ca955c.zip |
make MIN/MAX helpers generally available
Diffstat (limited to 'main.h')
-rw-r--r-- | main.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* * Copyright 2005-2010 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 - * $Header: /var/cvsroot/gentoo-projects/portage-utils/main.h,v 1.8 2011/03/30 05:33:19 vapier Exp $ + * $Header: /var/cvsroot/gentoo-projects/portage-utils/main.h,v 1.9 2011/10/02 21:52:29 vapier Exp $ * * Copyright 2005-2010 Ned Ludd - <solar@gentoo.org> * Copyright 2005-2010 Mike Frysinger - <vapier@gentoo.org> @@ -68,4 +68,11 @@ #define GETOPT_LONG(A, a, ex) \ getopt_long(argc, argv, ex A ## _FLAGS, a ## _long_opts, NULL) +#ifndef MIN +#define MIN(x, y) ((x) < (y) ? (x) : (y)) +#endif +#ifndef MAX +#define MAX(x, y) ((x) < (y) ? (y) : (x)) +#endif + #define a_argument required_argument |