~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/json_server/json/config.h

  • Committer: Stewart Smith
  • Date: 2011-04-21 01:59:30 UTC
  • mto: (2295.1.1 drizzle-ga)
  • mto: This revision was merged to the branch mainline in revision 2310.
  • Revision ID: stewart@flamingspork.com-20110421015930-eyf651o8tbd0m4o4
add JSON library to json_server, fix up for building in our tree, and add simple /0.1/version JSON response as well as latest_api_version snippet to /

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef JSON_CONFIG_H_INCLUDED
 
2
# define JSON_CONFIG_H_INCLUDED
 
3
 
 
4
/// If defined, indicates that json library is embedded in CppTL library.
 
5
//# define JSON_IN_CPPTL 1
 
6
 
 
7
/// If defined, indicates that json may leverage CppTL library
 
8
//#  define JSON_USE_CPPTL 1
 
9
/// If defined, indicates that cpptl vector based map should be used instead of std::map
 
10
/// as Value container.
 
11
//#  define JSON_USE_CPPTL_SMALLMAP 1
 
12
/// If defined, indicates that Json specific container should be used
 
13
/// (hash table & simple deque container with customizable allocator).
 
14
/// THIS FEATURE IS STILL EXPERIMENTAL!
 
15
//#  define JSON_VALUE_USE_INTERNAL_MAP 1
 
16
/// Force usage of standard new/malloc based allocator instead of memory pool based allocator.
 
17
/// The memory pools allocator used optimization (initializing Value and ValueInternalLink
 
18
/// as if it was a POD) that may cause some validation tool to report errors.
 
19
/// Only has effects if JSON_VALUE_USE_INTERNAL_MAP is defined.
 
20
//#  define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1
 
21
 
 
22
/// If defined, indicates that Json use exception to report invalid type manipulation
 
23
/// instead of C assert macro.
 
24
# define JSON_USE_EXCEPTION 1
 
25
 
 
26
# ifdef JSON_IN_CPPTL
 
27
#  include <cpptl/config.h>
 
28
#  ifndef JSON_USE_CPPTL
 
29
#   define JSON_USE_CPPTL 1
 
30
#  endif
 
31
# endif
 
32
 
 
33
# ifdef JSON_IN_CPPTL
 
34
#  define JSON_API CPPTL_API
 
35
# elif defined(JSON_DLL_BUILD)
 
36
#  define JSON_API __declspec(dllexport)
 
37
# elif defined(JSON_DLL)
 
38
#  define JSON_API __declspec(dllimport)
 
39
# else
 
40
#  define JSON_API
 
41
# endif
 
42
 
 
43
#endif // JSON_CONFIG_H_INCLUDED