all: add "nm-glib-aux/nm-default-glib-i18n-prog.h" as replacement for "nm-default.h"

This commit is contained in:
Thomas Haller 2021-02-04 09:56:37 +01:00
parent bbb86cc11a
commit 8f4f91b667
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
8 changed files with 32 additions and 17 deletions

View file

@ -398,6 +398,7 @@ shared_nm_glib_aux_libnm_glib_aux_la_SOURCES = \
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-i18n-prog.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 \
@ -552,8 +553,7 @@ check_programs += shared/nm-platform/tests/test-nm-platform
shared_nm_platform_tests_test_nm_platform_CPPFLAGS = \
$(dflt_cppflags) \
-I$(srcdir)/shared \
-DNETWORKMANAGER_COMPILATION_TEST \
-DNETWORKMANAGER_COMPILATION='(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_PROG)' \
-DG_LOG_DOMAIN=\""test"\" \
$(CODE_COVERAGE_CFLAGS) \
$(SYSTEMD_JOURNAL_CFLAGS) \
$(GLIB_CFLAGS) \
@ -740,8 +740,7 @@ check_programs += shared/nm-glib-aux/tests/test-shared-general
shared_nm_glib_aux_tests_test_shared_general_CPPFLAGS = \
$(dflt_cppflags) \
-I$(srcdir)/shared \
-DNETWORKMANAGER_COMPILATION_TEST \
-DNETWORKMANAGER_COMPILATION='(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_PROG)' \
-DG_LOG_DOMAIN=\""test"\" \
$(CODE_COVERAGE_CFLAGS) \
$(GLIB_CFLAGS) \
$(SANITIZER_LIB_CFLAGS) \
@ -769,8 +768,7 @@ check_programs += shared/nm-glib-aux/tests/test-json-aux
shared_nm_glib_aux_tests_test_json_aux_CPPFLAGS = \
$(dflt_cppflags) \
-I$(srcdir)/shared \
-DNETWORKMANAGER_COMPILATION_TEST \
-DNETWORKMANAGER_COMPILATION='(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_PROG)' \
-DG_LOG_DOMAIN=\""test"\" \
$(CODE_COVERAGE_CFLAGS) \
$(GLIB_CFLAGS) \
$(JANSSON_CFLAGS) \

View file

@ -22,8 +22,7 @@
#error Define NETWORKMANAGER_COMPILATION accordingly
#endif
#if NETWORKMANAGER_COMPILATION \
< (NM_NETWORKMANAGER_COMPILATION_GLIB | NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_PROG)
#if NETWORKMANAGER_COMPILATION < NM_NETWORKMANAGER_COMPILATION_CLIENT
#error Dont include this header with such NETWORKMANAGER_COMPILATION
#endif

View file

@ -0,0 +1,21 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
* Copyright (C) 2015 Red Hat, Inc.
*/
#ifndef __NM_DEFAULT_GLIB_I18N_PROG_H__
#define __NM_DEFAULT_GLIB_I18N_PROG_H__
/*****************************************************************************/
#define _NETWORKMANAGER_COMPILATION_GLIB_I18N_PROG
#include "nm-glib-aux/nm-default-glib.h"
#undef NETWORKMANAGER_COMPILATION
#define NETWORKMANAGER_COMPILATION \
(NM_NETWORKMANAGER_COMPILATION_GLIB | NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_PROG)
/*****************************************************************************/
#endif /* __NM_DEFAULT_GLIB_I18N_PROG_H__ */

View file

@ -4,8 +4,7 @@ exe = executable(
'test-shared-general',
'test-shared-general.c',
c_args: [
'-DNETWORKMANAGER_COMPILATION_TEST',
'-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_PROG)',
'-DG_LOG_DOMAIN="test"',
],
dependencies: libnm_glib_aux_dep,
link_with: libnm_systemd_logging_stub,
@ -23,8 +22,7 @@ if jansson_dep.found()
'test-json-aux',
'test-json-aux.c',
c_args: [
'-DNETWORKMANAGER_COMPILATION_TEST',
'-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_PROG)',
'-DG_LOG_DOMAIN="test"',
],
dependencies: [
libnm_glib_aux_dep,

View file

@ -2,7 +2,7 @@
#define NM_TEST_UTILS_NO_LIBNM 1
#include "nm-default.h"
#include "nm-glib-aux/nm-default-glib-i18n-prog.h"
#include <jansson.h>

View file

@ -5,7 +5,7 @@
#define NM_TEST_UTILS_NO_LIBNM 1
#include "nm-default.h"
#include "nm-glib-aux/nm-default-glib-i18n-prog.h"
#include "nm-std-aux/unaligned.h"
#include "nm-glib-aux/nm-random-utils.h"

View file

@ -4,8 +4,7 @@ exe = executable(
'test-nm-platform',
'test-nm-platform.c',
c_args: [
'-DNETWORKMANAGER_COMPILATION_TEST',
'-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_PROG)',
'-DG_LOG_DOMAIN="test"',
],
dependencies: [
libnm_log_core_dep,

View file

@ -2,7 +2,7 @@
#define NM_TEST_UTILS_NO_LIBNM 1
#include "nm-default.h"
#include "nm-glib-aux/nm-default-glib-i18n-prog.h"
#include "nm-log-core/nm-logging.h"
#include "nm-platform/nm-netlink.h"