mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Fix formatted input in MinGW builds
* src/igc.c (read_gens, read_commit_limit): Don't use %zu in 32-bit MinGW builds.
This commit is contained in:
parent
e473734445
commit
1acd389e14
1 changed files with 10 additions and 0 deletions
10
src/igc.c
10
src/igc.c
|
|
@ -4953,9 +4953,15 @@ read_gens (size_t *ngens, mps_gen_param_s parms[*ngens])
|
|||
for (size_t i = 0; i < len && env < end; ++i)
|
||||
{
|
||||
int nchars;
|
||||
#if __MINGW32_MAJOR_VERSION >= 5
|
||||
if (sscanf (env, "%u %lf%n", &parms[i].mps_capacity,
|
||||
&parms[i].mps_mortality, &nchars)
|
||||
== 2)
|
||||
#else
|
||||
if (sscanf (env, "%zu %lf%n", &parms[i].mps_capacity,
|
||||
&parms[i].mps_mortality, &nchars)
|
||||
== 2)
|
||||
#endif
|
||||
{
|
||||
env += nchars;
|
||||
*ngens = i + 1;
|
||||
|
|
@ -5004,7 +5010,11 @@ read_commit_limit (size_t *limit)
|
|||
const char *env = getenv ("EMACS_IGC_COMMIT_LIMIT");
|
||||
if (env == NULL)
|
||||
return false;
|
||||
#if __MINGW32_MAJOR_VERSION >= 5
|
||||
return sscanf (env, "%u", limit) == 1;
|
||||
#else
|
||||
return sscanf (env, "%zu", limit) == 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Reference in a new issue