[PATCH] [Bug 516232] Use G_VA_COPY in eel
- From: Christian Persch <chpe gnome org>
- To: nautilus-list <nautilus-list gnome org>
- Subject: [PATCH] [Bug 516232] Use G_VA_COPY in eel
- Date: Wed, 13 Feb 2008 13:45:44 +0100
Hi;
instead of the configure check + va_copy it should just use G_VA_COPY.
Ok to commit? http://bugzilla.gnome.org/show_bug.cgi?id=516232
Regards,
Christian
Index: configure.in
===================================================================
--- configure.in (révision 2055)
+++ configure.in (copie de travail)
@@ -119,23 +119,6 @@ AC_TRY_RUN([#include <time.h>
dnl ===========================================================================
-dnl va_copy checks
-
-AC_MSG_CHECKING([how to copy va_list])
-AC_TRY_LINK([#include <stdarg.h>], [va_list ap1, ap2; va_copy(ap1, ap2);],
- AC_MSG_RESULT([va_copy]),
- [ AH_TEMPLATE([va_copy], [define if va_copy is not available])
- AC_TRY_LINK([#include <stdarg.h>], [va_list ap1, ap2; __va_copy(ap1, ap2);],
- [ AC_DEFINE([va_copy], [__va_copy])
- AC_MSG_RESULT([__va_copy])],
- [ AC_DEFINE([va_copy(dest,src)], [memcpy(&dest,&src,sizeof(va_list)) ])
- AC_MSG_RESULT([memcpy])]
- )
- ])
-
-
-dnl ===========================================================================
-
dnl X development libraries check
#
Index: eel/eel-string.c
===================================================================
--- eel/eel-string.c (révision 2055)
+++ eel/eel-string.c (copie de travail)
@@ -28,6 +28,7 @@
#include <errno.h>
#include <locale.h>
#include <stdlib.h>
+#include <string.h>
#if !defined (EEL_OMIT_SELF_CHECK)
#include "eel-lib-self-check-functions.h"
@@ -745,7 +746,7 @@ eel_strdup_vprintf_with_custom (EelPrint
if (conversions[i].precision_pos != -1) {
char *val;
- va_copy(va, va_orig);
+ G_VA_COPY(va, va_orig);
skip_to_arg (&va, args, custom, conversions[i].precision_pos);
val = g_strdup_vprintf ("%d", va);
va_end (va);
@@ -760,7 +761,7 @@ eel_strdup_vprintf_with_custom (EelPrint
if (conversions[i].width_pos != -1) {
char *val;
- va_copy(va, va_orig);
+ G_VA_COPY(va, va_orig);
skip_to_arg (&va, args, custom, conversions[i].width_pos);
val = g_strdup_vprintf ("%d", va);
va_end (va);
@@ -772,7 +773,7 @@ eel_strdup_vprintf_with_custom (EelPrint
g_free (val);
}
- va_copy(va, va_orig);
+ G_VA_COPY(va, va_orig);
skip_to_arg (&va, args, custom, conversions[i].arg_pos);
type = args[conversions[i].arg_pos];
if (type < 0) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]