[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gettext-0.17 on Interix, with fixes
From: |
Jay |
Subject: |
gettext-0.17 on Interix, with fixes |
Date: |
Sat, 20 Jun 2009 09:58:21 +0000 |
In file included from
/src/gettext-0.17/gettext-runtime/libasprintf/lib-asprintf.c:30:
/src/gettext-0.17/gettext-runtime/libasprintf/printf-parse.c: In function
`printf_parse':
/src/gettext-0.17/gettext-runtime/libasprintf/printf-parse.c:353: error:
`intmax_t' undeclared (first use in this function)
/src/gettext-0.17/gettext-runtime/libasprintf/autosprintf.cc: In copy
constructor `gnu::autosprintf::autosprintf(const gnu::autosprintf&)':
/src/gettext-0.17/gettext-runtime/libasprintf/autosprintf.cc:55: error: `strdup
' undeclared (first use this function)
Interix doesn't seem to have intmax_t.
gnulib uintmax_t.m4 will declare uintmax_t but gnulib intmax_t.m4 only tells
you if there is intmax_t.
It seems reasonably easy enough to define intmax_t but I haven't done that.
C:\src\gettext-0.17\gettext-runtime\libasprintf>diff -u8 printf-parse.c.orig
printf-parse.c
--- printf-parse.c.orig 2009-06-20 02:24:43.250000000 -0700
+++ printf-parse.c 2009-06-20 02:52:23.531250000 -0700
@@ -343,30 +343,32 @@
flags |= 4;
cp++;
}
else if (*cp == 'l')
{
flags += 8;
cp++;
}
+#if HAVE_INTMAX_T
else if (*cp == 'j')
{
if (sizeof (intmax_t)> sizeof (long))
{
/* intmax_t = long long */
flags += 16;
}
else if (sizeof (intmax_t)> sizeof (int))
{
/* intmax_t = long */
flags += 8;
}
cp++;
}
+#endif
else if (*cp == 'z' || *cp == 'Z')
{
/* 'z' is standardized in ISO C 99, but glibc uses 'Z'
because the warning facility in gcc-2.95.2 understands
only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */
if (sizeof (size_t)> sizeof (long))
{
/* size_t = long long */
strdup is only declared if _ALL_SOURCE is defined:
C:\src\gettext-0.17\gettext-runtime\libasprintf>diff -u autosprintf.cc.orig
autosprintf.cc
--- autosprintf.cc.orig 2009-06-20 02:26:45.765625000 -0700
+++ autosprintf.cc 2009-06-20 02:51:20.796875000 -0700
@@ -24,6 +24,10 @@
# define _GNU_SOURCE 1
#endif
+#if defined(__INTERIX) && !defined(_ALL_SOURCE)
+#define _ALL_SOURCE
+#endif
+
/* Specification. */
#include "autosprintf.h"
Thanks,
- Jay
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gettext-0.17 on Interix, with fixes,
Jay <=