building glib on win32 MSVC6



Dear All,

I've just managed to build glib-1.20 on windows with MS Visual C 6. I
accept your commiserations. But it went pretty well. The only problem I
found was with strtoll and strtoull for which I cannot find a MSVC6
equivalent. So I patched GType.xs to drop back to 32-bit, which
naturally causes the 64-bit tests to fail, but hey it could be a lot worse.

diff Glib-1.120/GType.xs /opt/mh/Windows/Temp/Glib-1.120/GType.xs
699c699,703
<     return strtoll (SvPV_nolen (sv), NULL, 10);
---
    #if defined(_MSC_VER) && _MSC_VER < 1300
        return strtol(SvPV_nolen(sv), NULL, 10);
    #else
        return strtoll (SvPV_nolen (sv), NULL, 10);
    #endif
741c745,749
<     return strtoull (SvPV_nolen (sv), NULL, 10);
---
    #if defined(_MSC_VER) && _MSC_VER < 1300
        return strtoul(SvPV_nolen(sv), NULL, 10);
    #else
        return strtoull (SvPV_nolen (sv), NULL, 10);
    #endif

I'm sure you guys can do a better job, but I'm happy :)

Yours,
Martin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]