diff options
Diffstat (limited to 'src/libsystemd')
-rw-r--r-- | src/libsystemd/Makefile | 49 | ||||
-rw-r--r-- | src/libsystemd/include/systemd/sd-bus.h | 4 | ||||
-rw-r--r-- | src/libsystemd/include/systemd/sd-utf8.h | 32 | ||||
-rw-r--r-- | src/libsystemd/sd_event_get_fd.xml | 2 | ||||
-rw-r--r-- | src/libsystemd/src/Makefile | 34 | ||||
-rw-r--r-- | src/libsystemd/src/sd-bus/bus-signature.h | 1 | ||||
-rw-r--r-- | src/libsystemd/src/sd-bus/bus-socket.h | 2 | ||||
-rw-r--r-- | src/libsystemd/src/sd-bus/bus-track.h | 2 | ||||
-rw-r--r-- | src/libsystemd/src/sd-device/device-internal.h | 2 | ||||
-rw-r--r-- | src/libsystemd/src/sd-journal/Makefile | 12 | ||||
-rw-r--r-- | src/libsystemd/src/sd-journal/audit-type.c | 2 | ||||
-rw-r--r-- | src/libsystemd/src/sd-journal/journal-def.h | 4 | ||||
-rw-r--r-- | src/libsystemd/src/sd-journal/mmap-cache.h | 2 | ||||
-rw-r--r-- | src/libsystemd/src/sd-netlink/local-addresses.c | 1 | ||||
-rw-r--r-- | src/libsystemd/src/sd-netlink/sd-netlink.h | 2 | ||||
-rw-r--r-- | src/libsystemd/src/sd-network/network-util.h | 2 | ||||
-rw-r--r-- | src/libsystemd/src/sd-utf8/sd-utf8.c | 35 | ||||
-rw-r--r-- | src/libsystemd/src/subdir.mk | 7 | ||||
-rw-r--r-- | src/libsystemd/src/test.mk | 5 |
19 files changed, 87 insertions, 113 deletions
diff --git a/src/libsystemd/Makefile b/src/libsystemd/Makefile index 5a64800194..77fa162d58 100644 --- a/src/libsystemd/Makefile +++ b/src/libsystemd/Makefile @@ -32,7 +32,16 @@ EXTRA_DIST += \ src/libsystemd/sd-bus/DIFFERENCES \ src/libsystemd/sd-bus/GVARIANT-SERIALIZATION -libsystemd_la_SOURCES = +#libsystemd_la_SOURCES = \ + $(libsystemd_internal_la_SOURCES) \ + $(libsystemd_journal_internal_la_SOURCES) + +#nodist_libsystemd_la_SOURCES = \ + $(nodist_libsystemd_internal_la_SOURCES) + +#libsystemd_la_CFLAGS = \ + $(libsystemd_internal_la_CFLAGS) \ + $(libsystemd_journal_internal_la_CFLAGS) libsystemd_la_LDFLAGS = \ $(AM_LDFLAGS) \ @@ -44,10 +53,12 @@ libsystemd_la_LIBADD = \ libbasic.la \ libsystemd-journal-internal.la +libsystemd_la_LIBADD = $(libsystemd-internal.DEPENDS) + pkgconfiglib_DATA += \ src/libsystemd/libsystemd.pc -pkginclude_HEADERS += \ +_pkginclude_HEADERS += \ src/systemd/sd-bus.h \ src/systemd/sd-bus-protocol.h \ src/systemd/sd-bus-vtable.h \ @@ -56,7 +67,12 @@ pkginclude_HEADERS += \ src/systemd/sd-id128.h \ src/systemd/sd-daemon.h -lib_LTLIBRARIES += \ +_pkginclude_HEADERS += \ + src/systemd/sd-journal.h \ + src/systemd/sd-messages.h \ + src/systemd/_sd-common.h + +rootlib_LTLIBRARIES += \ libsystemd.la # ------------------------------------------------------------------------------ @@ -82,23 +98,28 @@ tests += \ test-local-addresses \ test-resolve -test-libsystemd-sym.c: \ - $(top_builddir)/src/libsystemd/libsystemd.sym \ - src/systemd/sd-journal.h \ - src/systemd/sd-daemon.h \ - src/systemd/sd-login.h \ - src/systemd/sd-bus.h \ - src/systemd/sd-utf8.h \ - src/systemd/sd-resolve.h \ - src/systemd/sd-path.h \ - src/systemd/sd-event.h - $(generate-sym-test) +$(outdir)/test-libsystemd-sym.c: \ + $(srcdir)/include/systemd/sd-journal.h \ + $(srcdir)/include/systemd/sd-daemon.h \ + $(srcdir)/include/systemd/sd-login.h \ + $(srcdir)/include/systemd/sd-bus.h \ + $(srcdir)/include/systemd/sd-utf8.h \ + $(srcdir)/include/systemd/sd-resolve.h \ + $(srcdir)/include/systemd/sd-path.h \ + $(srcdir)/include/systemd/sd-event.h nodist_test_libsystemd_sym_SOURCES = \ test-libsystemd-sym.c test_libsystemd_sym_LDADD = \ libsystemd.la +$(DESTDIR)$(pkgincludedir)/%.h: $(srcdir)/include/systemd/%.h + @$(NORMAL_INSTALL) + $(am.INSTALL_HEADERS) + +files.sys.all += $(addprefix $(pkgincludedir)/,$(notdir $(_pkginclude_HEADERS))) +$(outdir)/libsystemd.la: $(srcdir)/libsystemd.sym + nested.subdirs += src include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libsystemd/include/systemd/sd-bus.h b/src/libsystemd/include/systemd/sd-bus.h index 4e338a3270..779c4b07d3 100644 --- a/src/libsystemd/include/systemd/sd-bus.h +++ b/src/libsystemd/include/systemd/sd-bus.h @@ -100,10 +100,10 @@ enum { /* Callbacks */ typedef int (*sd_bus_message_handler_t)(sd_bus_message *m, void *userdata, sd_bus_error *ret_error); -typedef int (*sd_bus_node_enumerator_t) (sd_bus *bus, const char *prefix, void *userdata, char ***ret_nodes, sd_bus_error *ret_error); -typedef int (*sd_bus_object_find_t) (sd_bus *bus, const char *path, const char *interface, void *userdata, void **ret_found, sd_bus_error *ret_error); typedef int (*sd_bus_property_get_t) (sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *ret_error); typedef int (*sd_bus_property_set_t) (sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *value, void *userdata, sd_bus_error *ret_error); +typedef int (*sd_bus_object_find_t) (sd_bus *bus, const char *path, const char *interface, void *userdata, void **ret_found, sd_bus_error *ret_error); +typedef int (*sd_bus_node_enumerator_t) (sd_bus *bus, const char *prefix, void *userdata, char ***ret_nodes, sd_bus_error *ret_error); typedef int (*sd_bus_track_handler_t) (sd_bus_track *track, void *userdata); #include "sd-bus-protocol.h" diff --git a/src/libsystemd/include/systemd/sd-utf8.h b/src/libsystemd/include/systemd/sd-utf8.h deleted file mode 100644 index 6781983878..0000000000 --- a/src/libsystemd/include/systemd/sd-utf8.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef foosdutf8hfoo -#define foosdutf8hfoo - -/*** - This file is part of systemd. - - Copyright 2013 Lennart Poettering - - systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - systemd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with systemd; If not, see <http://www.gnu.org/licenses/>. -***/ - -#include "_sd-common.h" - -_SD_BEGIN_DECLARATIONS; - -_sd_pure_ const char *sd_utf8_is_valid(const char *s); -_sd_pure_ const char *sd_ascii_is_valid(const char *s); - -_SD_END_DECLARATIONS; - -#endif diff --git a/src/libsystemd/sd_event_get_fd.xml b/src/libsystemd/sd_event_get_fd.xml index f68752dd0e..982f279657 100644 --- a/src/libsystemd/sd_event_get_fd.xml +++ b/src/libsystemd/sd_event_get_fd.xml @@ -119,7 +119,7 @@ <example> <title>Integration in the GLib event loop</title> - <programlisting><xi:include href="glib-event-glue.c" parse="text" /></programlisting> + <programlisting><xi:include href="sd_event_get_fd-glib-example.c" parse="text" /></programlisting> </example> </refsect1> diff --git a/src/libsystemd/src/Makefile b/src/libsystemd/src/Makefile index 9f380d71f1..61430ba68d 100644 --- a/src/libsystemd/src/Makefile +++ b/src/libsystemd/src/Makefile @@ -23,18 +23,16 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk -libsystemd_internal_la_SOURCES = \ +_libsystemd_internal_la_SOURCES = \ src/systemd/sd-bus.h \ src/systemd/sd-bus-protocol.h \ src/systemd/sd-bus-vtable.h \ - src/systemd/sd-utf8.h \ src/systemd/sd-event.h \ src/systemd/sd-netlink.h \ src/systemd/sd-resolve.h \ src/systemd/sd-login.h \ src/systemd/sd-id128.h \ src/systemd/sd-daemon.h \ - src/systemd/sd-path.h \ src/systemd/sd-network.h \ src/systemd/sd-hwdb.h \ src/systemd/sd-device.h \ @@ -81,7 +79,6 @@ libsystemd_internal_la_SOURCES = \ src/libsystemd/sd-bus/kdbus.h \ src/libsystemd/sd-bus/bus-dump.c \ src/libsystemd/sd-bus/bus-dump.h \ - src/libsystemd/sd-utf8/sd-utf8.c \ src/libsystemd/sd-event/sd-event.c \ src/libsystemd/sd-netlink/sd-netlink.c \ src/libsystemd/sd-netlink/netlink-internal.h \ @@ -99,7 +96,6 @@ libsystemd_internal_la_SOURCES = \ src/libsystemd/sd-id128/id128-util.c \ src/libsystemd/sd-daemon/sd-daemon.c \ src/libsystemd/sd-login/sd-login.c \ - src/libsystemd/sd-path/sd-path.c \ src/libsystemd/sd-network/sd-network.c \ src/libsystemd/sd-network/network-util.h \ src/libsystemd/sd-network/network-util.c \ @@ -121,12 +117,7 @@ libsystemd_internal_la_LIBADD = \ noinst_LTLIBRARIES += \ libsystemd-internal.la -pkginclude_HEADERS += \ - src/systemd/sd-journal.h \ - src/systemd/sd-messages.h \ - src/systemd/_sd-common.h - -libsystemd_journal_internal_la_SOURCES = \ +_libsystemd_journal_internal_la_SOURCES = \ src/journal/sd-journal.c \ src/systemd/sd-journal.h \ src/systemd/_sd-common.h \ @@ -151,7 +142,7 @@ libsystemd_journal_internal_la_SOURCES = \ src/shared/gcrypt-util.h \ src/shared/gcrypt-util.c -nodist_libsystemd_journal_internal_la_SOURCES = \ +#nodist_libsystemd_journal_internal_la_SOURCES = \ src/journal/audit_type-to-name.h gperf_txt_sources += \ @@ -180,7 +171,7 @@ libsystemd_journal_internal_la_LIBADD += \ endif # HAVE_LZ4 ifneq ($(HAVE_GCRYPT),) -libsystemd_journal_internal_la_SOURCES += \ +_libsystemd_journal_internal_la_SOURCES += \ src/journal/journal-authenticate.c \ src/journal/journal-authenticate.h \ src/journal/fsprg.c \ @@ -189,11 +180,26 @@ libsystemd_journal_internal_la_SOURCES += \ libsystemd_journal_internal_la_LIBADD += \ $(GCRYPT_LIBS) +libsystemd_journal_internal_la_CFLAGS += \ + $(GCRYPT_CFLAGS) endif # HAVE_GCRYPT -noinst_LTLIBRARIES += \ +#noinst_LTLIBRARIES += \ libsystemd-journal-internal.la +# Hook into the `am` module +libsystemd_internal_la_CFLAGS += $(libsystemd_journal_internal_la_CFLAGS) +libsystemd_internal_la_LIBADD += $(libsystemd_journal_internal_la_LIBADD) + +# Don't bother trying to hook into the `am` module for the sources; the only +# thing it adds over declaring the dependencies is adding the appropriate +# directories to am.subdirs=>at.subdirs; but we can do that here just as easily +# with nested.subdirs. +sd.libsystemd_SOURCES = +sd.libsystemd_SOURCES += $(patsubst src/libsystemd/%,%,$(filter %.c,$(_libsystemd_internal_la_SOURCES))) +sd.libsystemd_SOURCES += $(addprefix sd-journal/,$(notdir $(filter %.c,$(_libsystemd_journal_internal_la_SOURCES)))) +$(outdir)/libsystemd-internal.la: $(addprefix $(outdir)/,$(sd.libsystemd_SOURCES:.c=.lo)) + nested.subdirs += sd-bus nested.subdirs += sd-daemon nested.subdirs += sd-device diff --git a/src/libsystemd/src/sd-bus/bus-signature.h b/src/libsystemd/src/sd-bus/bus-signature.h index 1e0cd7f587..8b7a45cef5 100644 --- a/src/libsystemd/src/sd-bus/bus-signature.h +++ b/src/libsystemd/src/sd-bus/bus-signature.h @@ -20,6 +20,7 @@ ***/ #include <stdbool.h> +#include <sys/types.h> bool signature_is_single(const char *s, bool allow_dict_entry); bool signature_is_pair(const char *s); diff --git a/src/libsystemd/src/sd-bus/bus-socket.h b/src/libsystemd/src/sd-bus/bus-socket.h index 6e1d32e6a7..712e37bcc0 100644 --- a/src/libsystemd/src/sd-bus/bus-socket.h +++ b/src/libsystemd/src/sd-bus/bus-socket.h @@ -19,6 +19,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <stdbool.h> + #include <systemd/sd-bus.h> void bus_socket_setup(sd_bus *b); diff --git a/src/libsystemd/src/sd-bus/bus-track.h b/src/libsystemd/src/sd-bus/bus-track.h index 7d93a727d6..73b7503ae5 100644 --- a/src/libsystemd/src/sd-bus/bus-track.h +++ b/src/libsystemd/src/sd-bus/bus-track.h @@ -19,4 +19,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <systemd/sd-bus.h> + void bus_track_dispatch(sd_bus_track *track); diff --git a/src/libsystemd/src/sd-device/device-internal.h b/src/libsystemd/src/sd-device/device-internal.h index 029032f253..04384c66c5 100644 --- a/src/libsystemd/src/sd-device/device-internal.h +++ b/src/libsystemd/src/sd-device/device-internal.h @@ -23,6 +23,8 @@ #include "basic/hashmap.h" #include "basic/set.h" +#include "sd-device.h" + struct sd_device { uint64_t n_ref; diff --git a/src/libsystemd/src/sd-journal/Makefile b/src/libsystemd/src/sd-journal/Makefile index d0415fb0d3..f13c2b51fa 100644 --- a/src/libsystemd/src/sd-journal/Makefile +++ b/src/libsystemd/src/sd-journal/Makefile @@ -23,20 +23,22 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk -audit_list_includes = -include linux/audit.h -include missing.h +audit_list_includes = -include linux/audit.h -include $(topsrcdir)/src/libbasic/include/basic/missing.h ifneq ($(HAVE_AUDIT),) audit_list_includes += -include libaudit.h endif # HAVE_AUDIT -$(outdir)/audit_type-list.txt: +$(outdir)/audit_type-list.txt: $(call at.path,$(topsrcdir)/src/libbasic/include/basic/missing.h) $(AM_V_GEN)$(CPP) $(sd.ALL_CPPFLAGS) -dM $(audit_list_includes) - </dev/null | grep -vE 'AUDIT_.*(FIRST|LAST)_' | $(SED) -r -n 's/^#define\s+AUDIT_(\w+)\s+([0-9]{4})\s*$$/\1\t\2/p' | sort -k2 >$@ $(outdir)/audit_type-to-name.h: $(outdir)/audit_type-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *audit_type_to_string(int type) {\n\tswitch(type) {" } {printf " case AUDIT_%s: return \"%s\";\n", $$1, $$1 } END{ print " default: return NULL;\n\t}\n}\n" }' <$< >$@ # fsprg.c is a drop-in file using void pointer arithmetic -libsystemd_journal_internal_la_CFLAGS += \ - $(GCRYPT_CFLAGS) \ - -Wno-pointer-arith +$(outdir)/fsprg.lo: sd.ALL_CFLAGS += -Wno-pointer-arith + +sd.CPPFLAGS += $(libbasic.CPPFLAGS) +sd.CPPFLAGS += -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" +$(outdir)/audit-type.lo: $(outdir)/audit_type-to-name.h include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libsystemd/src/sd-journal/audit-type.c b/src/libsystemd/src/sd-journal/audit-type.c index 0ccbb456c3..f4dd1e9417 100644 --- a/src/libsystemd/src/sd-journal/audit-type.c +++ b/src/libsystemd/src/sd-journal/audit-type.c @@ -24,8 +24,8 @@ # include <libaudit.h> #endif -#include "audit_type-to-name.h" #include "basic/macro.h" #include "basic/missing.h" #include "audit-type.h" +#include "audit_type-to-name.h" diff --git a/src/libsystemd/src/sd-journal/journal-def.h b/src/libsystemd/src/sd-journal/journal-def.h index 7e456fcc66..86c843905a 100644 --- a/src/libsystemd/src/sd-journal/journal-def.h +++ b/src/libsystemd/src/sd-journal/journal-def.h @@ -32,16 +32,20 @@ */ typedef struct Header Header; + typedef struct ObjectHeader ObjectHeader; typedef union Object Object; + typedef struct DataObject DataObject; typedef struct FieldObject FieldObject; typedef struct EntryObject EntryObject; typedef struct HashTableObject HashTableObject; typedef struct EntryArrayObject EntryArrayObject; typedef struct TagObject TagObject; + typedef struct EntryItem EntryItem; typedef struct HashItem HashItem; + typedef struct FSSHeader FSSHeader; /* Object types */ diff --git a/src/libsystemd/src/sd-journal/mmap-cache.h b/src/libsystemd/src/sd-journal/mmap-cache.h index 199d944647..d7eca3c237 100644 --- a/src/libsystemd/src/sd-journal/mmap-cache.h +++ b/src/libsystemd/src/sd-journal/mmap-cache.h @@ -20,7 +20,9 @@ ***/ #include <stdbool.h> +#include <stdint.h> #include <sys/stat.h> +#include <sys/types.h> /* One context per object type, plus one of the header, plus one "additional" one */ #define MMAP_CACHE_MAX_CONTEXTS 9 diff --git a/src/libsystemd/src/sd-netlink/local-addresses.c b/src/libsystemd/src/sd-netlink/local-addresses.c index 81e99e0e5d..0baaab557f 100644 --- a/src/libsystemd/src/sd-netlink/local-addresses.c +++ b/src/libsystemd/src/sd-netlink/local-addresses.c @@ -22,7 +22,6 @@ #include "basic/macro.h" #include "local-addresses.h" -#include "netlink-util.h" #include "sd-netlink.h" static int address_compare(const void *_a, const void *_b) { diff --git a/src/libsystemd/src/sd-netlink/sd-netlink.h b/src/libsystemd/src/sd-netlink/sd-netlink.h index 8a8c85a004..7db35e1756 100644 --- a/src/libsystemd/src/sd-netlink/sd-netlink.h +++ b/src/libsystemd/src/sd-netlink/sd-netlink.h @@ -24,8 +24,8 @@ #include <netinet/ether.h> #include <netinet/in.h> -#include <linux/rtnetlink.h> #include <linux/neighbour.h> +#include <linux/rtnetlink.h> #include <systemd/_sd-common.h> #include <systemd/sd-event.h> diff --git a/src/libsystemd/src/sd-network/network-util.h b/src/libsystemd/src/sd-network/network-util.h index 26780dce28..902be2b2e8 100644 --- a/src/libsystemd/src/sd-network/network-util.h +++ b/src/libsystemd/src/sd-network/network-util.h @@ -19,6 +19,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <stdbool.h> + #include "sd-network.h" bool network_is_online(void); diff --git a/src/libsystemd/src/sd-utf8/sd-utf8.c b/src/libsystemd/src/sd-utf8/sd-utf8.c deleted file mode 100644 index 58e4a88f07..0000000000 --- a/src/libsystemd/src/sd-utf8/sd-utf8.c +++ /dev/null @@ -1,35 +0,0 @@ -/*** - This file is part of systemd. - - Copyright 2013 Lennart Poettering - - systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - systemd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with systemd; If not, see <http://www.gnu.org/licenses/>. -***/ - -#include <systemd/sd-utf8.h> - -#include "basic/utf8.h" -#include "basic/util.h" - -_public_ const char *sd_utf8_is_valid(const char *s) { - assert_return(s, NULL); - - return utf8_is_valid(s); -} - -_public_ const char *sd_ascii_is_valid(const char *s) { - assert_return(s, NULL); - - return ascii_is_valid(s); -} diff --git a/src/libsystemd/src/subdir.mk b/src/libsystemd/src/subdir.mk index 605b592401..71691e8dac 100644 --- a/src/libsystemd/src/subdir.mk +++ b/src/libsystemd/src/subdir.mk @@ -20,10 +20,13 @@ # # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see <http://www.gnu.org/licenses/>. -include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk + +include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk -sd.CPPFLAGS += -DLIBDIR=\"$(libdir)\" +sd.CPPFLAGS += $(libsystemd.CPPFLAGS) +sd.CPPFLAGS += $(libbasic.CPPFLAGS) +sd.CPPFLAGS += $(libshared.CPPFLAGS) sd.CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libsystemd/src/test.mk b/src/libsystemd/src/test.mk index de78dfd000..24ddf29958 100644 --- a/src/libsystemd/src/test.mk +++ b/src/libsystemd/src/test.mk @@ -20,8 +20,6 @@ # # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see <http://www.gnu.org/licenses/>. -include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk -include $(topsrcdir)/build-aux/Makefile.head.mk test_bus_marshal_SOURCES = \ src/libsystemd/sd-bus/test-bus-marshal.c @@ -153,6 +151,3 @@ test_resolve_SOURCES = \ test_resolve_LDADD = \ libsystemd-shared.la - - -include $(topsrcdir)/build-aux/Makefile.tail.mk |