summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2021-02-04 08:48:06 +0100
committerThomas Haller <thaller@redhat.com>2021-02-09 12:38:17 +0100
commitbbb86cc11a190f3f51f0c1753974a9139cdf4908 (patch)
tree7e65957c3d35e5f20ef0ab394f50dd01b65318fe
parentd69f12f9e7c13e6fe02462fcbf1117f00714286d (diff)
downloadNetworkManager-bbb86cc11a190f3f51f0c1753974a9139cdf4908.tar.gz
all: add "nm-glib-aux/nm-default-glib-i18n-lib.h" as replacement for "nm-default.h"
-rw-r--r--Makefile.am4
-rw-r--r--libnm-core/meson.build3
-rw-r--r--libnm-core/nm-libnm-core-aux/nm-libnm-core-aux.c2
-rw-r--r--shared/meson.build15
-rw-r--r--shared/nm-base/nm-ethtool-base.c2
-rw-r--r--shared/nm-default.h2
-rw-r--r--shared/nm-glib-aux/nm-dbus-aux.c2
-rw-r--r--shared/nm-glib-aux/nm-dedup-multi.c2
-rw-r--r--shared/nm-glib-aux/nm-default-glib-i18n-lib.h21
-rw-r--r--shared/nm-glib-aux/nm-default-glib.h2
-rw-r--r--shared/nm-glib-aux/nm-enum-utils.c2
-rw-r--r--shared/nm-glib-aux/nm-errno.c2
-rw-r--r--shared/nm-glib-aux/nm-hash-utils.c2
-rw-r--r--shared/nm-glib-aux/nm-io-utils.c2
-rw-r--r--shared/nm-glib-aux/nm-json-aux.c2
-rw-r--r--shared/nm-glib-aux/nm-keyfile-aux.c2
-rw-r--r--shared/nm-glib-aux/nm-logging-base.c2
-rw-r--r--shared/nm-glib-aux/nm-random-utils.c2
-rw-r--r--shared/nm-glib-aux/nm-ref-string.c2
-rw-r--r--shared/nm-glib-aux/nm-secret-utils.c2
-rw-r--r--shared/nm-glib-aux/nm-shared-utils.c2
-rw-r--r--shared/nm-glib-aux/nm-time-utils.c2
-rw-r--r--shared/nm-log-core/nm-logging.c2
-rw-r--r--shared/nm-platform/nm-netlink.c2
-rw-r--r--shared/nm-platform/nm-platform-utils.c2
-rw-r--r--shared/nm-platform/nmp-netns.c2
-rw-r--r--shared/nm-udev-aux/nm-udev-utils.c2
27 files changed, 52 insertions, 37 deletions
diff --git a/Makefile.am b/Makefile.am
index 4b3e613f93..c487ae01a0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -383,7 +383,6 @@ shared_nm_glib_aux_cppflags = \
$(SANITIZER_LIB_CFLAGS) \
$(GLIB_CFLAGS) \
-DG_LOG_DOMAIN=\""libnm"\" \
- -DNETWORKMANAGER_COMPILATION='(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)' \
$(NULL)
noinst_LTLIBRARIES += shared/nm-glib-aux/libnm-glib-aux.la
@@ -398,6 +397,7 @@ shared_nm_glib_aux_libnm_glib_aux_la_SOURCES = \
shared/nm-glib-aux/nm-dbus-aux.h \
shared/nm-glib-aux/nm-dedup-multi.c \
shared/nm-glib-aux/nm-dedup-multi.h \
+ shared/nm-glib-aux/nm-default-glib-i18n-lib.h \
shared/nm-glib-aux/nm-default-glib.h \
shared/nm-glib-aux/nm-enum-utils.c \
shared/nm-glib-aux/nm-enum-utils.h \
@@ -501,7 +501,6 @@ shared_nm_log_core_libnm_log_core_la_CPPFLAGS = \
$(GLIB_CFLAGS) \
$(SYSTEMD_JOURNAL_CFLAGS) \
-DG_LOG_DOMAIN=\""NetworkManager"\" \
- -DNETWORKMANAGER_COMPILATION='(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)' \
$(NULL)
shared_nm_log_core_libnm_log_core_la_SOURCES = \
@@ -632,7 +631,6 @@ libnm_core_nm_libnm_core_aux_libnm_libnm_core_aux_la_CPPFLAGS = \
$(GLIB_CFLAGS) \
$(SANITIZER_LIB_CFLAGS) \
-DG_LOG_DOMAIN=\""libnm"\" \
- -DNETWORKMANAGER_COMPILATION='(NM_NETWORKMANAGER_COMPILATION_WITH_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)' \
$(NULL)
libnm_core_nm_libnm_core_aux_libnm_libnm_core_aux_la_SOURCES = \
diff --git a/libnm-core/meson.build b/libnm-core/meson.build
index 4883d695b5..6e1872af87 100644
--- a/libnm-core/meson.build
+++ b/libnm-core/meson.build
@@ -226,8 +226,7 @@ libnm_libnm_core_aux = static_library(
) + [libnm_core_enum_sources[1]],
dependencies: libnm_glib_aux_dep,
c_args: [
- '-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
- '-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_WITH_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)',
+ '-DG_LOG_DOMAIN="libnm"',
],
link_with: [
libnm_libnm_core_intern,
diff --git a/libnm-core/nm-libnm-core-aux/nm-libnm-core-aux.c b/libnm-core/nm-libnm-core-aux/nm-libnm-core-aux.c
index 651ab502b1..888dbac4b2 100644
--- a/libnm-core/nm-libnm-core-aux/nm-libnm-core-aux.c
+++ b/libnm-core/nm-libnm-core-aux/nm-libnm-core-aux.c
@@ -3,7 +3,7 @@
* Copyright (C) 2019 Red Hat, Inc.
*/
-#include "nm-default.h"
+#include "nm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nm-libnm-core-aux.h"
diff --git a/shared/meson.build b/shared/meson.build
index eacd5e0160..e311e8ab91 100644
--- a/shared/meson.build
+++ b/shared/meson.build
@@ -138,8 +138,7 @@ libnm_glib_aux = static_library(
),
dependencies: glib_nm_default_dep,
c_args: [
- '-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
- '-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)',
+ '-DG_LOG_DOMAIN="libnm"',
],
link_with: [
libc_siphash,
@@ -160,8 +159,7 @@ libnm_udev_aux = static_library(
libudev_dep,
],
c_args: [
- '-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
- '-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)',
+ '-DG_LOG_DOMAIN="libnm"',
],
)
@@ -177,8 +175,7 @@ libnm_base = static_library(
),
dependencies: libnm_glib_aux_dep,
c_args: [
- '-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
- '-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)',
+ '-DG_LOG_DOMAIN="libnm"',
],
)
@@ -197,7 +194,6 @@ libnm_log_core = static_library(
],
c_args: [
'-DG_LOG_DOMAIN="NetworkManager"',
- '-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)',
],
)
@@ -221,7 +217,6 @@ libnm_platform = static_library(
],
c_args: [
'-DG_LOG_DOMAIN="NetworkManager"',
- '-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)',
],
)
@@ -282,7 +277,7 @@ libnm_systemd_shared = static_library(
),
dependencies: glib_nm_default_dep,
c_args: [
- '-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
+ '-DG_LOG_DOMAIN="libnm"',
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD_SHARED',
],
)
@@ -302,7 +297,7 @@ libnm_systemd_logging_stub = static_library(
sources: 'systemd/nm-logging-stub.c',
dependencies: glib_nm_default_dep,
c_args: [
- '-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
+ '-DG_LOG_DOMAIN="libnm"',
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD_SHARED',
],
)
diff --git a/shared/nm-base/nm-ethtool-base.c b/shared/nm-base/nm-ethtool-base.c
index a2f662769d..52ff28714a 100644
--- a/shared/nm-base/nm-ethtool-base.c
+++ b/shared/nm-base/nm-ethtool-base.c
@@ -3,7 +3,7 @@
* Copyright (C) 2018 Red Hat, Inc.
*/
-#include "nm-default.h"
+#include "nm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nm-ethtool-base.h"
diff --git a/shared/nm-default.h b/shared/nm-default.h
index c771cca517..689c946b16 100644
--- a/shared/nm-default.h
+++ b/shared/nm-default.h
@@ -23,7 +23,7 @@
#endif
#if NETWORKMANAGER_COMPILATION \
- < (NM_NETWORKMANAGER_COMPILATION_GLIB | NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)
+ < (NM_NETWORKMANAGER_COMPILATION_GLIB | NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_PROG)
#error Dont include this header with such NETWORKMANAGER_COMPILATION
#endif
diff --git a/shared/nm-glib-aux/nm-dbus-aux.c b/shared/nm-glib-aux/nm-dbus-aux.c
index e4ba5234ca..ec409ff1fa 100644
--- a/shared/nm-glib-aux/nm-dbus-aux.c
+++ b/shared/nm-glib-aux/nm-dbus-aux.c
@@ -3,7 +3,7 @@
* Copyright (C) 2019 Red Hat, Inc.
*/
-#include "nm-default.h"
+#include "nm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nm-dbus-aux.h"
diff --git a/shared/nm-glib-aux/nm-dedup-multi.c b/shared/nm-glib-aux/nm-dedup-multi.c
index 498e543e95..99da3b3502 100644
--- a/shared/nm-glib-aux/nm-dedup-multi.c
+++ b/shared/nm-glib-aux/nm-dedup-multi.c
@@ -3,7 +3,7 @@
* Copyright (C) 2017 Red Hat, Inc.
*/
-#include "nm-default.h"
+#include "nm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nm-dedup-multi.h"
diff --git a/shared/nm-glib-aux/nm-default-glib-i18n-lib.h b/shared/nm-glib-aux/nm-default-glib-i18n-lib.h
new file mode 100644
index 0000000000..9393d1921e
--- /dev/null
+++ b/shared/nm-glib-aux/nm-default-glib-i18n-lib.h
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2015 Red Hat, Inc.
+ */
+
+#ifndef __NM_DEFAULT_GLIB_I18N_LIB_H__
+#define __NM_DEFAULT_GLIB_I18N_LIB_H__
+
+/*****************************************************************************/
+
+#define _NETWORKMANAGER_COMPILATION_GLIB_I18N_LIB
+
+#include "nm-glib-aux/nm-default-glib.h"
+
+#undef NETWORKMANAGER_COMPILATION
+#define NETWORKMANAGER_COMPILATION \
+ (NM_NETWORKMANAGER_COMPILATION_GLIB | NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)
+
+/*****************************************************************************/
+
+#endif /* __NM_DEFAULT_GLIB_I18N_LIB_H__ */
diff --git a/shared/nm-glib-aux/nm-default-glib.h b/shared/nm-glib-aux/nm-default-glib.h
index 1a75bcbc31..59da3ad7fe 100644
--- a/shared/nm-glib-aux/nm-default-glib.h
+++ b/shared/nm-glib-aux/nm-default-glib.h
@@ -6,6 +6,8 @@
#ifndef __NM_DEFAULT_GLIB_H__
#define __NM_DEFAULT_GLIB_H__
+/*****************************************************************************/
+
#include "nm-std-aux/nm-default-std.h"
#undef NETWORKMANAGER_COMPILATION
diff --git a/shared/nm-glib-aux/nm-enum-utils.c b/shared/nm-glib-aux/nm-enum-utils.c
index 9b778d6ba5..b06f2bb2fb 100644
--- a/shared/nm-glib-aux/nm-enum-utils.c
+++ b/shared/nm-glib-aux/nm-enum-utils.c
@@ -3,7 +3,7 @@
* Copyright (C) 2017 Red Hat, Inc.
*/
-#include "nm-default.h"
+#include "nm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nm-enum-utils.h"
#include "nm-str-buf.h"
diff --git a/shared/nm-glib-aux/nm-errno.c b/shared/nm-glib-aux/nm-errno.c
index 37e884c9c7..668606cacd 100644
--- a/shared/nm-glib-aux/nm-errno.c
+++ b/shared/nm-glib-aux/nm-errno.c
@@ -3,7 +3,7 @@
* Copyright (C) 2018 Red Hat, Inc.
*/
-#include "nm-default.h"
+#include "nm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nm-errno.h"
diff --git a/shared/nm-glib-aux/nm-hash-utils.c b/shared/nm-glib-aux/nm-hash-utils.c
index ec101843ca..29349b1d0d 100644
--- a/shared/nm-glib-aux/nm-hash-utils.c
+++ b/shared/nm-glib-aux/nm-hash-utils.c
@@ -3,7 +3,7 @@
* Copyright (C) 2017 Red Hat, Inc.
*/
-#include "nm-default.h"
+#include "nm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nm-hash-utils.h"
diff --git a/shared/nm-glib-aux/nm-io-utils.c b/shared/nm-glib-aux/nm-io-utils.c
index 3ccdcd8435..429591ad22 100644
--- a/shared/nm-glib-aux/nm-io-utils.c
+++ b/shared/nm-glib-aux/nm-io-utils.c
@@ -3,7 +3,7 @@
* Copyright (C) 2018 Red Hat, Inc.
*/
-#include "nm-default.h"
+#include "nm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nm-io-utils.h"
diff --git a/shared/nm-glib-aux/nm-json-aux.c b/shared/nm-glib-aux/nm-json-aux.c
index 2fa8ee880f..97ee606fe0 100644
--- a/shared/nm-glib-aux/nm-json-aux.c
+++ b/shared/nm-glib-aux/nm-json-aux.c
@@ -3,7 +3,7 @@
* Copyright (C) 2017 - 2019 Red Hat, Inc.
*/
-#include "nm-default.h"
+#include "nm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nm-json-aux.h"
diff --git a/shared/nm-glib-aux/nm-keyfile-aux.c b/shared/nm-glib-aux/nm-keyfile-aux.c
index 7a3ab95ade..b59627128f 100644
--- a/shared/nm-glib-aux/nm-keyfile-aux.c
+++ b/shared/nm-glib-aux/nm-keyfile-aux.c
@@ -3,7 +3,7 @@
* Copyright (C) 2019 Red Hat, Inc.
*/
-#include "nm-default.h"
+#include "nm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nm-keyfile-aux.h"
diff --git a/shared/nm-glib-aux/nm-logging-base.c b/shared/nm-glib-aux/nm-logging-base.c
index 5e11d7ee81..66b591b21e 100644
--- a/shared/nm-glib-aux/nm-logging-base.c
+++ b/shared/nm-glib-aux/nm-logging-base.c
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
-#include "nm-default.h"
+#include "nm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nm-logging-base.h"
diff --git a/shared/nm-glib-aux/nm-random-utils.c b/shared/nm-glib-aux/nm-random-utils.c
index 2ab38e45de..c95d368dd3 100644
--- a/shared/nm-glib-aux/nm-random-utils.c
+++ b/shared/nm-glib-aux/nm-random-utils.c
@@ -3,7 +3,7 @@
* Copyright (C) 2017 Red Hat, Inc.
*/
-#include "nm-default.h"
+#include "nm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nm-random-utils.h"
diff --git a/shared/nm-glib-aux/nm-ref-string.c b/shared/nm-glib-aux/nm-ref-string.c
index aa76582c84..902f1c802a 100644
--- a/shared/nm-glib-aux/nm-ref-string.c
+++ b/shared/nm-glib-aux/nm-ref-string.c
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
-#include "nm-default.h"
+#include "nm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nm-ref-string.h"
diff --git a/shared/nm-glib-aux/nm-secret-utils.c b/shared/nm-glib-aux/nm-secret-utils.c
index d5dd5f8eb3..8188b503a3 100644
--- a/shared/nm-glib-aux/nm-secret-utils.c
+++ b/shared/nm-glib-aux/nm-secret-utils.c
@@ -4,7 +4,7 @@
* Copyright (C) 2015 - 2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
*/
-#include "nm-default.h"
+#include "nm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nm-secret-utils.h"
diff --git a/shared/nm-glib-aux/nm-shared-utils.c b/shared/nm-glib-aux/nm-shared-utils.c
index 8e3f1879bd..492a3d5098 100644
--- a/shared/nm-glib-aux/nm-shared-utils.c
+++ b/shared/nm-glib-aux/nm-shared-utils.c
@@ -3,7 +3,7 @@
* Copyright (C) 2016 Red Hat, Inc.
*/
-#include "nm-default.h"
+#include "nm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nm-shared-utils.h"
diff --git a/shared/nm-glib-aux/nm-time-utils.c b/shared/nm-glib-aux/nm-time-utils.c
index 44e6b7bf6c..df98176a12 100644
--- a/shared/nm-glib-aux/nm-time-utils.c
+++ b/shared/nm-glib-aux/nm-time-utils.c
@@ -3,7 +3,7 @@
* Copyright (C) 2018 Red Hat, Inc.
*/
-#include "nm-default.h"
+#include "nm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nm-time-utils.h"
diff --git a/shared/nm-log-core/nm-logging.c b/shared/nm-log-core/nm-logging.c
index 495d5aca3c..cf3c3a8657 100644
--- a/shared/nm-log-core/nm-logging.c
+++ b/shared/nm-log-core/nm-logging.c
@@ -4,7 +4,7 @@
* Copyright (C) 2006 - 2008 Novell, Inc.
*/
-#include "nm-default.h"
+#include "nm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nm-logging.h"
diff --git a/shared/nm-platform/nm-netlink.c b/shared/nm-platform/nm-netlink.c
index f9ebd1b623..7a6d7e045b 100644
--- a/shared/nm-platform/nm-netlink.c
+++ b/shared/nm-platform/nm-netlink.c
@@ -3,7 +3,7 @@
* Copyright (C) 2018 Red Hat, Inc.
*/
-#include "nm-default.h"
+#include "nm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nm-netlink.h"
diff --git a/shared/nm-platform/nm-platform-utils.c b/shared/nm-platform/nm-platform-utils.c
index 53ef2746bf..c1c5b1a356 100644
--- a/shared/nm-platform/nm-platform-utils.c
+++ b/shared/nm-platform/nm-platform-utils.c
@@ -3,7 +3,7 @@
* Copyright (C) 2015 Red Hat, Inc.
*/
-#include "nm-default.h"
+#include "nm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nm-platform-utils.h"
diff --git a/shared/nm-platform/nmp-netns.c b/shared/nm-platform/nmp-netns.c
index 01aefde66a..c7cb617b7e 100644
--- a/shared/nm-platform/nmp-netns.c
+++ b/shared/nm-platform/nmp-netns.c
@@ -3,7 +3,7 @@
* Copyright (C) 2016 Red Hat, Inc.
*/
-#include "nm-default.h"
+#include "nm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nmp-netns.h"
diff --git a/shared/nm-udev-aux/nm-udev-utils.c b/shared/nm-udev-aux/nm-udev-utils.c
index f7e8e6d9f1..0b941dff53 100644
--- a/shared/nm-udev-aux/nm-udev-utils.c
+++ b/shared/nm-udev-aux/nm-udev-utils.c
@@ -3,7 +3,7 @@
* Copyright (C) 2017 Red Hat, Inc.
*/
-#include "nm-default.h"
+#include "nm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nm-udev-utils.h"