git: 042f0f00c24b - main - cdefs: Move GNUC_PREREQ to top of file
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 27 Nov 2023 05:25:18 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=042f0f00c24b62dcd432a4ca2980467f2adef65e commit 042f0f00c24b62dcd432a4ca2980467f2adef65e Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2023-11-20 23:09:55 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2023-11-27 05:24:02 +0000 cdefs: Move GNUC_PREREQ to top of file It really should be closer to the the top of the file, so move it to the start of the compiler specific section. PR: 275221 (exp-run) Sponsored by: Netflix --- sys/sys/cdefs.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 7f3efc9300c9..c5b6190077b3 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -72,6 +72,16 @@ * having a compiler-agnostic source tree. */ +/* + * Macro to test if we're using a specific version of gcc or later. + */ +#if defined(__GNUC__) +#define __GNUC_PREREQ__(ma, mi) \ + (__GNUC__ > (ma) || __GNUC__ == (ma) && __GNUC_MINOR__ >= (mi)) +#else +#define __GNUC_PREREQ__(ma, mi) 0 +#endif + #if defined(__GNUC__) /* @@ -83,16 +93,6 @@ #endif /* __GNUC__ */ -/* - * Macro to test if we're using a specific version of gcc or later. - */ -#if defined(__GNUC__) -#define __GNUC_PREREQ__(ma, mi) \ - (__GNUC__ > (ma) || __GNUC__ == (ma) && __GNUC_MINOR__ >= (mi)) -#else -#define __GNUC_PREREQ__(ma, mi) 0 -#endif - /* * The __CONCAT macro is used to concatenate parts of symbol names, e.g. * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.