]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: macros - Remove VA_COPY handling
authorAki Tuomi <aki.tuomi@open-xchange.com>
Tue, 12 Apr 2022 09:22:17 +0000 (12:22 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Thu, 14 Apr 2022 11:10:37 +0000 (11:10 +0000)
Should just use VA_COPY from config.h

src/lib/macros.h

index c28009940645c8f828f9effee65defae50711221..4911a281b72b2ae60720c9c2fd3b4508abf4de42 100644 (file)
 #define POINTER_CAST_TO(p, type) \
        ((type)(uintptr_t)(p))
 
-/* Define VA_COPY() to do the right thing for copying va_list variables.
-   config.h may have already defined VA_COPY as va_copy or __va_copy. */
 #ifndef VA_COPY
-#  if defined (__GNUC__) && defined (__PPC__) && \
-      (defined (_CALL_SYSV) || defined (_WIN32))
-#    define VA_COPY(ap1, ap2) (*(ap1) = *(ap2))
-#  elif defined (VA_COPY_AS_ARRAY)
-#    define VA_COPY(ap1, ap2) memmove ((ap1), (ap2), sizeof (va_list))
-#  else /* va_list is a pointer */
-#    define VA_COPY(ap1, ap2) ((ap1) = (ap2))
-#  endif /* va_list is a pointer */
+   #error "VA_COPY not defined"
 #endif
 
 /* Provide convenience macros for handling structure