diff --git a/gst/gst.c b/gst/gst.c index c4b752c152..1573a459c2 100644 --- a/gst/gst.c +++ b/gst/gst.c @@ -95,7 +95,7 @@ enum { /* default scheduler, 'basicomega', can be changed in * gstscheduler.c in function gst_scheduler_factory_class_init */ -static const struct poptOption gstreamer_options[] = { +static const struct poptOption options[] = { {NULL, NUL, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE|POPT_CBFLAG_POST, &init_popt_callback, 0, NULL, NULL}, {"gst-version", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_VERSION, "Print the GStreamer version", NULL}, {"gst-fatal-warnings", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_FATAL_WARNINGS, "Make all warnings fatal", NULL}, @@ -126,7 +126,7 @@ static const struct poptOption gstreamer_options[] = { const struct poptOption * gst_init_get_popt_table (void) { - return gstreamer_options; + return options; } /** @@ -186,15 +186,15 @@ gst_init_with_popt_table (int *argc, char **argv[], gchar **temp; const struct poptOption *options; /* this is probably hacky, no? */ - struct poptOption options_with[] = { + const struct poptOption options_with[] = { {NULL, NUL, POPT_ARG_INCLUDE_TABLE, poptHelpOptions, 0, "Help options:", NULL}, - {NULL, NUL, POPT_ARG_INCLUDE_TABLE, gstreamer_options, 0, "GStreamer options:", NULL}, + {NULL, NUL, POPT_ARG_INCLUDE_TABLE, (struct poptOption *) gst_init_get_popt_table(), 0, "GStreamer options:", NULL}, {NULL, NUL, POPT_ARG_INCLUDE_TABLE, (struct poptOption *) popt_options, 0, "Application options:", NULL}, POPT_TABLEEND }; const struct poptOption options_without[] = { {NULL, NUL, POPT_ARG_INCLUDE_TABLE, poptHelpOptions, 0, "Help options:", NULL}, - {NULL, NUL, POPT_ARG_INCLUDE_TABLE, gstreamer_options, 0, "GStreamer options:", NULL}, + {NULL, NUL, POPT_ARG_INCLUDE_TABLE, (struct poptOption *) gst_init_get_popt_table(), 0, "GStreamer options:", NULL}, POPT_TABLEEND }; diff --git a/gst/gstcaps.h b/gst/gstcaps.h index 1d259cb7dc..6dae7c24c6 100644 --- a/gst/gstcaps.h +++ b/gst/gstcaps.h @@ -58,26 +58,6 @@ struct _GstCaps { /* factory macros which make it easier for plugins to instantiate */ -#ifdef G_HAVE_ISO_VARARGS -#define GST_CAPS_NEW(name, type, ...) \ -gst_caps_new ( \ - name, \ - type, \ - gst_props_new ( \ - __VA_ARGS__, \ - NULL)) - -#define GST_CAPS_FACTORY(factoryname, ...) \ -static GstCaps* \ -factoryname (void) \ -{ \ - static GstCaps *caps = NULL; \ - if (!caps) { \ - caps = gst_caps_chain (__VA_ARGS_, NULL); \ - } \ - return caps; \ -} -#elif defined(G_HAVE_GNUC_VARARGS) #define GST_CAPS_NEW(name, type, a...) \ gst_caps_new ( \ name, \ @@ -96,7 +76,6 @@ factoryname (void) \ } \ return caps; \ } -#endif #define GST_CAPS_GET(fact) (fact)() @@ -129,13 +108,8 @@ void gst_caps_set_type_id (GstCaps *caps, guint16 type_id); GstCaps* gst_caps_set_props (GstCaps *caps, GstProps *props); GstProps* gst_caps_get_props (GstCaps *caps); -#ifdef G_HAVE_ISO_VARARGS -#define gst_caps_set(caps, ...) gst_props_set ((caps)->properties, __VA_ARGS__) -#define gst_caps_get(caps, ...) gst_props_get ((caps)->properties, __VA_ARGS__) -#elif defined(G_HAVE_GNUC_VARARGS) #define gst_caps_set(caps, name, args...) gst_props_set ((caps)->properties, name, ##args) #define gst_caps_get(caps, name, args...) gst_props_get ((caps)->properties, name, ##args) -#endif #define gst_caps_get_int(caps,name,res) gst_props_entry_get_int(gst_props_get_entry((caps)->properties,name),res) #define gst_caps_get_float(caps,name,res) gst_props_entry_get_float(gst_props_get_entry((caps)->properties,name),res) diff --git a/gst/gstevent.h b/gst/gstevent.h index 71d6886363..543a76ea4c 100644 --- a/gst/gstevent.h +++ b/gst/gstevent.h @@ -78,18 +78,6 @@ typedef struct GstEventFlag flags; } GstEventMask; -#ifdef G_HAVE_ISO_VARARGS -#define GST_EVENT_MASK_FUNCTION(functionname, ...) \ -static const GstEventMask* \ -functionname (GstPad *pad) \ -{ \ - static const GstEventMask masks[] = { \ - __VA_ARGS__, \ - { 0, } \ - }; \ - return masks; \ -} -#elif defined(G_HAVE_GNUC_VARARGS) #define GST_EVENT_MASK_FUNCTION(functionname, a...) \ static const GstEventMask* \ functionname (GstPad *pad) \ @@ -100,7 +88,6 @@ functionname (GstPad *pad) \ }; \ return masks; \ } -#endif /* seek events, extends GstEventFlag */ typedef enum { diff --git a/gst/gstformat.h b/gst/gstformat.h index ec24900927..b7c0944c62 100644 --- a/gst/gstformat.h +++ b/gst/gstformat.h @@ -48,18 +48,6 @@ struct _GstFormatDefinition gchar *description; }; -#ifdef G_HAVE_ISO_VARARGS -#define GST_FORMATS_FUNCTION(functionname, ...) \ -static const GstFormat* \ -functionname (GstPad *pad) \ -{ \ - static const GstFormat formats[] = { \ - __VA_ARGS__, \ - 0 \ - }; \ - return formats; \ -} -#elif defined(G_HAVE_GNUC_VARARGS) #define GST_FORMATS_FUNCTION(functionname, a...) \ static const GstFormat* \ functionname (GstPad *pad) \ @@ -70,7 +58,6 @@ functionname (GstPad *pad) \ }; \ return formats; \ } -#endif void _gst_format_initialize (void); diff --git a/gst/gstinfo.c b/gst/gstinfo.c index 2b24513ea0..ed577e8f01 100644 --- a/gst/gstinfo.c +++ b/gst/gstinfo.c @@ -81,9 +81,8 @@ static gchar *_gst_info_category_strings[] = { "REFCOUNTING", "EVENT", "PARAMS", - "", - "", - "CALL_TRACE", + + [30] = "CALL_TRACE", }; /** diff --git a/gst/gstinfo.h b/gst/gstinfo.h index 83191813d4..89d467de22 100644 --- a/gst/gstinfo.h +++ b/gst/gstinfo.h @@ -31,15 +31,6 @@ #include #endif -#ifdef HAVE_FUNC -#define FUNCTION __func__ -#elif HAVE_PRETTY_FUNCTION -#define FUNCTION __PRETTY_FUNCTION__ -#elif HAVE_FUNCTION -#define FUNCTION __FUNCTION__ -#else -#define FUNCTION "" -#endif /***** are we in the core or not? *****/ #ifdef __GST_PRIVATE_H__ @@ -145,38 +136,17 @@ G_GNUC_UNUSED static gchar *_debug_string = NULL; -#ifdef G_HAVE_ISO_VARARGS - -#ifdef GST_DEBUG_ENABLED -#define GST_DEBUG(cat, ...) G_STMT_START{ \ - if ((1< -#ifdef G_HAVE_ISO_VARARGS - -#ifdef DEBUG -# define PRINT(...) printf(__VAR_ARGS__) -#else -#define PRINT(...) -#endif - -#elif defined(G_HAVE_GNUC_VARARGS) - #ifdef DEBUG # define PRINT(a...) printf(##a) #else #define PRINT(a...) #endif -#endif - #define CHAR(x) PRINT ("char: %c\n", *yytext); return *yytext; #define YY_DECL int _gst_parse_yylex (YYSTYPE *lvalp)