mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-14 13:23:53 +00:00
Use MR_GNUC in place of __GNUC__ in some spots.
Branches: main, 11.07 runtime/mercury_string.h: runtime/mercury_types.h: Use MR_GNUC in place of __GNUC__ in some spots.
This commit is contained in:
@@ -253,7 +253,7 @@ MR_Integer MR_hash_string(MR_ConstString);
|
|||||||
MR_Integer MR_hash_string2(MR_ConstString);
|
MR_Integer MR_hash_string2(MR_ConstString);
|
||||||
MR_Integer MR_hash_string3(MR_ConstString);
|
MR_Integer MR_hash_string3(MR_ConstString);
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if defined(MR_GNUC)
|
||||||
#define MR_hash_string(s) \
|
#define MR_hash_string(s) \
|
||||||
({ \
|
({ \
|
||||||
MR_Integer hash_string_result; \
|
MR_Integer hash_string_result; \
|
||||||
|
|||||||
@@ -42,8 +42,9 @@
|
|||||||
#if __STDC_VERSION__ >= 199901 /* January 1999 */
|
#if __STDC_VERSION__ >= 199901 /* January 1999 */
|
||||||
/* Use C9X-style variable-length arrays. */
|
/* Use C9X-style variable-length arrays. */
|
||||||
#define MR_VARIABLE_SIZED /* nothing */
|
#define MR_VARIABLE_SIZED /* nothing */
|
||||||
#elif defined(__GNUC__)
|
#elif defined(MR_GNUC)
|
||||||
/* Use GNU-style variable-length arrays */
|
/* Use GNU-style variable-length arrays */
|
||||||
|
/* Note: clang does *not* support these. */
|
||||||
#define MR_VARIABLE_SIZED 0
|
#define MR_VARIABLE_SIZED 0
|
||||||
#else
|
#else
|
||||||
/* Just fake it by pretending that the array has a fixed size */
|
/* Just fake it by pretending that the array has a fixed size */
|
||||||
|
|||||||
Reference in New Issue
Block a user