diff options
Diffstat (limited to 'source/blender/blenlib/BLI_utildefines.h')
-rw-r--r-- | source/blender/blenlib/BLI_utildefines.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h index 6d9188c1848..ef8a6015adb 100644 --- a/source/blender/blenlib/BLI_utildefines.h +++ b/source/blender/blenlib/BLI_utildefines.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BLI_UTILDEFINES_H -#define BLI_UTILDEFINES_H +#ifndef __BLI_UTILDEFINES_H__ +#define __BLI_UTILDEFINES_H__ /** \file BLI_utildefines.h * \ingroup bli @@ -225,10 +225,13 @@ #define GET_INT_FROM_POINTER(i) ((int)(intptr_t)(i)) /* Macro to convert a value to string in the preprocessor - * STRINGIFY_ARG: gives the defined name in the string - * STRINGIFY: gives the defined value. */ -#define STRINGIFY_ARG(x) #x -#define STRINGIFY(x) STRINGIFY_ARG(x) + * STRINGIFY_ARG: gives the argument as a string + * STRINGIFY_APPEND: appends any argument 'b' onto the string argument 'a', + * used by STRINGIFY because some preprocessors warn about zero arguments + * STRINGIFY: gives the argument's value as a string */ +#define STRINGIFY_ARG(x) "" #x +#define STRINGIFY_APPEND(a, b) "" a #b +#define STRINGIFY(x) STRINGIFY_APPEND("", x) /* useful for debugging */ #define AT __FILE__ ":" STRINGIFY(__LINE__) @@ -310,4 +313,4 @@ # define UNLIKELY(x) (x) #endif -#endif // BLI_UTILDEFINES_H +#endif // __BLI_UTILDEFINES_H__ |