Thinking of glib's GObject (and) Introspection API
Allen Winter
winter at kde.org
Fri May 6 07:36:46 PDT 2016
On Wednesday, May 04, 2016 10:54:59 PM Milan Crha wrote:
> On Wed, 2016-05-04 at 13:43 -0400, Allen Winter wrote:
> > committed.
> > I've been doing some cleanups and also getting it to build on travis.
>
> Hi,
> thanks. I attached two more patches here, which resulted after my build
> with mingw under Windows. You fixed one issue with your clean-up when
> you replaced the stpcpy with g_stpcpy, then there left:
>
> 0001) incorrect includes in the libical-glib src-generator
committed
> 0002) the gmtime_r is not available on windows, thus fallback to
> gmtime there; the HAVE_GMTIME_R in config.h is not defined,
> as expected, only the code doesn't check for it; evolution-
> data-server contains a similar change which works fine
>
we already have this code in config.h.cmake. question is why it isn't
being used with mingw. can you look at fixing this just once inside config.h.cmake?
see this code in config.h.cmake, which apparently needs to handle MINGW:
/* gmtime_r - thread safe gmtime() really only needed on Unix */
#if !defined(HAVE_GMTIME_R)
#if !defined(_WIN32)
#error "No thread-safe gmtime function available"
#endif
/*on Windows there might be a macro called gmtime_r in pthread.h. don't use it.*/
#if defined(gmtime_r)
#undef gmtime_r
#endif
/* FYI: The gmtime() in Microsoft's C library is MT-safe */
#define gmtime_r(tp,tmp) (gmtime(tp)?(*(tmp)=*gmtime(tp),(tmp)):0)
#endif
More information about the libical-devel
mailing list