summaryrefslogtreecommitdiff
path: root/Build/source/libs/gmp/gmp-src/printf/repl-vsnprintf.c
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2020-01-19 23:36:31 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2020-01-19 23:36:31 +0000
commit1d4eda0d2362c7404a81bb0e1e308565b8a4b8f9 (patch)
treeda5a6b2829fa072fe1ae806b45f6b5cc70a3e313 /Build/source/libs/gmp/gmp-src/printf/repl-vsnprintf.c
parentd2777035be2644c9649530be7f9fa31c8abaaf63 (diff)
gmp-6.2.0
git-svn-id: svn://tug.org/texlive/trunk@53461 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/gmp/gmp-src/printf/repl-vsnprintf.c')
-rw-r--r--Build/source/libs/gmp/gmp-src/printf/repl-vsnprintf.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/Build/source/libs/gmp/gmp-src/printf/repl-vsnprintf.c b/Build/source/libs/gmp/gmp-src/printf/repl-vsnprintf.c
index a95003baa62..d2286712218 100644
--- a/Build/source/libs/gmp/gmp-src/printf/repl-vsnprintf.c
+++ b/Build/source/libs/gmp/gmp-src/printf/repl-vsnprintf.c
@@ -5,7 +5,7 @@
CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR COMPLETELY IN
FUTURE GNU MP RELEASES.
-Copyright 2001, 2002 Free Software Foundation, Inc.
+Copyright 2001, 2002, 2018 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -35,9 +35,6 @@ see https://www.gnu.org/licenses/. */
#include "config.h"
-#if ! HAVE_VSNPRINTF /* only need this file if we don't have vsnprintf */
-
-
#define _GNU_SOURCE /* for strnlen prototype */
#include <stdarg.h>
@@ -63,10 +60,11 @@ see https://www.gnu.org/licenses/. */
#include <sys/types.h> /* for quad_t */
#endif
-#include "gmp.h"
#include "gmp-impl.h"
+#if ! HAVE_VSNPRINTF /* only need this file if we don't have vsnprintf */
+
/* Autoconf notes that AIX 4.3 has a broken strnlen, but fortunately it
doesn't affect us since __gmp_replacement_vsnprintf is not required on
that system. */
@@ -244,7 +242,7 @@ __gmp_replacement_vsnprintf (char *buf, size_t buf_size,
}
else
(void) va_arg (ap, double);
- break;
+ goto next;
case 'f':
/* Requested decimals, sign and point, and a margin for error,
@@ -265,7 +263,7 @@ __gmp_replacement_vsnprintf (char *buf, size_t buf_size,
(void) va_arg (ap, double);
total_width += double_digits;
}
- break;
+ goto next;
case 'h': /* short or char */
case 'j': /* intmax_t */
@@ -383,7 +381,7 @@ __gmp_replacement_vsnprintf (char *buf, size_t buf_size,
memcpy (buf, s, copylen);
buf[copylen] = '\0';
}
- (*__gmp_free_func) (s, total_width);
+ __GMP_FREE_FUNC_TYPE (s, total_width, char);
}
/* If total_width was somehow wrong then chances are we've already