Subject: | patch: partial fix for MSVC |
perl v5.8.7 built for MSWin32-x86-multi-thread
Binary build 813
With this patch it compiles further.
'unsigned long long' is called 'unsigned __int64' in MSVC.
And there is no <unistd.h> in MSVC.
With this patch it shows following error:
UUID.xs(262) : warning C4129: 'D' : unrecognized character escape sequence
UUID.xs(262) : warning C4129: 'S' : unrecognized character escape sequence
UUID.xs(262) : warning C4129: 'L' : unrecognized character escape sequence
UUID.xs(262) : warning C4129: 'T' : unrecognized character escape sequence
UUID.xs(268) : warning C4129: 'D' : unrecognized character escape sequence
UUID.xs(268) : warning C4129: 'S' : unrecognized character escape sequence
UUID.xs(268) : warning C4129: 'L' : unrecognized character escape sequence
UUID.xs(268) : warning C4129: 'T' : unrecognized character escape sequence
UUID.xs(269) : error C2065: 'pid_t' : undeclared identifier
UUID.xs(269) : error C2065: 'hate' : undeclared identifier
-------
Alexandr Ciornii, http://chorny.net
Subject: | UUID.h.patch |
*** UUID.h.orig Tue Jul 25 11:53:01 2006
--- UUID.h Tue Jul 25 11:59:50 2006
***************
*** 7,13 ****
--- 7,16 ----
#ifndef WIN32
#include <unistd.h>
#endif
+ #ifndef _MSC_VER
+ // No unistd.h in MS VC
#include <unistd.h>
+ #endif
#include <time.h>
#include "md5.h"
***************
*** 66,72 ****
--- 69,80 ----
typedef unsigned short unsigned16;
typedef unsigned char unsigned8;
typedef unsigned char byte;
+ #ifndef _MSC_VER
typedef unsigned long long unsigned64_t;
+ # else
+ typedef unsigned __int64 unsigned64_t;
+ // http://msdn2.microsoft.com/en-us/library/296az74e.aspx - Integer Limits
+ #endif
typedef unsigned64_t perl_uuid_time_t;
#if defined __solaris__ || defined __linux__