mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 18:52:09 +01:00
gdbus-codegen(1): Suggest --pragma-once for headers written to stdout
Otherwise we would generate a multiple-inclusion guard of the form `#ifndef __STDOUT__ ...`, which can only work for one D-Bus interface per translation unit. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
fc7942f46b
commit
040caa5f6a
@ -305,6 +305,10 @@ The following options are supported:
|
|||||||
This might make it necessary to use ``cc -include foo.h``, or generate a
|
This might make it necessary to use ``cc -include foo.h``, or generate a
|
||||||
filename like ``foo-impl.h`` and ``#include`` it into a wrapper ``.c`` file.
|
filename like ``foo-impl.h`` and ``#include`` it into a wrapper ``.c`` file.
|
||||||
|
|
||||||
|
For ``--header`` and ``--interface-info-header``, there is no obvious
|
||||||
|
name for a traditional multiple-inclusion guard when writing to standard
|
||||||
|
output, so using the ``--pragma-once`` option is recommended.
|
||||||
|
|
||||||
In the rare situation that the intended output filename starts with ``-``,
|
In the rare situation that the intended output filename starts with ``-``,
|
||||||
it should be prefixed with ``./``.
|
it should be prefixed with ``./``.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user