summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/mplibdir/ChangeLog7
-rw-r--r--Build/source/texk/web2c/mplibdir/mp.w7
2 files changed, 11 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/mplibdir/ChangeLog b/Build/source/texk/web2c/mplibdir/ChangeLog
index ae4323e9685..18c5b2b8657 100644
--- a/Build/source/texk/web2c/mplibdir/ChangeLog
+++ b/Build/source/texk/web2c/mplibdir/ChangeLog
@@ -1,3 +1,10 @@
+2011-04-29 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * mp.w (mp_do_snprintf): Removed, instead declare and define
+ static internal version of mp_snprintf().
+ Compare change from 2009-12-05:
+ FIXME: Should unconditionally assume snprintf() exists.
+
2011-04-06 Peter Breitenlohner <peb@mppmu.mpg.de>
* am/libmplib.am: Only one rule for tfmin.w => tfmin.c.
diff --git a/Build/source/texk/web2c/mplibdir/mp.w b/Build/source/texk/web2c/mplibdir/mp.w
index 71ed0033708..679b32839a5 100644
--- a/Build/source/texk/web2c/mplibdir/mp.w
+++ b/Build/source/texk/web2c/mplibdir/mp.w
@@ -2727,7 +2727,6 @@ extern void *mp_xrealloc (MP mp, void *p, size_t nmem, size_t size);
extern void *mp_xmalloc (MP mp, size_t nmem, size_t size);
extern char *mp_xstrdup (MP mp, const char *s);
extern char *mp_xstrldup (MP mp, const char *s, size_t l);
-extern void mp_do_snprintf (char *str, int size, const char *fmt, ...);
@ Some care has to be taken while copying strings
@@ -2813,12 +2812,13 @@ char *mp_xstrdup (MP mp, const char *s) {
#ifdef HAVE_SNPRINTF
# define mp_snprintf (void)snprintf
#else
-# define mp_snprintf mp_do_snprintf
+static void mp_snprintf (char *str, int size, const char *fmt, ...);
#endif
@ This internal version is rather stupid, but good enough for its purpose.
@c
+#ifndef HAVE_SNPRINTF
static char *mp_itoa (int i) {
char res[32];
unsigned idx = 30;
@@ -2847,7 +2847,7 @@ static char *mp_utoa (unsigned v) {
res[idx--] = (char) (v + '0');
return mp_strdup ((res + idx + 1));
}
-void mp_do_snprintf (char *str, int size, const char *format, ...) {
+static void mp_snprintf (char *str, int size, const char *format, ...) {
const char *fmt;
char *res;
int fw, pad;
@@ -2964,6 +2964,7 @@ void mp_do_snprintf (char *str, int size, const char *format, ...) {
*res = '\0';
va_end (ap);
}
+#endif
@* Dynamic memory allocation.