summaryrefslogtreecommitdiff
path: root/gio
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2017-09-29 10:13:49 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2017-09-29 10:14:53 +0900
commit1d41222b881dd282aaeea02eb3d6eb926629511d (patch)
tree041a70eb2b8fffabec6c02ccf179f923fbd286d3 /gio
parent51fb06e60e7ca632ab70a0343d0012cbd509a2d7 (diff)
downloadglib-1d41222b881dd282aaeea02eb3d6eb926629511d.tar.gz
glib-1d41222b881dd282aaeea02eb3d6eb926629511d.tar.bz2
glib-1d41222b881dd282aaeea02eb3d6eb926629511d.zip
Imported Upstream version 2.53.6
Change-Id: If964220944e32c1b47c50784be38bcdd84514183 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'gio')
-rw-r--r--gio/Makefile.in4
-rw-r--r--gio/fam/Makefile.in4
-rw-r--r--gio/gdbus-2.0/codegen/Makefile.in4
-rw-r--r--gio/gdbus-2.0/codegen/config.py2
-rw-r--r--gio/gdbus-daemon-generated.c2
-rw-r--r--gio/gdbus-daemon-generated.h2
-rw-r--r--gio/gfile.c20
-rw-r--r--gio/gio-tool-cat.c12
-rw-r--r--gio/gio-tool-save.c37
-rw-r--r--gio/gio.rc8
-rw-r--r--gio/inotify/Makefile.in4
-rw-r--r--gio/kqueue/Makefile.in4
-rw-r--r--gio/meson.build2
-rw-r--r--gio/tests/Makefile.in4
-rw-r--r--gio/tests/gdbus-object-manager-example/Makefile.in4
-rw-r--r--gio/tests/meson.build12
-rw-r--r--gio/tests/modules/Makefile.in4
-rw-r--r--gio/tests/services/Makefile.in4
-rw-r--r--gio/win32/Makefile.in4
-rw-r--r--gio/xdgmime/Makefile.in4
-rw-r--r--gio/xdp-dbus.c2
-rw-r--r--gio/xdp-dbus.h2
22 files changed, 73 insertions, 72 deletions
diff --git a/gio/Makefile.in b/gio/Makefile.in
index dc0450eb5..410f86ce5 100644
--- a/gio/Makefile.in
+++ b/gio/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/gio/fam/Makefile.in b/gio/fam/Makefile.in
index 162580d1b..69b1ed0e9 100644
--- a/gio/fam/Makefile.in
+++ b/gio/fam/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/gio/gdbus-2.0/codegen/Makefile.in b/gio/gdbus-2.0/codegen/Makefile.in
index 66adfc5b4..3579c9a5c 100644
--- a/gio/gdbus-2.0/codegen/Makefile.in
+++ b/gio/gdbus-2.0/codegen/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/gio/gdbus-2.0/codegen/config.py b/gio/gdbus-2.0/codegen/config.py
index 8377ffad2..52f059af3 100644
--- a/gio/gdbus-2.0/codegen/config.py
+++ b/gio/gdbus-2.0/codegen/config.py
@@ -19,4 +19,4 @@
#
# Author: David Zeuthen <davidz@redhat.com>
-VERSION = "2.53.5"
+VERSION = "2.53.6"
diff --git a/gio/gdbus-daemon-generated.c b/gio/gdbus-daemon-generated.c
index fdff5295e..7fc4054ce 100644
--- a/gio/gdbus-daemon-generated.c
+++ b/gio/gdbus-daemon-generated.c
@@ -1,5 +1,5 @@
/*
- * Generated by gdbus-codegen 2.53.5. DO NOT EDIT.
+ * Generated by gdbus-codegen 2.53.6. DO NOT EDIT.
*
* The license of this code is the same as for the source it was derived from.
*/
diff --git a/gio/gdbus-daemon-generated.h b/gio/gdbus-daemon-generated.h
index 9a07ee0a3..44736dc2d 100644
--- a/gio/gdbus-daemon-generated.h
+++ b/gio/gdbus-daemon-generated.h
@@ -1,5 +1,5 @@
/*
- * Generated by gdbus-codegen 2.53.5. DO NOT EDIT.
+ * Generated by gdbus-codegen 2.53.6. DO NOT EDIT.
*
* The license of this code is the same as for the source it was derived from.
*/
diff --git a/gio/gfile.c b/gio/gfile.c
index 9967b7360..8a78e95c9 100644
--- a/gio/gfile.c
+++ b/gio/gfile.c
@@ -2777,9 +2777,10 @@ copy_stream_with_progress (GInputStream *in,
gpointer progress_callback_data,
GError **error)
{
- gssize n_read, n_written;
+ gssize n_read;
+ gsize n_written;
goffset current_size;
- char *buffer, *p;
+ char *buffer;
gboolean res;
goffset total_size;
GFileInfo *info;
@@ -2833,20 +2834,7 @@ copy_stream_with_progress (GInputStream *in,
current_size += n_read;
- p = buffer;
- while (n_read > 0)
- {
- n_written = g_output_stream_write (out, p, n_read, cancellable, error);
- if (n_written == -1)
- {
- res = FALSE;
- break;
- }
-
- p += n_written;
- n_read -= n_written;
- }
-
+ res = g_output_stream_write_all (out, buffer, n_read, &n_written, cancellable, error);
if (!res)
break;
diff --git a/gio/gio-tool-cat.c b/gio/gio-tool-cat.c
index 1e40188f6..394748815 100644
--- a/gio/gio-tool-cat.c
+++ b/gio/gio-tool-cat.c
@@ -42,11 +42,14 @@ static const GOptionEntry entries[] = {
{ NULL }
};
+/* 256k minus malloc overhead */
+#define STREAM_BUFFER_SIZE (1024*256 - 2*sizeof(gpointer))
+
static gboolean
cat (GFile *file)
{
GInputStream *in;
- char buffer[1024 * 8 + 1];
+ char *buffer;
char *p;
gssize res;
gboolean close_res;
@@ -62,10 +65,11 @@ cat (GFile *file)
return FALSE;
}
+ buffer = g_malloc (STREAM_BUFFER_SIZE);
success = TRUE;
while (1)
{
- res = g_input_stream_read (in, buffer, sizeof (buffer) - 1, NULL, &error);
+ res = g_input_stream_read (in, buffer, STREAM_BUFFER_SIZE, NULL, &error);
if (res > 0)
{
gssize written;
@@ -80,7 +84,7 @@ cat (GFile *file)
if (written == -1 && errsv != EINTR)
{
- print_file_error (file, _("Error writing to stdout"));
+ print_error ("%s", _("Error writing to stdout"));
success = FALSE;
goto out;
}
@@ -109,6 +113,8 @@ cat (GFile *file)
success = FALSE;
}
+ g_free (buffer);
+
return success;
}
diff --git a/gio/gio-tool-save.c b/gio/gio-tool-save.c
index 49ab720c4..ddf085f09 100644
--- a/gio/gio-tool-save.c
+++ b/gio/gio-tool-save.c
@@ -58,13 +58,15 @@ static const GOptionEntry entries[] =
{ NULL }
};
+/* 256k minus malloc overhead */
+#define STREAM_BUFFER_SIZE (1024*256 - 2*sizeof(gpointer))
+
static gboolean
save (GFile *file)
{
GOutputStream *out;
GFileCreateFlags flags;
- char buffer[1025];
- char *p;
+ char *buffer;
gssize res;
gboolean close_res;
GError *error;
@@ -88,30 +90,22 @@ save (GFile *file)
return FALSE;
}
+ buffer = g_malloc (STREAM_BUFFER_SIZE);
save_res = TRUE;
while (1)
{
- res = read (STDIN_FILENO, buffer, 1024);
+ res = read (STDIN_FILENO, buffer, STREAM_BUFFER_SIZE);
if (res > 0)
{
- gssize written;
-
- p = buffer;
- while (res > 0)
- {
- error = NULL;
- written = g_output_stream_write (out, p, res, NULL, &error);
- if (written == -1)
- {
- save_res = FALSE;
- print_error ("%s", error->message);
- g_error_free (error);
- goto out;
- }
- res -= written;
- p += written;
- }
+ g_output_stream_write_all (out, buffer, res, NULL, NULL, &error);
+ if (error != NULL)
+ {
+ save_res = FALSE;
+ print_file_error (file, error->message);
+ g_clear_error (&error);
+ goto out;
+ }
}
else if (res < 0)
{
@@ -129,7 +123,7 @@ save (GFile *file)
if (!close_res)
{
save_res = FALSE;
- print_error ("%s", error->message);
+ print_file_error (file, error->message);
g_error_free (error);
}
@@ -147,6 +141,7 @@ save (GFile *file)
}
g_object_unref (out);
+ g_free (buffer);
return save_res;
}
diff --git a/gio/gio.rc b/gio/gio.rc
index 2532d3c93..994fa8c0a 100644
--- a/gio/gio.rc
+++ b/gio/gio.rc
@@ -1,8 +1,8 @@
#include <winver.h>
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,53,5,0
- PRODUCTVERSION 2,53,5,0
+ FILEVERSION 2,53,6,0
+ PRODUCTVERSION 2,53,6,0
FILEFLAGSMASK 0
FILEFLAGS 0
FILEOS VOS__WINDOWS32
@@ -15,12 +15,12 @@ VS_VERSION_INFO VERSIONINFO
BEGIN
VALUE "CompanyName", "The GLib developer community"
VALUE "FileDescription", "Gio"
- VALUE "FileVersion", "2.53.5.0"
+ VALUE "FileVersion", "2.53.6.0"
VALUE "InternalName", "libgio-2.0-0"
VALUE "LegalCopyright", "Copyright © 2006-2011 Red Hat, Inc. and others."
VALUE "OriginalFilename", "libgio-2.0-0.dll"
VALUE "ProductName", "GLib"
- VALUE "ProductVersion", "2.53.5"
+ VALUE "ProductVersion", "2.53.6"
END
END
BLOCK "VarFileInfo"
diff --git a/gio/inotify/Makefile.in b/gio/inotify/Makefile.in
index 54f2d5158..f6ebb321c 100644
--- a/gio/inotify/Makefile.in
+++ b/gio/inotify/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/gio/kqueue/Makefile.in b/gio/kqueue/Makefile.in
index 59d84ccb7..8991efbf5 100644
--- a/gio/kqueue/Makefile.in
+++ b/gio/kqueue/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/gio/meson.build b/gio/meson.build
index 8f6ed1bbd..eae9bada8 100644
--- a/gio/meson.build
+++ b/gio/meson.build
@@ -369,7 +369,7 @@ if host_system == 'windows'
contenttype_sources += ['gcontenttype-win32.c']
platform_deps += [cc.find_library('shlwapi'),
cc.find_library('dnsapi'),
- cc.find_library('iphlpapi'),
+ iphlpapi_dep,
winsock2]
win32_sources += [
'gwin32registrykey.c',
diff --git a/gio/tests/Makefile.in b/gio/tests/Makefile.in
index 1732c7086..f43318fd1 100644
--- a/gio/tests/Makefile.in
+++ b/gio/tests/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/gio/tests/gdbus-object-manager-example/Makefile.in b/gio/tests/gdbus-object-manager-example/Makefile.in
index 018606664..e02efa127 100644
--- a/gio/tests/gdbus-object-manager-example/Makefile.in
+++ b/gio/tests/gdbus-object-manager-example/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/gio/tests/meson.build b/gio/tests/meson.build
index 0967f149a..e149a4bb3 100644
--- a/gio/tests/meson.build
+++ b/gio/tests/meson.build
@@ -80,6 +80,18 @@ test_c_args = [
# Check for libdbus1 - Optional - is only used in the GDBus test cases
# 1.2.14 required for dbus_message_set_serial
dbus1_dep = dependency('dbus-1', required : false, version : '>= 1.2.14')
+if not dbus1_dep.found()
+ if cc.get_id() == 'msvc'
+ # MSVC: Search for the DBus library by the configuration, which corresponds
+ # to the output of CMake builds of DBus. Note that debugoptimized
+ # is really a Release build with .PDB files.
+ if buildtype == 'debug'
+ dbus1_dep = cc.find_library('dbus-1d', required : false)
+ else
+ dbus1_dep = cc.find_library('dbus-1', required : false)
+ endif
+ endif
+endif
if dbus1_dep.found()
glib_conf.set('HAVE_DBUS1', 1)
diff --git a/gio/tests/modules/Makefile.in b/gio/tests/modules/Makefile.in
index 32f6e587e..5ebd16630 100644
--- a/gio/tests/modules/Makefile.in
+++ b/gio/tests/modules/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/gio/tests/services/Makefile.in b/gio/tests/services/Makefile.in
index 21460aaf8..1f6cec5a3 100644
--- a/gio/tests/services/Makefile.in
+++ b/gio/tests/services/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/gio/win32/Makefile.in b/gio/win32/Makefile.in
index 004e26b8e..fb04342cb 100644
--- a/gio/win32/Makefile.in
+++ b/gio/win32/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/gio/xdgmime/Makefile.in b/gio/xdgmime/Makefile.in
index cb60ba49a..81ba35c02 100644
--- a/gio/xdgmime/Makefile.in
+++ b/gio/xdgmime/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/gio/xdp-dbus.c b/gio/xdp-dbus.c
index 17d0dae0b..1767e9a94 100644
--- a/gio/xdp-dbus.c
+++ b/gio/xdp-dbus.c
@@ -1,5 +1,5 @@
/*
- * Generated by gdbus-codegen 2.53.5. DO NOT EDIT.
+ * Generated by gdbus-codegen 2.53.6. DO NOT EDIT.
*
* The license of this code is the same as for the source it was derived from.
*/
diff --git a/gio/xdp-dbus.h b/gio/xdp-dbus.h
index a394704c7..6bc69e009 100644
--- a/gio/xdp-dbus.h
+++ b/gio/xdp-dbus.h
@@ -1,5 +1,5 @@
/*
- * Generated by gdbus-codegen 2.53.5. DO NOT EDIT.
+ * Generated by gdbus-codegen 2.53.6. DO NOT EDIT.
*
* The license of this code is the same as for the source it was derived from.
*/