aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-03-01 00:52:18 +0100
committerSimon Ser <contact@emersion.fr>2023-03-01 00:52:18 +0100
commitcab47d33e2ded0e990d18aec1689b3e2b156dee3 (patch)
tree51fca599293fef1a07d80b692e8fa7db0fdc6155
parentaf5cc860e10844d6840ffb314c18b06b43067e66 (diff)
util/log: prefix WLR_REL_SRC_DIR with underscore
Just like _WLR_FILENAME and _WLR_ATTRIB_PRINTF, this makes it more obvious that this isn't part of our API.
-rw-r--r--include/wlr/util/log.h4
-rw-r--r--meson.build2
2 files changed, 3 insertions, 3 deletions
diff --git a/include/wlr/util/log.h b/include/wlr/util/log.h
index 5e5d8393..587104cc 100644
--- a/include/wlr/util/log.h
+++ b/include/wlr/util/log.h
@@ -57,9 +57,9 @@ enum wlr_log_importance wlr_log_get_verbosity(void);
void _wlr_log(enum wlr_log_importance verbosity, const char *format, ...) _WLR_ATTRIB_PRINTF(2, 3);
void _wlr_vlog(enum wlr_log_importance verbosity, const char *format, va_list args) _WLR_ATTRIB_PRINTF(2, 0);
-#ifdef WLR_REL_SRC_DIR
+#ifdef _WLR_REL_SRC_DIR
// strip prefix from __FILE__, leaving the path relative to the project root
-#define _WLR_FILENAME ((const char *)__FILE__ + sizeof(WLR_REL_SRC_DIR) - 1)
+#define _WLR_FILENAME ((const char *)__FILE__ + sizeof(_WLR_REL_SRC_DIR) - 1)
#else
#define _WLR_FILENAME __FILE__
#endif
diff --git a/meson.build b/meson.build
index ff2778ce..d9587028 100644
--- a/meson.build
+++ b/meson.build
@@ -80,7 +80,7 @@ if cc.has_argument('-fmacro-prefix-map=/prefix/to/hide=')
)
else
add_project_arguments(
- '-DWLR_REL_SRC_DIR="@0@"'.format(relative_dir),
+ '-D_WLR_REL_SRC_DIR="@0@"'.format(relative_dir),
language: 'c',
)
endif