forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
falcon-0.9.6.8-mongo-amd64.patch
75 lines (68 loc) · 2.35 KB
/
falcon-0.9.6.8-mongo-amd64.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
From 64526ea7d3b5ec04f398bd28cb4e505e6a0f3218 Mon Sep 17 00:00:00 2001
From: Stanislas Marquis <[email protected]>
Date: Sun, 9 Jan 2011 08:40:00 +0100
Subject: [PATCH] [mongo] [cmake] Fix problems with Linux x64.
---
modules/native/mongodb/CMakeLists.txt | 11 +++++++++--
modules/native/mongodb/mongodb_mod.cpp | 2 +-
modules/native/mongodb/src/CMakeLists.txt | 8 ++++++--
3 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/modules/native/mongodb/CMakeLists.txt b/modules/native/mongodb/CMakeLists.txt
index ba7e5cf..bf2d869 100644
--- a/modules/native/mongodb/CMakeLists.txt
+++ b/modules/native/mongodb/CMakeLists.txt
@@ -8,6 +8,10 @@ falcon_define_module( FALCON_MODULE mongo )
message( STATUS "Adding mongodb module" )
+if ( NOT MSVC )
+ option( MONGO_HAVE_STDINT "MongoDB problem with int64_t?" OFF )
+endif()
+
##
# Find Falcon
#
@@ -28,8 +32,11 @@ add_subdirectory( src )
if ( MSVC )
add_definitions( -DMONGO_USE__INT64 )
else()
- #add_definitions( -DMONGO_HAVE_STDINT )
- add_definitions( -DMONGO_USE_LONG_LONG_INT )
+ if ( MONGO_HAVE_STDINT )
+ add_definitions( -DMONGO_HAVE_STDINT )
+ else()
+ add_definitions( -DMONGO_USE_LONG_LONG_INT )
+ endif()
endif()
##
diff --git a/modules/native/mongodb/mongodb_mod.cpp b/modules/native/mongodb/mongodb_mod.cpp
index 6102664..4d47fac 100644
--- a/modules/native/mongodb/mongodb_mod.cpp
+++ b/modules/native/mongodb/mongodb_mod.cpp
@@ -1321,7 +1321,7 @@ BSONIter::makeItem( const bson_type tp,
//...
break;
case bson_long:
- it = new Item( bson_iterator_long_raw( iter ) );
+ it = new Item( (int64) bson_iterator_long_raw( iter ) );
break;
case bson_eoo:
default:
diff --git a/modules/native/mongodb/src/CMakeLists.txt b/modules/native/mongodb/src/CMakeLists.txt
index 48cdaef..d883af3 100644
--- a/modules/native/mongodb/src/CMakeLists.txt
+++ b/modules/native/mongodb/src/CMakeLists.txt
@@ -7,8 +7,12 @@ include_directories( BEFORE . )
if ( MSVC )
add_definitions( -DMONGO_USE__INT64 )
else()
- add_definitions( -DMONGO_USE_LONG_LONG_INT )
- #add_definitions( --std=c99 )
+ add_definitions( -fPIC )
+ if ( MONGO_HAVE_STDINT )
+ add_definitions( -DMONGO_HAVE_STDINT )
+ else()
+ add_definitions( -DMONGO_USE_LONG_LONG_INT )
+ endif()
endif()
set( MONGO_SRCS
--
1.7.9.1