Sun Mar 11 00:58:12 2018 UTC ()
Don't use () around __CONCAT as the expression is no longer constant


(pgoyette)
diff -r1.41.14.4 -r1.41.14.5 src/sys/sys/module.h

cvs diff -r1.41.14.4 -r1.41.14.5 src/sys/sys/module.h (expand / switch to unified diff)

--- src/sys/sys/module.h 2018/03/11 00:53:13 1.41.14.4
+++ src/sys/sys/module.h 2018/03/11 00:58:12 1.41.14.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: module.h,v 1.41.14.4 2018/03/11 00:53:13 pgoyette Exp $ */ 1/* $NetBSD: module.h,v 1.41.14.5 2018/03/11 00:58:12 pgoyette Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2008 The NetBSD Foundation, Inc. 4 * Copyright (c) 2008 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -143,37 +143,37 @@ static void __CONCAT(moddtor_,name)(void @@ -143,37 +143,37 @@ static void __CONCAT(moddtor_,name)(void
143 struct modinfo_chain *mc = &__CONCAT(mc,name); \ 143 struct modinfo_chain *mc = &__CONCAT(mc,name); \
144 if (cold) { \ 144 if (cold) { \
145 LIST_REMOVE(mc, mc_entries); \ 145 LIST_REMOVE(mc, mc_entries); \
146 } \ 146 } \
147} 147}
148 148
149#else /* RUMP_USE_CTOR */ 149#else /* RUMP_USE_CTOR */
150 150
151#define _MODULE_REGISTER(name) __link_set_add_rodata(modules, __CONCAT(name,_modinfo)); 151#define _MODULE_REGISTER(name) __link_set_add_rodata(modules, __CONCAT(name,_modinfo));
152 152
153#endif /* RUMP_USE_CTOR */ 153#endif /* RUMP_USE_CTOR */
154 154
155#define MODULE(class, name, required) \ 155#define MODULE(class, name, required) \
156 MODULE_ALIAS(class, name, required, NULL) 156 MODULE_WITH_ALIAS(class, name, required, NULL)
157 157
158#define MODULE_ALIAS(class, name, required, aliases) \ 158#define MODULE_WITH_ALIAS(class, name, required, aliases) \
159static int __CONCAT(name,_modcmd)(modcmd_t, void *); \ 159static int __CONCAT(name,_modcmd)(modcmd_t, void *); \
160static const char * const * __CONCAT(name,_aliases) = { aliases }; \ 160static const char * const * __CONCAT(name,_aliases) = { aliases }; \
161static const modinfo_t __CONCAT(name,_modinfo) = { \ 161static const modinfo_t __CONCAT(name,_modinfo) = { \
162 .mi_version = __NetBSD_Version__, \ 162 .mi_version = __NetBSD_Version__, \
163 .mi_class = (class), \ 163 .mi_class = (class), \
164 .mi_modcmd = __CONCAT(name,_modcmd), \ 164 .mi_modcmd = __CONCAT(name,_modcmd), \
165 .mi_name = __STRING(name), \ 165 .mi_name = __STRING(name), \
166 .mi_aliases = (__CONCAT(name,_aliases)), \ 166 .mi_aliases = __CONCAT(name,_aliases), \
167 .mi_required = (required) \ 167 .mi_required = (required) \
168}; \ 168}; \
169_MODULE_REGISTER(name) 169_MODULE_REGISTER(name)
170 170
171TAILQ_HEAD(modlist, module); 171TAILQ_HEAD(modlist, module);
172 172
173extern struct vm_map *module_map; 173extern struct vm_map *module_map;
174extern u_int module_count; 174extern u_int module_count;
175extern u_int module_builtinlist; 175extern u_int module_builtinlist;
176extern struct modlist module_list; 176extern struct modlist module_list;
177extern struct modlist module_builtins; 177extern struct modlist module_builtins;
178extern u_int module_gen; 178extern u_int module_gen;
179 179