Permalink
Browse files

Fix another potability issues about stdint.h and va_copy

  • Loading branch information...
1 parent 9bd2af7 commit 2c036937e874126de3593b63d2022cfe5755cb0b @tagoh committed Nov 27, 2012
View
@@ -33,7 +33,9 @@ MAINTAINERCLEANFILES = \
$(srcdir)/ltmain.sh \
$(srcdir)/missing \
$(srcdir)/mkinstalldirs \
- $(srcdir)/m4macros/*.m4 \
+ $(srcdir)/m4macros/gtk-doc.m4 \
+ $(srcdir)/m4macros/libtool.m4 \
+ $(srcdir)/m4macros/lt*.m4 \
`find "$(srcdir)" -type f -name Makefile.in -print` \
$(NULL)
DISTCLEANFILES = \
View
@@ -200,8 +200,10 @@ AC_CHECK_ALIGNOF(void *)
dnl ======================================================================
dnl functions testing
dnl ======================================================================
+AX_CREATE_STDINT_H([liblangtag/lt-stdint.h])
AC_CHECK_HEADERS([dirent.h execinfo.h libgen.h sys/param.h])
-AC_CHECK_FUNCS([backtrace dlopen strndup va_copy __va_copy])
+AC_CHECK_FUNCS([backtrace dlopen strndup])
+AC_CHECK_VA_COPY
if test "x$ac_cv_func_dlopen" != xyes; then
enable_modules=no
@@ -14,7 +14,8 @@
#include "config.h"
#endif
-#include <stdint.h>
+#include "lt-stdint.h"
+
#include <string.h>
#include <libxml/xpath.h>
#include "lt-error.h"
@@ -31,7 +31,9 @@ MAINTAINERCLEANFILES = \
$(NULL)
DISTCLEANFILES = \
stamp-lt-config \
+ stamp-lt-stdint \
lt-config.h \
+ lt-stdint.h \
$(NULL)
CLEANFILES = \
xgen-h \
@@ -42,6 +44,7 @@ BUILT_SOURCES = \
$(liblangtag_built_private_headers) \
$(liblangtag_built_sources) \
stamp-lt-config \
+ stamp-lt-stdint \
$(NULL)
##
@@ -87,6 +90,7 @@ liblangtag_private_headers = \
lt-redundant-private.h \
lt-region-private.h \
lt-script-private.h \
+ lt-stdint.h \
lt-tag-private.h \
lt-trie.h \
lt-utils.h \
@@ -151,6 +155,11 @@ lt-localealias.h: @BUILD_LOCALEALIAS@ Makefile
echo "Failed to generate $@."; \
exit 1; \
fi
+stamp-lt-stdint: $(top_builddir)/config.status
+ $(AM_V_GEN) cd $(top_builddir) && \
+ $(SHELL) ./config.status liblangtag/lt-stdint.h
+ @touch $@
+ $(NULL)
stamp-lt-config: $(top_builddir)/config.status
$(AM_V_GEN) cd $(top_builddir) && \
$(SHELL) ./config.status liblangtag/lt-config.h
View
@@ -14,9 +14,10 @@
#include "config.h"
#endif
+#include "lt-stdint.h"
+
#include <ctype.h>
#include <locale.h>
-#include <stdint.h>
#include <string.h>
#include <libxml/xpath.h>
#include "lt-config.h"
@@ -132,7 +132,7 @@ lt_strdup_vprintf(const char *format,
lt_return_val_if_fail (format != NULL, NULL);
- lt_va_copy(ap, args);
+ va_copy(ap, args);
size = vsnprintf(&c, 1, format, ap) + 1;
@@ -24,14 +24,6 @@
LT_BEGIN_DECLS
-#if HAVE_VA_COPY
-#define lt_va_copy(_d_,_s_) va_copy(_d_,_s_)
-#elsif HAVE___VA_COPY
-#define lt_va_copy(_d_,_s_) __va_copy(_d_,_s_)
-#else
-#define lt_va_copy(_d_,_s_) memcpy(&(_d_), &(_s_), sizeof (va_list))
-#endif
-
int lt_strcmp0 (const char *v1,
const char *v2);
int lt_strcasecmp (const char *s1,
Oops, something went wrong. Retry.

0 comments on commit 2c03693

Please sign in to comment.