diff options
author | Simon McVittie <smcv@collabora.com> | 2018-11-16 16:21:48 +0000 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2018-11-19 11:27:25 +0000 |
commit | f33038bc1b195c91aa70bad405cab4eaf366caea (patch) | |
tree | ff97119e644d449155f9014a00cb14aa80749a29 /dbus | |
parent | dab4a12e0e556a5a3c88abfdd83e55cab465b79c (diff) | |
download | dbus-f33038bc1b195c91aa70bad405cab4eaf366caea.tar.gz |
build: Require va_copy() or __va_copy() on non-MSVC compilers
va_copy() is a C99 feature, and should be widely supported by now.
gcc in strict C89 mode implements an equivalent __va_copy() instead.
MSVC 2013 implements va_copy(), but at the moment we still aim to support
MSVC 2010 and 2012, which don't have it. However, we know that in
Windows ABIs, va_list is a pointer, so we can use
_DBUS_VA_COPY_ASSIGN. We do not support MSVC for Autotools builds, only
CMake, due to its non-Unixish command-line interface.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'dbus')
-rw-r--r-- | dbus/dbus-sysdeps.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/dbus/dbus-sysdeps.h b/dbus/dbus-sysdeps.h index a5987ae5..fa20219e 100644 --- a/dbus/dbus-sysdeps.h +++ b/dbus/dbus-sysdeps.h @@ -614,20 +614,6 @@ void _dbus_logv (DBusSystemLogSeverity severity, const char *msg, va_list args) _DBUS_GNUC_PRINTF (2, 0); -/* Define DBUS_VA_COPY() to do the right thing for copying va_list variables. - * config.h may have already defined DBUS_VA_COPY as va_copy or __va_copy. - */ -#if !defined (DBUS_VA_COPY) -# if defined (__GNUC__) && defined (__PPC__) && (defined (_CALL_SYSV) || defined (_WIN32)) -# define DBUS_VA_COPY(ap1, ap2) (*(ap1) = *(ap2)) -# elif defined (DBUS_VA_COPY_AS_ARRAY) -# define DBUS_VA_COPY(ap1, ap2) memcpy ((ap1), (ap2), sizeof (va_list)) -# else /* va_list is a pointer */ -# define DBUS_VA_COPY(ap1, ap2) ((ap1) = (ap2)) -# endif /* va_list is a pointer */ -#endif /* !DBUS_VA_COPY */ - - /** * Casts a primitive C type to a byte array and then indexes * a particular byte of the array. |