rpms/glib2/F-12 0001-Remove-default-implementation-of-async-filter-steam-.patch, NONE, 1.1 0002-Initialise-variable-in-g_time_val_from_iso8601.patch, NONE, 1.1 glib2.spec, 1.230, 1.231
Matthias Clasen
mclasen at fedoraproject.org
Thu Dec 10 06:24:23 UTC 2009
Author: mclasen
Update of /cvs/pkgs/rpms/glib2/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7962
Modified Files:
glib2.spec
Added Files:
0001-Remove-default-implementation-of-async-filter-steam-.patch
0002-Initialise-variable-in-g_time_val_from_iso8601.patch
Log Message:
Incorporate some upstream fixes
0001-Remove-default-implementation-of-async-filter-steam-.patch:
gfilterinputstream.c | 185 --------------------------------------------------
gfilteroutputstream.c | 174 -----------------------------------------------
2 files changed, 2 insertions(+), 357 deletions(-)
--- NEW FILE 0001-Remove-default-implementation-of-async-filter-steam-.patch ---
>From 31f928a2c32f5b219da9c30b8c5bbfcea2343426 Mon Sep 17 00:00:00 2001
From: Alexander Larsson <alexl at redhat.com>
Date: Mon, 7 Dec 2009 22:00:51 +0100
Subject: [PATCH 1/2] Remove default implementation of async filter steam ops
Not only is the default implementation broken (it causes infinite recursion
as seen in bug #603982), but its also worthless. If we just fall back on the
default stream operations we automatically get async version based on
the sync filter stream operations, which is what we want.
(cherry picked from commit 4fbbe190b7cbfd271bbb18428bc103ebffa41112)
---
gio/gfilterinputstream.c | 185 +--------------------------------------------
gio/gfilteroutputstream.c | 173 ------------------------------------------
2 files changed, 2 insertions(+), 356 deletions(-)
diff --git a/gio/gfilterinputstream.c b/gio/gfilterinputstream.c
index aa27465..53e305a 100644
--- a/gio/gfilterinputstream.c
+++ b/gio/gfilterinputstream.c
@@ -65,33 +65,6 @@ static gssize g_filter_input_stream_skip (GInputStream *stream
static gboolean g_filter_input_stream_close (GInputStream *stream,
GCancellable *cancellable,
GError **error);
-static void g_filter_input_stream_read_async (GInputStream *stream,
- void *buffer,
- gsize count,
- int io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
-static gssize g_filter_input_stream_read_finish (GInputStream *stream,
- GAsyncResult *result,
- GError **error);
-static void g_filter_input_stream_skip_async (GInputStream *stream,
- gsize count,
- int io_priority,
- GCancellable *cancellabl,
- GAsyncReadyCallback callback,
- gpointer datae);
-static gssize g_filter_input_stream_skip_finish (GInputStream *stream,
- GAsyncResult *result,
- GError **error);
-static void g_filter_input_stream_close_async (GInputStream *stream,
- int io_priority,
- GCancellable *cancellabl,
- GAsyncReadyCallback callback,
- gpointer data);
-static gboolean g_filter_input_stream_close_finish (GInputStream *stream,
- GAsyncResult *result,
- GError **error);
G_DEFINE_TYPE (GFilterInputStream, g_filter_input_stream, G_TYPE_INPUT_STREAM)
@@ -101,6 +74,8 @@ G_DEFINE_TYPE (GFilterInputStream, g_filter_input_stream, G_TYPE_INPUT_STREAM)
typedef struct
{
gboolean close_base;
+ GAsyncReadyCallback outstanding_callback;
+ gpointer outstanding_user_data;
} GFilterInputStreamPrivate;
static void
@@ -119,13 +94,6 @@ g_filter_input_stream_class_init (GFilterInputStreamClass *klass)
istream_class->skip = g_filter_input_stream_skip;
istream_class->close_fn = g_filter_input_stream_close;
- istream_class->read_async = g_filter_input_stream_read_async;
- istream_class->read_finish = g_filter_input_stream_read_finish;
- istream_class->skip_async = g_filter_input_stream_skip_async;
- istream_class->skip_finish = g_filter_input_stream_skip_finish;
- istream_class->close_async = g_filter_input_stream_close_async;
- istream_class->close_finish = g_filter_input_stream_close_finish;
-
g_type_class_add_private (klass, sizeof (GFilterInputStreamPrivate));
g_object_class_install_property (object_class,
@@ -346,154 +314,5 @@ g_filter_input_stream_close (GInputStream *stream,
return res;
}
-static void
-g_filter_input_stream_read_async (GInputStream *stream,
- void *buffer,
- gsize count,
- int io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- GFilterInputStream *filter_stream;
- GInputStream *base_stream;
-
- filter_stream = G_FILTER_INPUT_STREAM (stream);
- base_stream = filter_stream->base_stream;
-
- g_input_stream_read_async (base_stream,
- buffer,
- count,
- io_priority,
- cancellable,
- callback,
- user_data);
-}
-
-static gssize
-g_filter_input_stream_read_finish (GInputStream *stream,
- GAsyncResult *result,
- GError **error)
-{
- GFilterInputStream *filter_stream;
- GInputStream *base_stream;
- gssize nread;
-
- filter_stream = G_FILTER_INPUT_STREAM (stream);
- base_stream = filter_stream->base_stream;
-
- nread = g_input_stream_read_finish (base_stream,
- result,
- error);
-
- return nread;
-}
-
-static void
-g_filter_input_stream_skip_async (GInputStream *stream,
- gsize count,
- int io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- GFilterInputStream *filter_stream;
- GInputStream *base_stream;
-
- filter_stream = G_FILTER_INPUT_STREAM (stream);
- base_stream = filter_stream->base_stream;
-
- g_input_stream_skip_async (base_stream,
- count,
- io_priority,
- cancellable,
- callback,
- user_data);
-
-}
-
-static gssize
-g_filter_input_stream_skip_finish (GInputStream *stream,
- GAsyncResult *result,
- GError **error)
-{
- GFilterInputStream *filter_stream;
- GInputStream *base_stream;
- gssize nskipped;
-
- filter_stream = G_FILTER_INPUT_STREAM (stream);
- base_stream = filter_stream->base_stream;
-
- nskipped = g_input_stream_skip_finish (base_stream,
- result,
- error);
-
- return nskipped;
-}
-
-static void
-g_filter_input_stream_close_ready (GObject *object,
- GAsyncResult *result,
- gpointer user_data)
-{
- GSimpleAsyncResult *simple = user_data;
- GError *error = NULL;
-
- g_input_stream_close_finish (G_INPUT_STREAM (object), result, &error);
-
- if (error)
- {
- g_simple_async_result_set_from_error (simple, error);
- g_error_free (error);
- }
-
- g_simple_async_result_complete (simple);
- g_object_unref (simple);
-}
-
-static void
-g_filter_input_stream_close_async (GInputStream *stream,
- int io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- GSimpleAsyncResult *simple;
-
- simple = g_simple_async_result_new (G_OBJECT (stream),
- callback, user_data,
- g_filter_input_stream_close_async);
-
- if (GET_PRIVATE (stream)->close_base)
- {
- GFilterInputStream *filter_stream = G_FILTER_INPUT_STREAM (stream);
-
- g_input_stream_close_async (filter_stream->base_stream,
- io_priority, cancellable,
- g_filter_input_stream_close_ready,
- g_object_ref (simple));
- }
- else
- /* do nothing */
- g_simple_async_result_complete_in_idle (simple);
-
- g_object_unref (simple);
-}
-
-static gboolean
-g_filter_input_stream_close_finish (GInputStream *stream,
- GAsyncResult *result,
- GError **error)
-{
- GSimpleAsyncResult *simple;
-
- g_return_val_if_fail (g_simple_async_result_is_valid (
- result, G_OBJECT (stream), g_filter_input_stream_close_async), FALSE);
-
- simple = G_SIMPLE_ASYNC_RESULT (result);
-
- return !g_simple_async_result_propagate_error (simple, error);
-}
-
#define __G_FILTER_INPUT_STREAM_C__
#include "gioaliasdef.c"
diff --git a/gio/gfilteroutputstream.c b/gio/gfilteroutputstream.c
index 32fc6f7..606f669 100644
--- a/gio/gfilteroutputstream.c
+++ b/gio/gfilteroutputstream.c
@@ -64,34 +64,6 @@ static gboolean g_filter_output_stream_flush (GOutputStream *stream,
static gboolean g_filter_output_stream_close (GOutputStream *stream,
GCancellable *cancellable,
GError **error);
-static void g_filter_output_stream_write_async (GOutputStream *stream,
- const void *buffer,
- gsize count,
- int io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer data);
-static gssize g_filter_output_stream_write_finish (GOutputStream *stream,
- GAsyncResult *result,
- GError **error);
-static void g_filter_output_stream_flush_async (GOutputStream *stream,
- int io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer data);
-static gboolean g_filter_output_stream_flush_finish (GOutputStream *stream,
- GAsyncResult *result,
- GError **error);
-static void g_filter_output_stream_close_async (GOutputStream *stream,
- int io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer data);
-static gboolean g_filter_output_stream_close_finish (GOutputStream *stream,
- GAsyncResult *result,
- GError **error);
-
-
G_DEFINE_TYPE (GFilterOutputStream, g_filter_output_stream, G_TYPE_OUTPUT_STREAM)
@@ -118,12 +90,6 @@ g_filter_output_stream_class_init (GFilterOutputStreamClass *klass)
ostream_class->write_fn = g_filter_output_stream_write;
ostream_class->flush = g_filter_output_stream_flush;
ostream_class->close_fn = g_filter_output_stream_close;
- ostream_class->write_async = g_filter_output_stream_write_async;
- ostream_class->write_finish = g_filter_output_stream_write_finish;
- ostream_class->flush_async = g_filter_output_stream_flush_async;
- ostream_class->flush_finish = g_filter_output_stream_flush_finish;
- ostream_class->close_async = g_filter_output_stream_close_async;
- ostream_class->close_finish = g_filter_output_stream_close_finish;
g_type_class_add_private (klass, sizeof (GFilterOutputStreamPrivate));
@@ -342,144 +308,5 @@ g_filter_output_stream_close (GOutputStream *stream,
return res;
}
-static void
-g_filter_output_stream_write_async (GOutputStream *stream,
- const void *buffer,
- gsize count,
- int io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer data)
-{
- GFilterOutputStream *filter_stream;
-
- filter_stream = G_FILTER_OUTPUT_STREAM (stream);
-
- g_output_stream_write_async (filter_stream->base_stream,
- buffer,
- count,
- io_priority,
- cancellable,
- callback,
- data);
-
-}
-
-static gssize
-g_filter_output_stream_write_finish (GOutputStream *stream,
- GAsyncResult *result,
- GError **error)
-{
- GFilterOutputStream *filter_stream;
- gssize nwritten;
-
- filter_stream = G_FILTER_OUTPUT_STREAM (stream);
-
- nwritten = g_output_stream_write_finish (filter_stream->base_stream,
- result,
- error);
-
- return nwritten;
-}
-
-static void
-g_filter_output_stream_flush_async (GOutputStream *stream,
- int io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer data)
-{
- GFilterOutputStream *filter_stream;
-
- filter_stream = G_FILTER_OUTPUT_STREAM (stream);
-
- g_output_stream_flush_async (filter_stream->base_stream,
- io_priority,
- cancellable,
- callback,
- data);
-}
-
-static gboolean
-g_filter_output_stream_flush_finish (GOutputStream *stream,
- GAsyncResult *result,
- GError **error)
-{
- GFilterOutputStream *filter_stream;
- gboolean res;
-
- filter_stream = G_FILTER_OUTPUT_STREAM (stream);
-
- res = g_output_stream_flush_finish (filter_stream->base_stream,
- result,
- error);
-
- return res;
-}
-
-static void
-g_filter_output_stream_close_ready (GObject *object,
- GAsyncResult *result,
- gpointer user_data)
-{
- GSimpleAsyncResult *simple = user_data;
- GError *error = NULL;
-
- g_output_stream_close_finish (G_OUTPUT_STREAM (object), result, &error);
-
- if (error)
- {
- g_simple_async_result_set_from_error (simple, error);
- g_error_free (error);
- }
-
- g_simple_async_result_complete (simple);
- g_object_unref (simple);
-}
-
-static void
-g_filter_output_stream_close_async (GOutputStream *stream,
- int io_priority,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- GSimpleAsyncResult *simple;
-
- simple = g_simple_async_result_new (G_OBJECT (stream),
- callback, user_data,
- g_filter_output_stream_close_async);
-
- if (GET_PRIVATE (stream)->close_base)
- {
- GFilterOutputStream *filter_stream = G_FILTER_OUTPUT_STREAM (stream);
-
- g_output_stream_close_async (filter_stream->base_stream,
- io_priority, cancellable,
- g_filter_output_stream_close_ready,
- g_object_ref (simple));
- }
- else
- /* do nothing */
- g_simple_async_result_complete_in_idle (simple);
-
- g_object_unref (simple);
-}
-
-static gboolean
-g_filter_output_stream_close_finish (GOutputStream *stream,
- GAsyncResult *result,
- GError **error)
-{
- GSimpleAsyncResult *simple;
-
- g_return_val_if_fail (g_simple_async_result_is_valid (
- result, G_OBJECT (stream), g_filter_output_stream_close_async), FALSE);
-
- simple = G_SIMPLE_ASYNC_RESULT (result);
-
- return !g_simple_async_result_propagate_error (simple, error);
-}
-
#define __G_FILTER_OUTPUT_STREAM_C__
#include "gioaliasdef.c"
--
1.6.5.2
0002-Initialise-variable-in-g_time_val_from_iso8601.patch:
gtimer.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- NEW FILE 0002-Initialise-variable-in-g_time_val_from_iso8601.patch ---
>From 3a7a950b2b912d0c22ce1208b883128077319d1e Mon Sep 17 00:00:00 2001
From: Matthew W. S. Bell <matthew at bells23.org.uk>
Date: Wed, 2 Dec 2009 01:48:30 +0100
Subject: [PATCH 2/2] Initialise variable in g_time_val_from_iso8601()
The function does not initialise the struct tm,
giving it improper values of tm_isdst making the result
an hour out.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=603540
(cherry picked from commit 2321e5aed07154761223bb124770beba56700e41)
---
glib/gtimer.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/glib/gtimer.c b/glib/gtimer.c
index 407ce85..cd6a082 100644
--- a/glib/gtimer.c
+++ b/glib/gtimer.c
@@ -301,7 +301,7 @@ gboolean
g_time_val_from_iso8601 (const gchar *iso_date,
GTimeVal *time_)
{
- struct tm tm;
+ struct tm tm = {0};
long val;
g_return_val_if_fail (iso_date != NULL, FALSE);
@@ -328,7 +328,7 @@ g_time_val_from_iso8601 (const gchar *iso_date,
tm.tm_mon = strtoul (iso_date, (char **)&iso_date, 10) - 1;
if (*iso_date++ != '-')
- return FALSE;
+ return FALSE;
tm.tm_mday = strtoul (iso_date, (char **)&iso_date, 10);
}
@@ -390,7 +390,7 @@ g_time_val_from_iso8601 (const gchar *iso_date,
val = strtoul (iso_date + 1, (char **)&iso_date, 10);
if (*iso_date == ':')
- val = 60 * val + strtoul (iso_date + 1, (char **)&iso_date, 10);
+ val = 60 * val + strtoul (iso_date + 1, (char **)&iso_date, 10);
else
val = 60 * (val / 100) + (val % 100);
@@ -399,6 +399,7 @@ g_time_val_from_iso8601 (const gchar *iso_date,
else
{
/* No "Z" or offset, so local time */
+ tm.tm_isdst = -1; /* locale selects DST */
time_->tv_sec = mktime (&tm);
}
--
1.6.5.2
Index: glib2.spec
===================================================================
RCS file: /cvs/pkgs/rpms/glib2/F-12/glib2.spec,v
retrieving revision 1.230
retrieving revision 1.231
diff -u -p -r1.230 -r1.231
--- glib2.spec 1 Dec 2009 15:28:51 -0000 1.230
+++ glib2.spec 10 Dec 2009 06:24:23 -0000 1.231
@@ -3,7 +3,7 @@
Summary: A library of handy utility functions
Name: glib2
Version: 2.22.3
-Release: 1%{?dist}
+Release: 2%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
@@ -21,6 +21,10 @@ BuildRequires: glibc-devel
BuildRequires: automake autoconf libtool
BuildRequires: gtk-doc
+# upstream fixes
+Patch0: 0001-Remove-default-implementation-of-async-filter-steam-.patch
+Patch1: 0002-Initialise-variable-in-g_time_val_from_iso8601.patch
+
%description
GLib is the low-level core library that forms the basis
for projects such as GTK+ and GNOME. It provides data structure
@@ -52,6 +56,8 @@ of version 2 of the GLib library.
%prep
%setup -q -n glib-%{version}
+%patch0 -p1 -b .async-ops
+%patch1 -p1 -b .dst-time
%build
%configure --disable-gtk-doc --enable-static --with-runtime-libdir=../../%{_lib}
@@ -122,6 +128,9 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/lib*.a
%changelog
+* Thu Dec 10 2009 Matthias Clasen <mclasen at redhat.com> - 2.22.3-2
+- Incorporate two upstream fixes
+
* Tue Dec 1 2009 Matthias Clasen <mclasen at redhat.com> - 2.22.3-1
- Update to 2.22.2
- See http://download.gnome.org/sources/glib/2.22/glib-2.22.3.news
More information about the fedora-extras-commits
mailing list