1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-20 04:59:11 +00:00

Codechange: Check if access __attribute__ is supported before trying to use it.

This commit is contained in:
milek7
2021-01-08 01:57:58 +01:00
committed by Charles Pigott
parent 639cfa43d2
commit c1fddb9a6a

View File

@@ -136,8 +136,12 @@
# endif
#endif /* __GNUC__ || __clang__ */
#if defined(__GNUC__)
# define NOACCESS(args) __attribute__ ((access (none, args)))
#if defined __has_attribute
# if __has_attribute (access)
# define NOACCESS(args) __attribute__ ((access (none, args)))
# else
# define NOACCESS(args)
# endif
#else
# define NOACCESS(args)
#endif