summaryrefslogtreecommitdiffabout
path: root/test/RP.cc
authorMichael Krelin <hacker@klever.net>2009-03-11 20:18:56 (UTC)
committer Michael Krelin <hacker@klever.net>2009-03-11 20:18:56 (UTC)
commite9a08ddbc451de3725293bf27ea90f579809af23 (patch) (side-by-side diff)
tree2795b8b8e7a4415621b7601d49fe10e755de8321 /test/RP.cc
parentdc10624546cc63fef3e633e493535698d3cc6998 (diff)
downloadlibopkele-e9a08ddbc451de3725293bf27ea90f579809af23.zip
libopkele-e9a08ddbc451de3725293bf27ea90f579809af23.tar.gz
libopkele-e9a08ddbc451de3725293bf27ea90f579809af23.tar.bz2
missing include for gcc 4.3
Diffstat (limited to 'test/RP.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--test/RP.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/RP.cc b/test/RP.cc
index 35ee71d..f015723 100644
--- a/test/RP.cc
+++ b/test/RP.cc
@@ -1,51 +1,52 @@
#include <uuid/uuid.h>
#include <iostream>
#include <cassert>
+#include <cstdlib>
#include <stdexcept>
#include <string>
#include <set>
#include <iterator>
using namespace std;
#include <kingate/exception.h>
#include <kingate/plaincgi.h>
#include <kingate/cgi_gateway.h>
#include <opkele/exception.h>
#include <opkele/types.h>
#include <opkele/util.h>
#include <opkele/uris.h>
#include <opkele/discovery.h>
#include <opkele/association.h>
#include <opkele/sreg.h>
using namespace opkele;
#include <opkele/prequeue_rp.h>
#include <opkele/debug.h>
#include "sqlite.h"
#include "kingate_openid_message.h"
#undef DUMB_RP
#ifdef DUMB_RP
# define DUMBTHROW throw opkele::dumb_RP(OPKELE_CP_ "This RP is dumb")
#else
# define DUMBTHROW (void)0
#endif
class rpdb_t : public sqlite3_t {
public:
rpdb_t()
: sqlite3_t("/tmp/RP.db") {
assert(_D);
char **resp; int nrow,ncol; char *errm;
if(sqlite3_get_table(
_D,"SELECT a_op FROM assoc LIMIT 0",
&resp,&nrow,&ncol,&errm)!=SQLITE_OK) {
extern const char *__RP_db_bootstrap;
DOUT_("Bootstrapping DB");
if(sqlite3_exec(_D,__RP_db_bootstrap,NULL,NULL,&errm)!=SQLITE_OK)
throw opkele::exception(OPKELE_CP_ string("Failed to bootstrap SQLite database: ")+errm);
}else
sqlite3_free_table(resp);
}
};