diff options
Diffstat (limited to 'src/common/cbasetypes.h')
-rw-r--r-- | src/common/cbasetypes.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index 89f7f8588..6053d86d9 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2018 Hercules Dev Team + * Copyright (C) 2012-2020 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -95,7 +95,7 @@ // debug function name #ifndef __NETBSD__ #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L -# if __GNUC__ >= 2 +# if __GNUC__ >= 2 || defined(WIN32) # define __func__ __FUNCTION__ # else # define __func__ "" @@ -313,6 +313,13 @@ typedef uintptr_t uintptr; #define PRAGMA_GCC5(str) #endif // ! defined(__GNUC__) && (GCC_VERSION >= 50000) +// Pragma macro only enabled on gcc >= 9 +#if defined(__GNUC__) && (GCC_VERSION >= 90000) +#define PRAGMA_GCC9(str) _Pragma(#str) +#else // ! defined(__GNUC__) && (GCC_VERSION >= 90000) +#define PRAGMA_GCC9(str) +#endif // ! defined(__GNUC__) && (GCC_VERSION >= 90000) + // fallthrough attribute only enabled on gcc >= 7.0 #if defined(__GNUC__) && (GCC_VERSION >= 70000) #define FALLTHROUGH __attribute__ ((fallthrough)); |