Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the MongoDB CPAN distribution.

Maintainer(s)' notes

Please don't report bugs here. Please use the MongoDB Perl driver issue tracker instead.

Report information
The Basics
Id: 50602
Status: resolved
Priority: 0/
Queue: MongoDB

People
Owner: Nobody in particular
Requestors: taro.nishino [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.24
Fixed in: (no value)



Subject: patches for compilation using MSVC, and test fix under MSWIN32
Dear Kristina, The compilation using MSVC ends in failure as a matter of course. The main reason is that MSVC doesn't support C99, for instance, it has no the type "long long". May I ask you a favour? Could you apply the attached patches? In addition, I attached a patch to fix gridfs.t under MSWIN32. Best regards, Taro Nishino
Subject: gridfs.t.diff.txt
--- gridfs.t.orig Sun Oct 18 10:23:03 2009 +++ gridfs.t Sun Oct 18 10:25:14 2009 @@ -40,6 +40,7 @@ # test bin insert my $img = new IO::File("t/img.png", "r") or die $!; +$img->binmode; $id = $grid->insert($img); my $save_id = $id; $img->read($dumb_str, 4000000); @@ -91,6 +92,7 @@ # write bindata $file = $grid->find_one({'_id' => $save_id}); $wfh = IO::File->new('t/output.png', '+>') or die $!; +$wfh->binmode; $written = $file->print($wfh); is($written, $file->info->{'length'}, 'bin file length');
Subject: perl_mongo.h.diff.txt
--- perl_mongo.h.orig Sun Oct 18 10:17:13 2009 +++ perl_mongo.h Sun Oct 18 10:21:30 2009 @@ -46,6 +46,11 @@ #define PREP 1 #define NO_PREP 0 +#ifdef _MSC_VER +typedef __int64 int64_t; +#define inline __inline +#endif + #define INT_32 4 #define INT_64 8 #define DOUBLE_64 8
Subject: mongo_link.h.diff.txt
--- mongo_link.h.orig Sun Oct 18 10:19:54 2009 +++ mongo_link.h Sun Oct 18 10:22:25 2009 @@ -129,7 +129,7 @@ mongo_msg_header header; // response fields int flag; - long long cursor_id; + int64_t cursor_id; int start; // number of results used int at;
Thanks for the patches! I used Strawberry Perl to compile the driver on Windows, so I hadn't realized. I applied them to the master branch and I should be releasing a new version containing the changes in the next couple days. On Sat Oct 17 22:10:29 2009, taro-nishino wrote: Show quoted text
> Dear Kristina, > > The compilation using MSVC ends in failure as a matter of course. The > main reason > is that MSVC doesn't support C99, for instance, it has no the type > "long long". > May I ask you a favour? Could you apply the attached patches? > > In addition, I attached a patch to fix gridfs.t under MSWIN32. > > Best regards, > Taro Nishino