mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-12 18:23:04 +01:00
gpgscm: Fix for gcc < 4.5
* tests/gpgscm/scheme.c (MY_GCC_VERSION): New. (type_to_string): Use gcc build in only when supported. -- Note that we do not wnat to use the GPGRT macro to keep this file as close to upstream as possible.
This commit is contained in:
parent
9dba5ab403
commit
0ec989ee3f
@ -44,6 +44,16 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if __GNUC__
|
||||||
|
# define MY_GCC_VERSION (__GNUC__ * 10000 \
|
||||||
|
+ __GNUC_MINOR__ * 100 \
|
||||||
|
+ __GNUC_PATCHLEVEL__)
|
||||||
|
#else
|
||||||
|
# define MY_GCC_VERSION 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Used for documentation purposes, to signal functions in 'interface' */
|
/* Used for documentation purposes, to signal functions in 'interface' */
|
||||||
#define INTERFACE
|
#define INTERFACE
|
||||||
|
|
||||||
@ -169,7 +179,7 @@ type_to_string (enum scheme_types typ)
|
|||||||
case T_SINK: return "sink";
|
case T_SINK: return "sink";
|
||||||
case T_FRAME: return "frame";
|
case T_FRAME: return "frame";
|
||||||
}
|
}
|
||||||
#ifdef __GNUC__
|
#if MY_GCC_VERSION >= 40500 /* gcc >= 4.5.0 */
|
||||||
__builtin_unreachable ();
|
__builtin_unreachable ();
|
||||||
#else
|
#else
|
||||||
assert (! "not reached");
|
assert (! "not reached");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user