[poppler] Two portability tweaks

Bob Jamison ishmalius at gmail.com
Fri Oct 19 13:44:31 PDT 2007


Hi all,

I'm the guy who does Inkscape builds for WIN32, and I found
two places that need to be tweaked for Mingw builds:

#1 :  in /glib,  the Makefile needs to call libtool with  "--mode=link g++"
instead of gcc.  I don't know how to do that in Makefile.am, but that's what
it needs.  In the Makefile it is $(CXXLD).

#2 : /glib/test-poppler-glib needs to call localtime() rather than
localtime_r():

static gchar *
poppler_format_date (GTime utime)
{
    time_t time = (time_t) utime;
    struct tm *t;
    char s[256];
    const char *fmt_hack = "%c";
    size_t len;

    if (time == 0 || !(t = localtime (&time)) ) return NULL;

    len = strftime (s, sizeof (s), fmt_hack, t);
    if (len == 0 || s[0] == '\0') return NULL;

    return g_locale_to_utf8 (s, -1, NULL, NULL, NULL);
}



Many thanks!  Please CC me.


bob (ishmal)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/poppler/attachments/20071019/250d1e13/attachment.htm 


More information about the poppler mailing list