note
PodMaster
Hmm. I checked, and I have compiled Data-UUID at one time, and my diff looks like
<code>
diff -ubr Data-UUID-0.11/Makefile.PL myData-UUID-0.11/Makefile.PL
--- Data-UUID-0.11/Makefile.PL 2003-08-27 12:38:36.000000000 -0700
+++ myData-UUID-0.11/Makefile.PL 2005-06-22 07:21:04.375000000 -0700
@@ -1,5 +1,7 @@
use ExtUtils::MakeMaker;
use Config;
+my $tmp = $ENV{TEMP}||$ENV{TMP}||"/var/tmp";
+$tmp =~ s~\\~/~g;;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
@@ -52,14 +54,15 @@
my ($d, $m);
# automate installations - as per Heath Malmstrom
if(!$ENV{PERL_MM_USE_DEFAULT}) {
- do { print "UUID state storage (/var/tmp): ";
+ do { print "UUID state storage ($tmp): ";
} while !($d = <STDIN>, chop $d, -d $d || !$d);
do { print "default umask (0007): ";
} while !($m = <STDIN>, chop $m, ($m =~ /[0-7]{3}/) || !$m);
}
- chmod(0666, sprintf("%s/%s", $d||"/var/tmp", ".UUID_NODEID"));
- chmod(0666, sprintf("%s/%s", $d||"/var/tmp", ".UUID_STATE"));
- return { 'DEFINE' => qq(-D_STDIR=\\").($d||"/var/tmp").qq(\\").
+ chmod(0666, sprintf("%s/%s", $d||"$tmp", ".UUID_NODEID"));
+ chmod(0666, sprintf("%s/%s", $d||"$tmp", ".UUID_STATE"));
+ $d =~ s~\\~/~g;
+ return { 'DEFINE' => qq(-D_STDIR=\\").($d||"$tmp").'\\" '.
qq( -D__$Config{osname}__).
qq( -D_DEFAULT_UMASK=).($m||"0007")};
}
diff -ubr Data-UUID-0.11/UUID.h myData-UUID-0.11/UUID.h
--- Data-UUID-0.11/UUID.h 2003-08-27 12:38:36.000000000 -0700
+++ myData-UUID-0.11/UUID.h 2005-06-22 07:22:58.656250000 -0700
@@ -4,7 +4,9 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
+#ifndef WIN32
#include <unistd.h>
+#endif
#include <time.h>
#include "md5.h"
@@ -29,7 +31,7 @@
#else
# define PTR2ul(p) INT2PTR(unsigned long,p)
#endif
-#if defined __cygwin__ || __mingw32__
+#if defined __cygwin__ || __mingw32__ || WIN32
#include <windows.h>
#endif
#if defined __darwin__
@@ -49,8 +51,14 @@
#define UUID_STATE_NV_STORE _STDIR"/"UUID_STATE
#define UUID_NODEID_NV_STORE _STDIR"/"UUID_NODEID
+
#define UUIDS_PER_TICK 1024
+/*podmaster*/
+#ifdef WIN32
+#define I64(C) ((unsigned __int64) C##)
+#else
#define I64(C) C##LL
+#endif
#define F_BIN 0
#define F_STR 1
@@ -63,7 +71,12 @@
typedef unsigned short unsigned16;
typedef unsigned char unsigned8;
typedef unsigned char byte;
+/*podmaster*/
+#ifdef WIN32
+typedef unsigned __int64 unsigned64_t;
+#else
typedef unsigned long long unsigned64_t;
+#endif
typedef unsigned64_t uuid_time_t;
#if defined __solaris__ || defined __linux__
@@ -116,7 +129,7 @@
);
static void get_current_time(uuid_time_t * timestamp);
static unsigned16 true_random(void);
-static void get_system_time(uuid_time_t *uuid_time);
+static void get_system_time(uuid_time_t * uuid_time);
static void get_random_info(unsigned char seed[16]);
static char *base64 =
diff -ubr Data-UUID-0.11/UUID.xs myData-UUID-0.11/UUID.xs
--- Data-UUID-0.11/UUID.xs 2003-08-27 12:38:36.000000000 -0700
+++ myData-UUID-0.11/UUID.xs 2005-06-22 07:30:22.640625000 -0700
@@ -105,7 +105,7 @@
}
static void get_system_time(uuid_time_t *uuid_time) {
-#if defined __CYGWIN__ || __MINGW32__
+#if defined __CYGWIN__ || __MINGW32__ || WIN32
/* 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 __CYGWIN__ || __MINGW32__ || WIN32
typedef struct {
MEMORYSTATUS m;
SYSTEM_INFO s;
@@ -150,7 +150,7 @@
MD5Init(&c);
-#if defined __CYGWIN__ || __MINGW32__
+#if defined __CYGWIN__ || __MINGW32__ || WIN32
GlobalMemoryStatus(&r.m);
GetSystemInfo(&r.s);
GetSystemTimeAsFileTime(&r.t);
</code>
<div class="pmsig"><div class="pmsig-107642">
<div class="pmsig"><div class="pmsig-107642"><p><table border=0 cellpadding=1 cellspacing=0 width="100%"><tr><td colspan=2 bgcolor="#FFF0FF"><small><font color="black"><a href="http://perlmonks.org/index.pl?node=MJD"><b><font color="#0F0FAA">MJD</font></b></a> <a href="http://www.perl.org/yapc/2002/movies/themovie/"><b><font color="#0F0FAA">says</font></b></a> "you <i>can't just make shit up and expect the computer to know what you mean, retardo</i><B>!</B>"</font></small></td></tr><tr><td colspan=2 bgcolor="#FFE0FF"><small><font color="black">I run a Win32 PPM <a href="http://perlmonks.org/index.pl?node=162391"><b><font color="#0F0FAA">repository</font></b></a> for perl <a href="http://crazyinsomniac.perlmonk.org/perl/ppm"><b><font color="#0F0FAA">5.6.x</font></b></a> and <a href="http://crazyinsomniac.perlmonk.org/perl/ppm/5.8"><b><font color="#0F0FAA">5.8.x</font></b></a> -- I take requests (<a href="http://crazyinsomniac.perlmonk.org/perl/ppm/README.html"><b><font color="#0F0FAA">README</font></b></a>).</font></small></td></tr><tr><td colspan=2 bgcolor="#FFD0FF"><small><font color="black">** The third rule of perl club is a statement of fact: pod is sexy.</font></small></td></tr></table></div></div>
</div></div>
482354
482430