-
Committer:
Philippe Proulx
-
Author(s):
Simon Marchi
-
Date:
2022-06-15 18:16:37 UTC
-
Revision ID:
git-v1:0c0001b4217c12afc799dea7534af0d05ca6e440
ctf: rename identifiers ERROR and DEBUG_PROCESS
When trying to use src/cpp-common/bt2/trace-ir.hpp, the build fails on
Windows (MinGW64) with:
CXX viewer-connection.o
In file included from /usr/x86_64-w64-mingw32/include/windows.h:71,
from /usr/x86_64-w64-mingw32/include/winsock2.h:23,
from /home/smarchi/src/babeltrace/src/compat/socket.h:15,
from /home/smarchi/src/babeltrace/src/plugins/ctf/lttng-live/viewer-connection.cpp:23:
/home/smarchi/src/babeltrace/src/cpp-common/bt2/trace-ir.hpp:1081:9: error: expected identifier before numeric constant
1081 | ERROR = BT_EVENT_CLASS_LOG_LEVEL_ERROR,
| ^~~~~
This is because there is an "ERROR" macro defined in wingdi.h:
https://github.com/mirror/mingw-w64/blob/7da5597116c5335e9a0f1154d171750bd2531baf/mingw-w64-headers/include/wingdi.h#L75
Same thing with DEBUG_PROCESS. Rename to ERROR to ERR and DEBUG_PROCESS
to DEBUG_PROC.
Change-Id: I31ed7578e84ce1bee883f0d9f121c1ea47e8a679
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8368
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>