Commit 203dadaf by Nicolas Capens Committed by Nicolas Capens

Fix stringification of macro value

level of indirection because STRINGIFY(X) produces "X" regardless of what value X is defined to be. Bug: b/174801963 Change-Id: I1b2c1c987417ee1a97e109b52f41bdc865db8c77 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/50908Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 6e525dbc
......@@ -42,6 +42,9 @@
# define __x86__
#endif
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
namespace rr {
namespace {
......@@ -159,7 +162,7 @@ static int memfd_create(const char *name, unsigned int flags)
// MAP_PRIVATE so that underlying pages aren't shared.
int anonymousFd()
{
static int fd = memfd_create(#REACTOR_ANONYMOUS_MMAP_NAME, 0);
static int fd = memfd_create(MACRO_STRINGIFY(REACTOR_ANONYMOUS_MMAP_NAME), 0);
return fd;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment