input/soup: use #pragma only with gcc 4.6+

It seems gcc 4.5 does not allow #pragma within function:

 src/input/soup_input_plugin.c:284:9: error: #pragma GCC diagnostic not allowed inside functions
This commit is contained in:
Max Kellermann 2012-01-29 14:45:59 +01:00
parent f20689519d
commit e87b7daab5

View File

@ -280,7 +280,7 @@ input_soup_open(const char *uri,
s->current_consumed = 0; s->current_consumed = 0;
s->total_buffered = 0; s->total_buffered = 0;
#if GCC_CHECK_VERSION(4,5) #if GCC_CHECK_VERSION(4,6)
#pragma GCC diagnostic push #pragma GCC diagnostic push
/* the libsoup macro SOUP_METHOD_GET discards the "const" /* the libsoup macro SOUP_METHOD_GET discards the "const"
attribute of the g_intern_static_string() return value; attribute of the g_intern_static_string() return value;
@ -290,7 +290,7 @@ input_soup_open(const char *uri,
s->msg = soup_message_new(SOUP_METHOD_GET, uri); s->msg = soup_message_new(SOUP_METHOD_GET, uri);
#if GCC_CHECK_VERSION(4,5) #if GCC_CHECK_VERSION(4,6)
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #endif