help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Building 4.62 on mingw64


From: Andrew Makhorin
Subject: Re: [Help-glpk] Building 4.62 on mingw64
Date: Thu, 29 Jun 2017 17:34:53 +0300

Hi Chris,

> > Another way:
> >
> > ./configure --disable-reentrant
> 
> There is a second problem with mingw on 64 bit windows, so this still
> won't work: The tv_sec field in struct timeval is 32 bit while time_t
> is 64 bit. Looking at msdn this seems like a microsoft header issue.

Please see the attachment for a replacement of glpk/src/env/time.c. 
I replaced the Posix version of glp_time with a new one, where gmtime is
not used (don't remember the reason for it; probably I was not sure
about the epoch.).

> 
> The attached patch tries to correct both issues, by adding a configure
> check that the tv_sec field size is the same as the time_t size and by
> defining __WOE__ for mingw to get the *_s thread safe functions
> instead of the *_r ones. It has been tested to work on 64 bit mingw
> with configure run under msys2 (thanks Rob) and on linux where it
> doesn't change anything.

Thank you for the patch. But is it really necessary to provide
reentrancy for msys2?


Best regards,

Andrew Makhorin

Attachment: time.c
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]