Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Data-UUID CPAN distribution.

Report information
The Basics
Id: 7088
Status: resolved
Priority: 0/
Queue: Data-UUID

People
Owner: Nobody in particular
Requestors: maxb [...] ukf.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.11
Fixed in: (no value)



Subject: Cygwin/Mingw specific code actually fails to compile on Cygwin.
The code in the #ifdef __MINGW__ || __CYGWIN__ fails to compile on Cygwin, but the standard Unix code works fine! The fix is to simply remove the special-casing of Cygwin.
--- Data-UUID-0.11/UUID.xs.orig 2004-07-24 11:47:07.931862400 +0100 +++ Data-UUID-0.11/UUID.xs 2004-07-24 11:47:39.377078400 +0100 @@ -105,7 +105,7 @@ } static void get_system_time(uuid_time_t *uuid_time) { -#if defined __CYGWIN__ || __MINGW32__ +#if defined __MINGW32__ /* ULARGE_INTEGER time; */ LARGE_INTEGER time; @@ -129,7 +129,7 @@ static void get_random_info(unsigned char seed[16]) { MD5_CTX c; -#if defined __CYGWIN__ || __MINGW32__ +#if defined __MINGW32__ typedef struct { MEMORYSTATUS m; SYSTEM_INFO s; @@ -150,7 +150,7 @@ MD5Init(&c); -#if defined __CYGWIN__ || __MINGW32__ +#if defined __MINGW32__ GlobalMemoryStatus(&r.m); GetSystemInfo(&r.s); GetSystemTimeAsFileTime(&r.t);
or include cygwin headers. [guest - Sun Jul 25 13:26:29 2004]: Show quoted text
> The code in the #ifdef __MINGW__ || __CYGWIN__ fails to compile on > Cygwin, > but the standard Unix code works fine! > > The fix is to simply remove the special-casing of Cygwin.
--- UUID.xs 2004-07-26 15:38:52.439298000 -0400 +++ UUID.xs.orig 2004-07-26 15:37:48.425347000 -0400 @@ -3,11 +3,6 @@ #include "XSUB.h" #include "UUID.h" -#if defined __CYGWIN__ || __MINGW32__ -#include "w32api/windef.h" -#include "w32api/winbase.h" -#endif - static uuid_t NameSpace_DNS = { /* 6ba7b810-9dad-11d1-80b4-00c04fd430c8 */ 0x6ba7b810, 0x9dad,
From: maxb [...] ukf.net
[guest - Tue Jul 27 08:25:37 2004]: Show quoted text
> or include cygwin headers.
The patch is wrong because: windef.h & winbase.h are implementation details of windows.h Always include windows.h instead. But, in any case, Cygwin is supposed to be a Unix-like environment. Using the unix code for cygwin seems more appropriate in a philosophical way, to me.
[guest - Tue Jul 27 09:47:31 2004]: Show quoted text
> [guest - Tue Jul 27 08:25:37 2004]:
> > or include cygwin headers.
> > The patch is wrong because: > windef.h & winbase.h are implementation details of windows.h > Always include windows.h instead.
did you actually try windows.h? it doesn't work for me. Show quoted text
> But, in any case, Cygwin is supposed to be a Unix-like environment. > Using the unix code for cygwin seems more appropriate in a > philosophical > way, to me.
don't we see something like this from time to time: #if defined(__sunos__) #elif defined(__linux__) #endif
[guest - Tue Jul 27 09:47:31 2004]: Show quoted text
> [guest - Tue Jul 27 08:25:37 2004]:
> > or include cygwin headers.
> > The patch is wrong because: > windef.h & winbase.h are implementation details of windows.h > Always include windows.h instead.
did you actually try windows.h? it doesn't work for me. Show quoted text
> But, in any case, Cygwin is supposed to be a Unix-like environment. > Using the unix code for cygwin seems more appropriate in a > philosophical > way, to me.
don't we see something like this from time to time: #if defined(__sunos__) #elif defined(__linux__) #endif
Let me know if these changes still make sense to make against 0.142, or if this is now resolved. I have no cygwin on which to test. -- rjbs
I believe this has been fixed for some time now. -- rjbs