chiark / gitweb /
Make bus errno mappings non-static
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 31 Oct 2014 14:07:54 +0000 (10:07 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 31 Oct 2014 15:32:00 +0000 (11:32 -0400)
commitfedfcdee6f55c3f183752b7fac4879bf41eed60b
treec37f5157e631d6e9426d8eb9905c8894061c0205
parent5e071f200c4cc86443af07a876ee0e1c2901fda1
Make bus errno mappings non-static

__attribute__((used)) is not enough to force static variables to
be carried over to a compiled program from a library. Mappings defined
in libsystemd-shared.a were not visible in the compiled binaries.
To ensure that the mappings are present in the final binary, the
tables are made non-static and are given a real unique name by which
they can be referenced.

To use a mapping defined not in the local compilation unit (e.g. in
a library) a reference to the mapping table is added. This is done
by including a declaration in the header file.

Expected values in test-engine are fixed to reflect the new mappings.
src/libsystemd/sd-bus/bus-error.c
src/libsystemd/sd-bus/test-bus-error.c
src/shared/bus-errors.c
src/shared/bus-errors.h
src/systemd/sd-bus.h
src/test/test-engine.c
src/timedate/timedated.c