1.1 --- a/templates.h Sun Jan 15 17:36:19 2023 +0100
1.2 +++ b/templates.h Tue Feb 28 22:33:52 2023 +0100
1.3 @@ -1,7 +1,7 @@
1.4 /*
1.5 * Template output.
1.6 *
1.7 - * Copyright (C) 2019, 2020, 2021, 2022 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2019, 2020, 2021, 2022, 2023 Paul Boddie <paul@boddie.org.uk>
1.9 *
1.10 * This program is free software; you can redistribute it and/or
1.11 * modify it under the terms of the GNU General Public License as
1.12 @@ -185,19 +185,24 @@
1.13
1.14
1.15
1.16 -/* General header template. */
1.17 +/* General header templates. */
1.18
1.19 #define header_prologue \
1.20 -"#pragma once\n\n" \
1.21 +"#ifndef __%s__%s__\n" \
1.22 +"#define __%s__%s__\n\n" \
1.23 "#include <l4/sys/err.h>\n" \
1.24 "#include <l4/sys/types.h>\n"
1.25
1.26 +#define header_epilogue \
1.27 +"#endif\n"
1.28 +
1.29
1.30
1.31 /* Server templates. */
1.32
1.33 #define server_header_prologue \
1.34 -"#pragma once\n\n" \
1.35 +"#ifndef __SERVER__%s__\n" \
1.36 +"#define __SERVER__%s__\n\n" \
1.37 "#include <ipc/message.h>\n" \
1.38 "#include <ipc/server.h>\n"
1.39