From a52401526d1d7d9257623a5dac44ffb378371303 Mon Sep 17 00:00:00 2001 From: Andrej Kacian Date: Wed, 27 May 2015 22:58:27 +0200 Subject: [PATCH] RSSyl: Fix compilation on OS X. The enums declared in libfeed's parser*.h files sneaked through to object built from old_feeds.c file, due to parser.h include. For some reason, this bothers OS X compiler. Since these enums were only used in their respective parser*.c file, I just moved them there. --- src/plugins/rssyl/libfeed/parser.c | 9 +++++++++ src/plugins/rssyl/libfeed/parser.h | 10 ---------- src/plugins/rssyl/libfeed/parser_atom10.c | 8 ++++++++ src/plugins/rssyl/libfeed/parser_atom10.h | 14 +++----------- src/plugins/rssyl/libfeed/parser_rdf.c | 6 ++++++ src/plugins/rssyl/libfeed/parser_rdf.h | 6 ------ 6 files changed, 26 insertions(+), 27 deletions(-) diff --git a/src/plugins/rssyl/libfeed/parser.c b/src/plugins/rssyl/libfeed/parser.c index 14f4a360c..64392456a 100644 --- a/src/plugins/rssyl/libfeed/parser.c +++ b/src/plugins/rssyl/libfeed/parser.c @@ -34,6 +34,15 @@ #include "parser.h" +enum { + FEED_TYPE_NONE, + FEED_TYPE_RDF, + FEED_TYPE_RSS_20, + FEED_TYPE_ATOM_03, + FEED_TYPE_ATOM_10, + FEED_TYPE_OPML +} FeedTypes; + static void _handler_set(XML_Parser parser, guint type) { if( parser == NULL ) diff --git a/src/plugins/rssyl/libfeed/parser.h b/src/plugins/rssyl/libfeed/parser.h index f8cbb9ae7..02cd0e503 100644 --- a/src/plugins/rssyl/libfeed/parser.h +++ b/src/plugins/rssyl/libfeed/parser.h @@ -32,14 +32,4 @@ gchar *feed_parser_get_attribute_value(const gchar **attr, const gchar *name); int feed_parser_unknown_encoding_handler(void *encdata, const XML_Char *name, XML_Encoding *info); - -enum { - FEED_TYPE_NONE, - FEED_TYPE_RDF, - FEED_TYPE_RSS_20, - FEED_TYPE_ATOM_03, - FEED_TYPE_ATOM_10, - FEED_TYPE_OPML -} FeedTypes; - #endif /* __PARSER_H */ diff --git a/src/plugins/rssyl/libfeed/parser_atom10.c b/src/plugins/rssyl/libfeed/parser_atom10.c index 9cf4ffa8c..8f9f4d6bb 100644 --- a/src/plugins/rssyl/libfeed/parser_atom10.c +++ b/src/plugins/rssyl/libfeed/parser_atom10.c @@ -29,6 +29,14 @@ #include "parser.h" #include "parser_atom10.h" +enum { + FEED_LOC_ATOM10_NONE, + FEED_LOC_ATOM10_ENTRY, + FEED_LOC_ATOM10_AUTHOR, + FEED_LOC_ATOM10_SOURCE, + FEED_LOC_ATOM10_CONTENT +} FeedAtom10Locations; + void feed_parser_atom10_start(void *data, const gchar *el, const gchar **attr) { FeedParserCtx *ctx = (FeedParserCtx *)data; diff --git a/src/plugins/rssyl/libfeed/parser_atom10.h b/src/plugins/rssyl/libfeed/parser_atom10.h index 85e95b4c9..0b094ab93 100644 --- a/src/plugins/rssyl/libfeed/parser_atom10.h +++ b/src/plugins/rssyl/libfeed/parser_atom10.h @@ -17,18 +17,10 @@ * Boston, MA 02111-1307, USA. */ -#ifndef __PARSER_ATOM03_H -#define __PARSER_ATOM03_H +#ifndef __PARSER_ATOM10_H +#define __PARSER_ATOM10_H void feed_parser_atom10_start(void *data, const char *el, const char **attr); void feed_parser_atom10_end(void *data, const char *el); -enum { - FEED_LOC_ATOM10_NONE, - FEED_LOC_ATOM10_ENTRY, - FEED_LOC_ATOM10_AUTHOR, - FEED_LOC_ATOM10_SOURCE, - FEED_LOC_ATOM10_CONTENT -} FeedAtom10Locations; - -#endif /* __PARSER_ATOM03_H */ +#endif /* __PARSER_ATOM10_H */ diff --git a/src/plugins/rssyl/libfeed/parser_rdf.c b/src/plugins/rssyl/libfeed/parser_rdf.c index d514bf0b1..77e1df5e5 100644 --- a/src/plugins/rssyl/libfeed/parser_rdf.c +++ b/src/plugins/rssyl/libfeed/parser_rdf.c @@ -28,6 +28,12 @@ #include "date.h" #include "parser_rdf.h" +enum { + FEED_LOC_RDF_NONE, + FEED_LOC_RDF_CHANNEL, + FEED_LOC_RDF_ITEM +} FeedRdfLocations; + void feed_parser_rdf_start(void *data, const gchar *el, const gchar **attr) { FeedParserCtx *ctx = (FeedParserCtx *)data; diff --git a/src/plugins/rssyl/libfeed/parser_rdf.h b/src/plugins/rssyl/libfeed/parser_rdf.h index 1c3809fec..66299cbe8 100644 --- a/src/plugins/rssyl/libfeed/parser_rdf.h +++ b/src/plugins/rssyl/libfeed/parser_rdf.h @@ -23,10 +23,4 @@ void feed_parser_rdf_start(void *data, const char *el, const char **attr); void feed_parser_rdf_end(void *data, const char *el); -enum { - FEED_LOC_RDF_NONE, - FEED_LOC_RDF_CHANNEL, - FEED_LOC_RDF_ITEM -} FeedRdfLocations; - #endif /* __PARSER_RDF_H */ -- 2.25.1