Johannes Sixt writes:Some older (pre-C99) versions of gcc name it __va_copy() instead. Is there any guarantee that va_copy() will be a macro on systems that provide it? If neither va_copy() nor __va_copy() are available, memcpy(&(DEST), &(SRC), sizeof(DEST)) should work for any va_list type. It's what I use on one project: #ifdef HAVE_VA_COPY #define VA_COPY(DEST, SRC) va_copy(DEST, SRC) #elif HAVE___VA_COPY #define VA_COPY(DEST, SRC) __va_copy(DEST, SRC) #else #define VA_COPY(DEST, SRC) memcpy(&(DEST), &(SRC), sizeof(DEST)) #endif with appropriate autoconf tests, basically two copies of this: dnl How to copy one va_list to another? AC_CACHE_CHECK([for va_copy], ac_cv_c_va_copy, [AC_LINK_IFELSE( [AC_LANG_PROGRAM([#include <stdarg.h>], [va_list ap1, ap2; va_copy(ap1, ap2);])], [ac_cv_c_va_copy="yes"], [ac_cv_c_va_copy="no"] )]) if test "$ac_cv_c_va_copy" = "yes" ; then AC_DEFINE(HAVE_VA_COPY, 1, [Define if we have va_copy]) fi I'm not sure how to translate the tests to git's coding style most easily. Michael Poole - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Kamalesh Babulal | [BUG] Linux 2.6.25-rc2 - Kernel Ooops while running dbench |
| Greg Kroah-Hartman | [PATCH 005/196] Chinese: add translation of SubmittingDrivers |
| Paul Jackson | Re: cpuset-remove-sched-domain-hooks-from-cpusets |
git: | |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Steven Rostedt | Re: -rt scheduling: wakeup bug? |
| David Miller | Re: [GIT]: Networking |
