summaryrefslogtreecommitdiff
path: root/cross
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2023-01-28 14:33:58 +0800
committerPo Lu <luangruo@yahoo.com>2023-01-28 14:33:58 +0800
commit6f2a518f2728bdad24161c04476c5f95c60b6f55 (patch)
treeb64a97fcea274063ca189ed16e4a52349dc38fb8 /cross
parent8732a5bd78fb4fb83612d8492eabf1b52200fb53 (diff)
downloademacs-6f2a518f2728bdad24161c04476c5f95c60b6f55.tar.gz
Update from gnulib
* cross/lib/stdalign.in.h (_GL_STDALIGN_H): (_): (__alignof_is_defined): * cross/lib/vasnprintf.c: * lib/gnulib.mk.in (ANDROID_MIN_SDK): (HAVE_SPAWN_H): (LIBGCCJIT_LIBS): (NATIVE_COMPILATION_AOT): (NEXT_AS_FIRST_DIRECTIVE_LIMITS_H): (NEXT_LIMITS_H): (SIZEOF_LONG): (stdalign.h): * ../../../../dev/null: * lib/stdalign.in.h (_GL_STDALIGN_H): (_): (__alignof_is_defined): * lib/vasnprintf.c: * m4/gnulib-common.m4 (gl_COMMON_BODY): * m4/stdalign.m4 (gl_ALIGNASOF): * m4/stddef_h.m4: Update from gnulib.
Diffstat (limited to 'cross')
-rw-r--r--cross/lib/stdalign.in.h21
-rw-r--r--cross/lib/vasnprintf.c2
2 files changed, 19 insertions, 4 deletions
diff --git a/cross/lib/stdalign.in.h b/cross/lib/stdalign.in.h
index 6523546f16d..b616c100fdc 100644
--- a/cross/lib/stdalign.in.h
+++ b/cross/lib/stdalign.in.h
@@ -20,8 +20,22 @@
/* Define two obsolescent C11 macros, assuming alignas and alignof are
either keywords or alignasof-defined macros. */
-#ifndef _GL_STDALIGN_H
-#define _GL_STDALIGN_H
+#ifndef _@GUARD_PREFIX@_STDALIGN_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* We need to include the system's <stdalign.h> when it exists, because it might
+ define 'alignof' as a macro when it's not a keyword or compiler built-in. */
+#if @HAVE_STDALIGN_H@
+/* The include_next requires a split double-inclusion guard. */
+# @INCLUDE_NEXT@ @NEXT_STDALIGN_H@
+#endif
+
+#ifndef _@GUARD_PREFIX@_STDALIGN_H
+#define _@GUARD_PREFIX@_STDALIGN_H
#if (defined alignas \
|| (defined __STDC_VERSION__ && 202311 <= __STDC_VERSION__) \
@@ -31,4 +45,5 @@
#define __alignof_is_defined 1
-#endif /* _GL_STDALIGN_H */
+#endif /* _@GUARD_PREFIX@_STDALIGN_H */
+#endif /* _@GUARD_PREFIX@_STDALIGN_H */
diff --git a/cross/lib/vasnprintf.c b/cross/lib/vasnprintf.c
index f237619e889..277c39e3e07 100644
--- a/cross/lib/vasnprintf.c
+++ b/cross/lib/vasnprintf.c
@@ -83,10 +83,10 @@
#include <stdio.h> /* snprintf(), sprintf() */
#include <stdlib.h> /* abort(), malloc(), realloc(), free() */
#include <string.h> /* memcpy(), strlen() */
+#include <wchar.h> /* mbstate_t, mbrtowc(), mbrlen(), wcrtomb() */
#include <errno.h> /* errno */
#include <limits.h> /* CHAR_BIT */
#include <float.h> /* DBL_MAX_EXP, LDBL_MAX_EXP */
-#include <wchar.h>
#if HAVE_NL_LANGINFO
# include <langinfo.h>
#endif