Ticket #691: windows-floating-point-workaround.patch

File windows-floating-point-workaround.patch, 503 bytes (added by sjamaan, 13 years ago)

Patch to instruct Windows not to add extra leading zeroes to the exponent when printing floating-point numbers

  • runtime.c

    diff --git a/runtime.c b/runtime.c
    index 5f8a0ca..1368595 100644
    a b int CHICKEN_initialize(int heap, int stack, int symbols, void *toplevel) 
    584584  /*FIXME Should have C_tzset in chicken.h? */
    585585#ifdef C_NONUNIX
    586586  C_startup_time_seconds = (time_t)0;
     587# if defined(_WIN32)
     588  _set_output_format(0); /* Don't print unneccessary digits in exponent */
     589# endif
    587590# if defined(__MINGW32__)
    588591  /* Make sure _tzname, _timezone, and _daylight are set */
    589592  _tzset();