mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
printf: fix alloca use for windows with mingw32
Don't use just GLIB_HAVE_ALLOCA_H to check if alloca is available, that's just for the header. GLib may define alloca for us otherwise too irrespective of GLIB_HAVE_ALLOCA_H. Fixes compiler warning with mingw32: gst/printf/vasnprintf.c:73:0: warning: "alloca" redefined
This commit is contained in:
parent
ff292d530c
commit
3c1d9c6d41
2 changed files with 3 additions and 3 deletions
|
@ -47,8 +47,8 @@ This was imported from GLib's gnulib subdirectory.
|
|||
|
||||
g-gnulib.h and _g_gnulib namespace has been changed to gst-printf.h and
|
||||
__gst_printf namespace for GStreamer. Also #define HAVE_SNPRINTF 0 has
|
||||
been changed to #undef HAVE_SNPRINTF, and HAVE_ALLOCA has been changed to
|
||||
GLIB_HAVE_ALLOCA_H
|
||||
been changed to #undef HAVE_SNPRINTF, and HAVE_ALLOCA has been replaced
|
||||
by an #if defined(alloca) || defined(GLIB_HAVE_ALLOCA_H)
|
||||
|
||||
printf-extension.[ch] were added to provide support for custom pointer
|
||||
arguments (e.g. caps, events, etc.)
|
||||
|
|
|
@ -67,7 +67,7 @@ local_wcslen (const wchar_t * s)
|
|||
|
||||
/* For those losing systems which don't have 'alloca' we have to add
|
||||
some additional code emulating it. */
|
||||
#ifdef GLIB_HAVE_ALLOCA_H
|
||||
#if defined (alloca) || defined (GLIB_HAVE_ALLOCA_H)
|
||||
# define freea(p) /* nothing */
|
||||
#else
|
||||
# define alloca(n) malloc (n)
|
||||
|
|
Loading…
Reference in a new issue