mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
printf: deal with some of the HAVE_FOO used in the printf code
Probably needs some more work for MSVC.
This commit is contained in:
parent
3c1d9c6d41
commit
5299a0cd65
3 changed files with 52 additions and 0 deletions
21
configure.ac
21
configure.ac
|
@ -529,6 +529,27 @@ AC_CHECK_LIB(dl, dladdr,
|
|||
LIBS="$LIBS -ldl")
|
||||
CFLAGS="$save_cflags"
|
||||
|
||||
dnl Check printf stuff
|
||||
if test "x${GST_DISABLE_GST_DEBUG}" != "xyes"; then
|
||||
AC_TYPE_LONG_LONG_INT
|
||||
AC_TYPE_UNSIGNED_LONG_LONG_INT
|
||||
|
||||
if test x$ac_cv_type_long_long_int$ac_cv_type_unsigned_long_long_int = xyesyes; then
|
||||
AC_DEFINE([HAVE_LONG_LONG], [1], [Define to 1 if the system has the type long long])
|
||||
fi
|
||||
|
||||
dnl /usr/share/aclocal/inttypes_h.m4 - ships with gettext apparently
|
||||
gl_AC_HEADER_INTTYPES_H
|
||||
|
||||
dnl /usr/share/aclocal/stdint_h.m4 - ships with gettext apparently
|
||||
gl_AC_HEADER_STDINT_H
|
||||
|
||||
AC_CHECK_TYPES(ptrdiff_t)
|
||||
|
||||
AC_TYPE_INTMAX_T
|
||||
AC_TYPE_SIZE_T
|
||||
fi
|
||||
|
||||
dnl *** checks for dependency libraries ***
|
||||
|
||||
dnl GLib
|
||||
|
|
|
@ -1,5 +1,17 @@
|
|||
AM_CPPFLAGS = $(GLIB_CFLAGS) -DSTATIC=G_GNUC_INTERNAL $(WARNING_CFLAGS) $(PRINTF_CFLAGS)
|
||||
|
||||
# don't have a need for that and it's not portable so just ignore for now
|
||||
AM_CPPFLAGS += -UHAVE_LONG_DOUBLE
|
||||
|
||||
# just use internal emulation for printing long longs for now
|
||||
AM_CPPFLAGS += -UHAVE_LONG_LONG_FORMAT
|
||||
|
||||
# don't need any of this widechar stuff, so just disable it for now
|
||||
AM_CPPFLAGS += -UHAVE_WCHAR_T -UHAVE_WCSLEN -UHAVE_WINT_T
|
||||
|
||||
# in case anyone wants to add anything else or undo some of the undefs
|
||||
AM_CPPFLAGS += $(PRINTF_EXTRA_CFLAGS)
|
||||
|
||||
noinst_LTLIBRARIES = libgstprintf.la
|
||||
|
||||
libgstprintf_la_CFLAGS =
|
||||
|
|
|
@ -36,6 +36,11 @@
|
|||
#define realloc g_realloc
|
||||
#define free g_free
|
||||
|
||||
/* If GLib is using the system printf, we can assume C99 behaviour */
|
||||
#ifdef GLIB_USING_SYSTEM_PRINTF
|
||||
#define HAVE_C99_SNPRINTF
|
||||
#endif
|
||||
|
||||
/* Ensure only C99 snprintf gets used */
|
||||
#undef HAVE_SNPRINTF
|
||||
#ifdef HAVE_C99_SNPRINTF
|
||||
|
@ -44,5 +49,19 @@
|
|||
#undef HAVE_SNPRINTF
|
||||
#endif
|
||||
|
||||
/* based on glib's config.h.win32.in */
|
||||
#ifdef G_OS_WIN32
|
||||
|
||||
/* define to support printing 64-bit integers with format I64 */
|
||||
#define HAVE_INT64_AND_I64 1
|
||||
|
||||
/* FIXME: do we need to do anything else here? or should we just typedef/define
|
||||
* intmax_t etc. to __int64? */
|
||||
#if defined (_MSC_VER) && _MSC_VER >= 1600
|
||||
#undef HAVE_INTMAX_T
|
||||
#define HAVE_INTMAX_T 1
|
||||
#endif
|
||||
|
||||
#endif /* G_OS_WIN32 */
|
||||
|
||||
#endif /* __G_GNULIB_H__ */
|
||||
|
|
Loading…
Reference in a new issue