diff options
author | Jens Georg <mail@jensge.org> | 2022-10-11 00:03:21 +0200 |
---|---|---|
committer | Jens Georg <mail@jensge.org> | 2022-10-11 00:03:21 +0200 |
commit | b4b76fc4322c1ef8ee6d09375a54a1589145edac (patch) | |
tree | 66ef4154c93b2482f660b9f47a67dfe4a64e679b /src | |
parent | 75ea59ed7d8fcb8fbfca23ba919b1db30c77a757 (diff) | |
download | gupnp-tools-b4b76fc4322c1ef8ee6d09375a54a1589145edac.tar.gz |
all: Bump glib to 2.68
Include config.h everywhere, add min/max check
Diffstat (limited to 'src')
30 files changed, 70 insertions, 67 deletions
diff --git a/src/av-cp/didl-dialog.c b/src/av-cp/didl-dialog.c index d13cdff..adda79b 100644 --- a/src/av-cp/didl-dialog.c +++ b/src/av-cp/didl-dialog.c @@ -18,6 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include "didl-dialog.h" #include "pretty-print.h" diff --git a/src/av-cp/entry-completion.c b/src/av-cp/entry-completion.c index c0e7330..e83fe6b 100644 --- a/src/av-cp/entry-completion.c +++ b/src/av-cp/entry-completion.c @@ -1,3 +1,5 @@ +#include <config.h> + #include "entry-completion.h" #include <libgupnp-av/gupnp-av.h> @@ -198,4 +200,4 @@ entry_completion_set_search_criteria (EntryCompletion *self, char const * const -1); it++; } -}
\ No newline at end of file +} diff --git a/src/av-cp/gui.c b/src/av-cp/gui.c index 04c3b88..082bc0f 100644 --- a/src/av-cp/gui.c +++ b/src/av-cp/gui.c @@ -18,12 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <string.h> -#include <stdlib.h> -#ifdef HAVE_CONFIG_H #include <config.h> -#endif + #include <gmodule.h> +#include <stdlib.h> +#include <string.h> #include "gui.h" #include "playlist-treeview.h" diff --git a/src/av-cp/main.c b/src/av-cp/main.c index 647e8ef..9ed3d67 100644 --- a/src/av-cp/main.c +++ b/src/av-cp/main.c @@ -20,9 +20,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include <libgupnp/gupnp-control-point.h> #include <libgupnp-av/gupnp-av.h> diff --git a/src/av-cp/playlist-treeview.c b/src/av-cp/playlist-treeview.c index bda5d09..58e1fbf 100644 --- a/src/av-cp/playlist-treeview.c +++ b/src/av-cp/playlist-treeview.c @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <string.h> #include <stdlib.h> -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif + #include <gmodule.h> #include "playlist-treeview.h" diff --git a/src/av-cp/renderer-combo.c b/src/av-cp/renderer-combo.c index 95d3c2b..4856052 100644 --- a/src/av-cp/renderer-combo.c +++ b/src/av-cp/renderer-combo.c @@ -18,11 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <string.h> -#include <stdlib.h> -#ifdef HAVE_CONFIG_H #include <config.h> -#endif + +#include <stdlib.h> +#include <string.h> #include "renderer-combo.h" #include "renderer-controls.h" diff --git a/src/av-cp/renderer-controls.c b/src/av-cp/renderer-controls.c index 3e03b03..3fb2aa4 100644 --- a/src/av-cp/renderer-controls.c +++ b/src/av-cp/renderer-controls.c @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <string.h> #include <stdlib.h> -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif + #include <gtk/gtk.h> #include <gmodule.h> diff --git a/src/av-cp/search-dialog.c b/src/av-cp/search-dialog.c index 29937bc..31cdfe8 100644 --- a/src/av-cp/search-dialog.c +++ b/src/av-cp/search-dialog.c @@ -18,6 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <glib/gi18n.h> #include <libgupnp-av/gupnp-av.h> diff --git a/src/av-cp/server-device.c b/src/av-cp/server-device.c index e767447..5630db7 100644 --- a/src/av-cp/server-device.c +++ b/src/av-cp/server-device.c @@ -18,6 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <string.h> #include "server-device.h" diff --git a/src/common/icons.c b/src/common/icons.c index 70044a9..c880b83 100644 --- a/src/common/icons.c +++ b/src/common/icons.c @@ -18,9 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifdef HAVE_CONFIG_H #include <config.h> -#endif #include <string.h> #include <stdlib.h> diff --git a/src/common/meson.build b/src/common/meson.build index 75b82db..f25933b 100644 --- a/src/common/meson.build +++ b/src/common/meson.build @@ -7,6 +7,6 @@ util_resource = gnome.compile_resources('common-resource', ) libutil = static_library('util', ['icons.c', 'icons.h', 'pretty-print.c', 'pretty-print.h'] + util_resource, - dependencies : [libxml, soup, gupnp, gtk]) + dependencies : [libxml, soup, gupnp, gtk, config_header]) util = declare_dependency(link_with: libutil, include_directories : include_directories('.')) diff --git a/src/common/pretty-print.c b/src/common/pretty-print.c index 0691ab8..c692664 100644 --- a/src/common/pretty-print.c +++ b/src/common/pretty-print.c @@ -18,6 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include "pretty-print.h" #include <libxml/xmlreader.h> diff --git a/src/discover/gssdp-discover.c b/src/discover/gssdp-discover.c index 9eef525..beb4ed9 100644 --- a/src/discover/gssdp-discover.c +++ b/src/discover/gssdp-discover.c @@ -21,6 +21,8 @@ * Boston, MA 02111-1307, USA. */ +#include <config.h> + #include <glib.h> #include <libgssdp/gssdp.h> #include <stdlib.h> @@ -87,10 +89,6 @@ int main (int argc, char *argv[]) { GOptionContext *context; GSSDPDiscover discover; -#if !GLIB_CHECK_VERSION(2, 35, 0) - g_type_init (); -#endif - context = g_option_context_new ("- discover devices using SSDP"); g_option_context_add_main_entries (context, entries, NULL); @@ -102,7 +100,11 @@ int main (int argc, char *argv[]) { g_option_context_free (context); - discover.client = gssdp_client_new (interface, &error); + discover.client = gssdp_client_new_full (interface, + NULL, + 0, + GSSDP_UDA_VERSION_1_0, + &error); if (error != NULL) { g_warning ("Failed to create GSSDP client: %s", error->message); g_error_free (error); diff --git a/src/discover/meson.build b/src/discover/meson.build index a67a403..6a3b303 100644 --- a/src/discover/meson.build +++ b/src/discover/meson.build @@ -1 +1 @@ -executable('gssdp-discover', ['gssdp-discover.c'], dependencies : [gssdp, gobject], install: true) +executable('gssdp-discover', ['gssdp-discover.c'], dependencies : [gssdp, gobject, config_header], install: true) diff --git a/src/event-dumper/event-dumper.c b/src/event-dumper/event-dumper.c index 77f901b..5c48b8b 100644 --- a/src/event-dumper/event-dumper.c +++ b/src/event-dumper/event-dumper.c @@ -1,3 +1,5 @@ +#include <config.h> + #include <glib-unix.h> #include <glib.h> #include <libgupnp/gupnp.h> diff --git a/src/event-dumper/meson.build b/src/event-dumper/meson.build index af358a7..6a172c4 100644 --- a/src/event-dumper/meson.build +++ b/src/event-dumper/meson.build @@ -1 +1 @@ -executable('gupnp-event-dumper', ['event-dumper.c'], dependencies : [gupnp, gobject], install: true) +executable('gupnp-event-dumper', ['event-dumper.c'], dependencies : [gupnp, gobject, config_header], install: true) diff --git a/src/network-light/gui.c b/src/network-light/gui.c index b15d366..ced5bbe 100644 --- a/src/network-light/gui.c +++ b/src/network-light/gui.c @@ -18,11 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <string.h> #include <stdlib.h> -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif + #include <gmodule.h> #include "gui.h" diff --git a/src/network-light/main.c b/src/network-light/main.c index 3286dbe..915afd1 100644 --- a/src/network-light/main.c +++ b/src/network-light/main.c @@ -22,9 +22,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifdef HAVE_CONFIG_H #include <config.h> -#endif #include <stdio.h> #include <locale.h> diff --git a/src/network-light/upnp.c b/src/network-light/upnp.c index 03301e6..934c0f1 100644 --- a/src/network-light/upnp.c +++ b/src/network-light/upnp.c @@ -20,6 +20,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <libgupnp/gupnp-root-device.h> #include <libgupnp/gupnp-service.h> #include <stdio.h> @@ -28,10 +30,6 @@ #include <gmodule.h> #include <glib/gstdio.h> -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - #include "gui.h" #include "upnp.h" #include "main.h" diff --git a/src/universal-cp/action-dialog.c b/src/universal-cp/action-dialog.c index dd5b271..c882b8a 100644 --- a/src/universal-cp/action-dialog.c +++ b/src/universal-cp/action-dialog.c @@ -20,13 +20,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <string.h> #include <stdlib.h> -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - #include <gmodule.h> #include <glib/gi18n.h> diff --git a/src/universal-cp/details-treeview.c b/src/universal-cp/details-treeview.c index d1e3716..ead4583 100644 --- a/src/universal-cp/details-treeview.c +++ b/src/universal-cp/details-treeview.c @@ -18,11 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <string.h> -#include <stdlib.h> -#ifdef HAVE_CONFIG_H #include <config.h> -#endif + +#include <stdlib.h> +#include <string.h> #include <gmodule.h> #include <glib/gi18n.h> diff --git a/src/universal-cp/device-treeview.c b/src/universal-cp/device-treeview.c index 3d31b9f..79a9e43 100644 --- a/src/universal-cp/device-treeview.c +++ b/src/universal-cp/device-treeview.c @@ -18,11 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <string.h> -#include <stdlib.h> -#ifdef HAVE_CONFIG_H #include <config.h> -#endif + +#include <stdlib.h> +#include <string.h> #include <gmodule.h> #include <glib/gi18n.h> diff --git a/src/universal-cp/event-treeview.c b/src/universal-cp/event-treeview.c index 4d8f2a2..facec79 100644 --- a/src/universal-cp/event-treeview.c +++ b/src/universal-cp/event-treeview.c @@ -18,11 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <string.h> -#include <stdlib.h> -#ifdef HAVE_CONFIG_H #include <config.h> -#endif + +#include <stdlib.h> +#include <string.h> #include <gmodule.h> #include <glib/gi18n.h> @@ -309,11 +308,7 @@ get_display_value (const char *value) if (size > MAX_VALUE_SIZE) size = MAX_VALUE_SIZE; -#if GLIB_CHECK_VERSION(2,68,0) display_value = g_memdup2 (value, size + 1); -#else - display_value = g_memdup (value, size + 1); -#endif display_value[size] = '\0'; return display_value; diff --git a/src/universal-cp/gui.c b/src/universal-cp/gui.c index 5dcea4b..7a57723 100644 --- a/src/universal-cp/gui.c +++ b/src/universal-cp/gui.c @@ -18,11 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <string.h> -#include <stdlib.h> -#ifdef HAVE_CONFIG_H #include <config.h> -#endif + +#include <stdlib.h> +#include <string.h> #include <gmodule.h> diff --git a/src/universal-cp/main.c b/src/universal-cp/main.c index 05e0704..d1bbe7b 100644 --- a/src/universal-cp/main.c +++ b/src/universal-cp/main.c @@ -20,9 +20,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include <libgupnp/gupnp.h> #include "gui.h" diff --git a/src/upload/container-search.c b/src/upload/container-search.c index c7285cd..a0e5306 100644 --- a/src/upload/container-search.c +++ b/src/upload/container-search.c @@ -18,6 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <libgupnp/gupnp.h> #include <libgupnp-av/gupnp-av.h> #include <gio/gio.h> diff --git a/src/upload/control_point.c b/src/upload/control_point.c index a9ee088..4aba5e7 100644 --- a/src/upload/control_point.c +++ b/src/upload/control_point.c @@ -18,6 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <libgupnp/gupnp.h> #include <string.h> #include <stdlib.h> diff --git a/src/upload/item-creation.c b/src/upload/item-creation.c index f51449d..90025a9 100644 --- a/src/upload/item-creation.c +++ b/src/upload/item-creation.c @@ -18,6 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <libgupnp/gupnp.h> #include <libgupnp-av/gupnp-av.h> #include <gio/gio.h> diff --git a/src/upload/main.c b/src/upload/main.c index 4e80592..88433d6 100644 --- a/src/upload/main.c +++ b/src/upload/main.c @@ -18,12 +18,11 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <libgupnp/gupnp.h> -#include <string.h> #include <stdlib.h> -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <string.h> #include "control_point.h" #include "item-creation.h" @@ -176,7 +175,11 @@ main (gint argc, } error = NULL; - upnp_context = gupnp_context_new (interface, 0, &error); + upnp_context = gupnp_context_new_full (interface, + NULL, + 0, + GSSDP_UDA_VERSION_1_0, + &error); if (error) { g_printerr ("Error creating the GUPnP context: %s\n", error->message); diff --git a/src/upload/transfer.c b/src/upload/transfer.c index f1b2d48..d4a15a7 100644 --- a/src/upload/transfer.c +++ b/src/upload/transfer.c @@ -18,6 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include <config.h> + #include <libgupnp/gupnp.h> #include <string.h> #include <stdlib.h> |