Skip to content

Commit

Permalink
set BSON_MINKEY to 255 if char is unsigned
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Lee committed Aug 16, 2013
1 parent 48f7105 commit 0309edf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions perl_mongo.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ typedef __int64 int64_t;
#include <stdint.h>
#endif // _MSC_VER
#endif // WIN32
#include <limits.h>

// define regex macros for Perl 5.8
#ifndef RX_PRECOMP
Expand Down Expand Up @@ -112,7 +113,11 @@ typedef __int64 int64_t;
#define BSON_INT 16
#define BSON_TIMESTAMP 17
#define BSON_LONG 18
#if CHAR_MIN == 0 // char is unsigned
#define BSON_MINKEY 255
#else
#define BSON_MINKEY -1
#endif
#define BSON_MAXKEY 127

#define GROW_SLOWLY 1048576
Expand Down

0 comments on commit 0309edf

Please sign in to comment.