static const struct af_name* lookup_af(register const char *str, register GPERF_LEN_TYPE len);
-#include "af-from-name.h"
-#include "af-to-name.h"
+#include "af-from-name.inc"
+#include "af-to-name.inc"
const char* af_to_name(int id) {
static const struct arphrd_name* lookup_arphrd(register const char *str, register GPERF_LEN_TYPE len);
-#include "arphrd-from-name.h"
-#include "arphrd-to-name.h"
+#include "arphrd-from-name.inc"
+#include "arphrd-to-name.inc"
int arphrd_from_name(const char *name) {
const struct arphrd_name *sc;
static const struct capability_name* lookup_capability(register const char *str, register GPERF_LEN_TYPE len);
-#include "cap-from-name.h"
-#include "cap-to-name.h"
+#include "cap-from-name.inc"
+#include "cap-to-name.inc"
const char* capability_to_name(int id) {
if (id < 0)
static const struct errno_name* lookup_errno(register const char *str,
register GPERF_LEN_TYPE len);
-#include "errno-from-name.h"
+#include "errno-from-name.inc"
#if !HAVE_STRERRORNAME_NP
-#include "errno-to-name.h"
+#include "errno-to-name.inc"
const char* errno_to_name(int id) {
const char* fs_type_to_string(statfs_f_type_t magic) {
switch (magic) {
-#include "filesystem-switch-case.h"
+#include "filesystem-switch-case.inc"
}
return NULL;
.name = "@known",
.help = "All known filesystems declared in the kernel",
.value =
-#include "filesystem-list.h"
+#include "filesystem-list.inc"
},
};
command : [generate_gperfs, item[2], item[3], '@INPUT@'],
capture : true)
- fname = '@0@-from-name.h'.format(item[0])
+ fname = '@0@-from-name.inc'.format(item[0])
target1 = custom_target(
fname,
input : gperf_file,
'@INPUT@'],
capture : true)
- fname = '@0@-to-name.h'.format(item[0])
+ fname = '@0@-to-name.inc'.format(item[0])
awkscript = '@0@-to-name.awk'.format(item[0])
target2 = custom_target(
fname,
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
generate_filesystem_list = find_program('generate-filesystem-list.py')
-fname = 'filesystem-list.h'
-filesystem_list_h = custom_target(
+fname = 'filesystem-list.inc'
+filesystem_list_inc = custom_target(
fname,
input : 'filesystems-gperf.gperf',
output : fname,
'@INPUT@'],
capture : true)
-generate_filesystem_switch_case_h = find_program('generate-filesystem-switch-case.py')
-fname = 'filesystem-switch-case.h'
-filesystem_switch_case_h = custom_target(
+generate_filesystem_switch_case_inc = find_program('generate-filesystem-switch-case.py')
+fname = 'filesystem-switch-case.inc'
+filesystem_switch_case_inc = custom_target(
fname,
input : 'filesystems-gperf.gperf',
- output : 'filesystem-switch-case.h',
- command : [generate_filesystem_switch_case_h,
+ output : fname,
+ command : [generate_filesystem_switch_case_inc,
'@INPUT@'],
capture : true)
-generated_sources += [filesystem_list_h, filesystem_switch_case_h, filesystems_gperf_h]
-basic_sources += [filesystem_list_h, filesystem_switch_case_h, filesystems_gperf_h]
+generated_sources += [filesystem_list_inc, filesystem_switch_case_inc, filesystems_gperf_h]
+basic_sources += [filesystem_list_inc, filesystem_switch_case_inc, filesystems_gperf_h]
libbasic_static = static_library(
'basic',
#include "audit-type.h"
#include "missing_audit.h"
-#include "audit_type-to-name.h"
+#include "audit_type-to-name.inc"
capture : true)
audit_type_to_name = custom_target(
- 'audit_type-to-name.h',
+ 'audit_type-to-name.inc',
input : ['audit_type-to-name.awk', audit_type_list_txt],
- output : 'audit_type-to-name.h',
+ output : 'audit_type-to-name.inc',
command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
capture : true)
static const struct dns_type_name *
lookup_dns_type (register const char *str, register GPERF_LEN_TYPE len);
-#include "dns_type-from-name.h"
-#include "dns_type-to-name.h"
+#include "dns_type-from-name.inc"
+#include "dns_type-to-name.inc"
int dns_type_from_string(const char *s) {
const struct dns_type_name *sc;
command : [generate_dns_type_gperf, 'dns_type', 'DNS_TYPE_', '@INPUT@'],
capture : true)
-dns_type_from_name_h = custom_target(
- 'dns_type-from-name.h',
+dns_type_from_name_inc = custom_target(
+ 'dns_type-from-name.inc',
input : gperf_file,
- output : 'dns_type-from-name.h',
+ output : 'dns_type-from-name.inc',
command : [gperf,
'-L', 'ANSI-C', '-t', '--ignore-case',
'-N', 'lookup_dns_type',
'@INPUT@'],
capture : true)
-dns_type_to_name_h = custom_target(
- 'dns_type-to-name.h',
+dns_type_to_name_inc = custom_target(
+ 'dns_type-to-name.inc',
input : ['dns_type-to-name.awk', dns_type_list_txt],
- output : 'dns_type-to-name.h',
+ output : 'dns_type-to-name.inc',
command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
capture : true)
output : 'resolved-dns-delegate-gperf.c',
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
-generated_sources += [dns_type_from_name_h, dns_type_to_name_h, resolved_gperf_c, resolved_dnssd_gperf_c, resolved_dns_delegate_gperf_c]
-systemd_resolved_extract_sources += [dns_type_from_name_h, dns_type_to_name_h, resolved_gperf_c, resolved_dnssd_gperf_c, resolved_dns_delegate_gperf_c]
+generated_sources += [dns_type_from_name_inc, dns_type_to_name_inc, resolved_gperf_c, resolved_dnssd_gperf_c, resolved_dns_delegate_gperf_c]
+systemd_resolved_extract_sources += [dns_type_from_name_inc, dns_type_to_name_inc, resolved_gperf_c, resolved_dnssd_gperf_c, resolved_dns_delegate_gperf_c]
if conf.get('ENABLE_DNS_OVER_TLS') == 1
systemd_resolved_extract_sources += files(
};
static const char* const ethtool_link_mode_bit_table[] = {
-# include "ethtool-link-mode.h"
+# include "ethtool-link-mode.inc"
};
/* Make sure the array is large enough to fit all bits */
assert_cc((ELEMENTSOF(ethtool_link_mode_bit_table)-1) / 32 < N_ADVERTISE);
static const struct ip_protocol_name* lookup_ip_protocol(register const char *str, register GPERF_LEN_TYPE len);
-#include "ip-protocol-from-name.h"
-#include "ip-protocol-to-name.h"
+#include "ip-protocol-from-name.inc"
+#include "ip-protocol-to-name.inc"
const char* ip_protocol_to_name(int id) {
endif
generate_syscall_list = find_program('generate-syscall-list.py')
-fname = 'syscall-list.h'
-syscall_list_h = custom_target(
+fname = 'syscall-list.inc'
+syscall_list_inc = custom_target(
fname,
input : syscall_list_txt,
output : fname,
'@INPUT@'],
capture : true)
-generated_sources += syscall_list_h
+generated_sources += syscall_list_inc
if conf.get('ENABLE_UTMP') == 1
shared_sources += files('utmp-wtmp.c')
if conf.get('HAVE_SECCOMP') == 1
shared_sources += files('seccomp-util.c')
- shared_sources += syscall_list_h
+ shared_sources += syscall_list_inc
endif
if conf.get('HAVE_LIBIPTC') == 1
command : [generate_gperfs, 'ip_protocol', 'IPPROTO_', '@INPUT@', '<netinet/in.h>'],
capture : true)
-fname = 'ip-protocol-from-name.h'
+fname = 'ip-protocol-from-name.inc'
target1 = custom_target(
fname,
input : gperf_file,
'@INPUT@'],
capture : true)
-fname = 'ip-protocol-to-name.h'
+fname = 'ip-protocol-to-name.inc'
awkscript = 'ip-protocol-to-name.awk'
target2 = custom_target(
fname,
generated_sources += [target1, target2]
shared_sources += [target1, target2]
-fname = 'ethtool-link-mode.h'
-ethtool_link_mode_h = custom_target(
+fname = 'ethtool-link-mode.inc'
+ethtool_link_mode_inc = custom_target(
fname,
input : ['ethtool-link-mode.py', '../basic/include/linux/ethtool.h'],
output : fname,
command : [python, '@INPUT0@', '--header', cpp, '@INPUT1@'],
capture : true)
-generated_sources += ethtool_link_mode_h
-shared_sources += ethtool_link_mode_h
+generated_sources += ethtool_link_mode_inc
+shared_sources += ethtool_link_mode_inc
sources += shared_sources
fname = 'ethtool-link-mode.xml'
.help = "All known syscalls declared in the kernel",
.value =
"@obsolete\0"
-#include "syscall-list.h"
+#include "syscall-list.inc"
},
};
/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include "af-list.h"
#include "tests.h"
_unused_
static const struct af_name* lookup_af(register const char *str, register GPERF_LEN_TYPE len);
-#include "af-from-name.h"
-#include "af-list.h"
-#include "af-to-name.h"
+#include "af-from-name.inc"
+#include "af-to-name.inc"
TEST(af_list) {
for (unsigned i = 0; i < ELEMENTSOF(af_names); i++) {
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "errno-list.h"
-#include "errno-to-name.h"
#include "tests.h"
+#include "errno-to-name.inc"
+
TEST(errno_list) {
ASSERT_NULL(errno_names[0]);
ASSERT_NULL(errno_to_name(0));
command : [generate_keyboard_keys_gperf, '@INPUT@'],
capture : true)
-fname = 'keyboard-keys-from-name.h'
-keyboard_keys_from_name_h = custom_target(
+fname = 'keyboard-keys-from-name.inc'
+keyboard_keys_from_name_inc = custom_target(
fname,
input : gperf_file,
output : fname,
'@INPUT@'],
capture : true)
-generated_sources += keyboard_keys_from_name_h
+generated_sources += keyboard_keys_from_name_inc
############################################################
'public' : true,
'sources' : udevadm_sources +
udevadm_extract_sources +
- keyboard_keys_from_name_h,
+ keyboard_keys_from_name_inc,
'include_directories' : [
libexec_template['include_directories'],
include_directories('.', 'net'),
#include "udev-builtin.h"
static const struct key_name *keyboard_lookup_key(const char *str, GPERF_LEN_TYPE len);
-#include "keyboard-keys-from-name.h"
+#include "keyboard-keys-from-name.inc"
static int install_force_release(sd_device *dev, const unsigned *release, unsigned release_count) {
sd_device *atkbd;