summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2016-07-12 14:12:29 +0100
committerDan Winship <danw@gnome.org>2016-07-29 15:11:08 -0400
commit3f6cbd5714cf8d6f8fa33c08182ac840de0f4705 (patch)
tree08a32bd11ba7c3bc9fd29b5cf8f52038f0298ffb
parentb97b9ef0d0d3736a4fa096389fba7cd2b5f5e3ed (diff)
downloadlibsoup-gnome-3-20.tar.gz
Prefix signal ID enum entries with SIGNAL_ to avoid using EOFgnome-3-20
glibc defines EOF as a macro, so we cannot use that as the name for a signal ID enum entry, otherwise it will be preprocessed to some number if we end up with the wrong header included, and compilation will fail. Instead, prefix signal ID enum entries with ‘SIGNAL_’ in SoupCacheClientInputStream and SoupClientInputStream. https://bugzilla.gnome.org/show_bug.cgi?id=768731
-rw-r--r--libsoup/soup-cache-client-input-stream.c12
-rw-r--r--libsoup/soup-client-input-stream.c8
2 files changed, 10 insertions, 10 deletions
diff --git a/libsoup/soup-cache-client-input-stream.c b/libsoup/soup-cache-client-input-stream.c
index cea39a3a..11bb2602 100644
--- a/libsoup/soup-cache-client-input-stream.c
+++ b/libsoup/soup-cache-client-input-stream.c
@@ -14,8 +14,8 @@
#include "soup-message-private.h"
enum {
- EOF,
- CLOSED,
+ SIGNAL_EOF,
+ SIGNAL_CLOSED,
LAST_SIGNAL
};
@@ -41,7 +41,7 @@ soup_cache_client_input_stream_read_fn (GInputStream *stream,
read_fn (stream, buffer, count, cancellable, error);
if (nread == 0)
- g_signal_emit (stream, signals[EOF], 0);
+ g_signal_emit (stream, signals[SIGNAL_EOF], 0);
return nread;
}
@@ -57,7 +57,7 @@ soup_cache_client_input_stream_close_fn (GInputStream *stream,
success = G_INPUT_STREAM_CLASS (soup_cache_client_input_stream_parent_class)->
close_fn (stream, cancellable, error);
- g_signal_emit (stream, signals[CLOSED], 0);
+ g_signal_emit (stream, signals[SIGNAL_CLOSED], 0);
return success;
}
@@ -71,7 +71,7 @@ soup_cache_client_input_stream_class_init (SoupCacheClientInputStreamClass *stre
input_stream_class->read_fn = soup_cache_client_input_stream_read_fn;
input_stream_class->close_fn = soup_cache_client_input_stream_close_fn;
- signals[EOF] =
+ signals[SIGNAL_EOF] =
g_signal_new ("eof",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
@@ -79,7 +79,7 @@ soup_cache_client_input_stream_class_init (SoupCacheClientInputStreamClass *stre
NULL, NULL,
NULL,
G_TYPE_NONE, 0);
- signals[CLOSED] =
+ signals[SIGNAL_CLOSED] =
g_signal_new ("closed",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
diff --git a/libsoup/soup-client-input-stream.c b/libsoup/soup-client-input-stream.c
index 0264cb79..17983069 100644
--- a/libsoup/soup-client-input-stream.c
+++ b/libsoup/soup-client-input-stream.c
@@ -18,7 +18,7 @@ struct _SoupClientInputStreamPrivate {
};
enum {
- EOF,
+ SIGNAL_EOF,
LAST_SIGNAL
};
@@ -100,7 +100,7 @@ soup_client_input_stream_read_fn (GInputStream *stream,
read_fn (stream, buffer, count, cancellable, error);
if (nread == 0)
- g_signal_emit (stream, signals[EOF], 0);
+ g_signal_emit (stream, signals[SIGNAL_EOF], 0);
return nread;
}
@@ -117,7 +117,7 @@ soup_client_input_stream_read_nonblocking (GPollableInputStream *stream,
read_nonblocking (stream, buffer, count, error);
if (nread == 0)
- g_signal_emit (stream, signals[EOF], 0);
+ g_signal_emit (stream, signals[SIGNAL_EOF], 0);
return nread;
}
@@ -226,7 +226,7 @@ soup_client_input_stream_class_init (SoupClientInputStreamClass *stream_class)
input_stream_class->close_async = soup_client_input_stream_close_async;
input_stream_class->close_finish = soup_client_input_stream_close_finish;
- signals[EOF] =
+ signals[SIGNAL_EOF] =
g_signal_new ("eof",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,