[PATCH 3/7] alt definition for STANDARD_GNU89 & friends

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It may be useful to known the base standard and if we're using
the gnu extensions but as these are defined it can only be done
on a case-by-case basis.

Change these defines so that:
* the GNU extensions is the least significant bit
* the versions can be easily compared with <, >, <= and >=

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 lib.h | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib.h b/lib.h
index 1eb455618..7958359c1 100644
--- a/lib.h
+++ b/lib.h
@@ -225,13 +225,16 @@ enum {
 extern int arch_cmodel;
 
 enum standard {
+	STANDARD_NONE,
+	STANDARD_GNU,
 	STANDARD_C89,
+	STANDARD_GNU89 = STANDARD_C89 | STANDARD_GNU,
 	STANDARD_C94,
+	STANDARD_GNU94 = STANDARD_C94 | STANDARD_GNU,
 	STANDARD_C99,
+	STANDARD_GNU99 = STANDARD_C99 | STANDARD_GNU,
 	STANDARD_C11,
-	STANDARD_GNU11,
-	STANDARD_GNU89,
-	STANDARD_GNU99,
+	STANDARD_GNU11 = STANDARD_C11 | STANDARD_GNU,
 };
 extern enum standard standard;
 
-- 
2.24.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux