diff options
author | Thomas Haller <thaller@redhat.com> | 2018-12-30 11:34:04 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-01-02 11:51:42 +0100 |
commit | 616abe865dc7606b4325e1e44fff587c83ad1de7 (patch) | |
tree | e89818c00b11d6a2302dd51a4fe0f181bc534917 | |
parent | 5f945adfaf8a2c9c34cd14209727dba4ef3284d8 (diff) | |
download | NetworkManager-616abe865dc7606b4325e1e44fff587c83ad1de7.tar.gz |
shared/trivial: add comment about compat macro _NM_CC_SUPPORT_GENERIC w.r.t. C11
C11 provides _Generic(). Until now we used it when the compiler supports
it (in extended --std=gnu99 mode). In practice, now that we require C11
it should always be present.
We will drop compatibility code in the future. For now, just add a comment
and keep it. The reason is, that "shared/nm-utils/nm-macros-internal.h"
may be used by VPN plugins or applet, which may or may not yet bump to
C11. Keeping it for now, allows for an easier update.
-rw-r--r-- | shared/nm-utils/nm-macros-internal.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/shared/nm-utils/nm-macros-internal.h b/shared/nm-utils/nm-macros-internal.h index 946864d08b..7cebd56cc0 100644 --- a/shared/nm-utils/nm-macros-internal.h +++ b/shared/nm-utils/nm-macros-internal.h @@ -460,6 +460,10 @@ NM_G_ERROR_MSG (GError *error) #endif #ifndef _NM_CC_SUPPORT_GENERIC +/* In the meantime, NetworkManager requires C11 and _Generic() should always be available. + * However, shared/nm-utils may also be used in VPN/applet, which possibly did not yet + * bump the C standard requirement. Leave this for the moment, but eventually we can + * drop it. */ #if (defined (__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9 ))) || (defined (__clang__)) #define _NM_CC_SUPPORT_GENERIC 1 #else |