From d8ce0f9de95f9a5c9691a1ed00d58114e0c2b74a Mon Sep 17 00:00:00 2001 From: randomdan Date: Sun, 23 Jan 2011 16:43:53 +0000 Subject: Tidy up the UUID optionals --- project2/Jamfile.jam | 17 +++++++++++++++-- project2/uuid.cpp | 2 +- project2/uuid.h | 12 +++++++----- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/project2/Jamfile.jam b/project2/Jamfile.jam index 7959ee4..cdffad9 100644 --- a/project2/Jamfile.jam +++ b/project2/Jamfile.jam @@ -20,17 +20,23 @@ lib osspuuid : : ossp-uuid++ ; feature uuid : boost ossp : propagated ; +lib p2uuid : + uuid.cpp + : + ossp:OSSP_UUID + ossp:osspuuid + ; + lib p2common : appEngine.cpp dataSource.cpp environment.cpp fileStarGlibIoChannel.cpp iHaveParameters.cpp iterate.cpp paramChecker.cpp presenter.cpp rawView.cpp dumpTask.cpp sourceObject.cpp task.cpp variables.cpp view.cpp xmlObjectLoader.cpp exceptions.cpp sessionClearTask.cpp session.cpp sessionSetTask.cpp commonObjects.cpp xmlPresenter.cpp - rowView.cpp rowSet.cpp rowUser.cpp rowProcessor.cpp uuid.cpp + rowView.cpp rowSet.cpp rowUser.cpp rowProcessor.cpp : ../libmisc//misc libxmlpp boost_filesystem - ossp:osspuuid ; lib p2xml : @@ -69,6 +75,8 @@ lib p2xmlSession : : ../libmisc//misc libxmlpp + p2uuid + ossp:OSSP_UUID ; lib p2sql : @@ -101,6 +109,7 @@ lib p2web : [ glob cgi/cgi*.cpp ] : p2common cgicc + ossp:OSSP_UUID ; exe p2cgi : @@ -114,6 +123,8 @@ exe p2cgi : p2processes p2xml p2xmlSession + p2uuid + ossp:OSSP_UUID ; exe p2fcgi : @@ -129,6 +140,8 @@ exe p2fcgi : p2processes p2xml p2xmlSession + p2uuid + ossp:OSSP_UUID ; exe p2console : diff --git a/project2/uuid.cpp b/project2/uuid.cpp index 03e851e..6b8bd0d 100644 --- a/project2/uuid.cpp +++ b/project2/uuid.cpp @@ -64,7 +64,7 @@ UUID UUID::generate_random() { UUID u; - u.ossp_uuid.make(UUID_MAKE_V5); + u.ossp_uuid.make(UUID_MAKE_V4); return u; } diff --git a/project2/uuid.h b/project2/uuid.h index 8cb22f3..b4d0e7f 100644 --- a/project2/uuid.h +++ b/project2/uuid.h @@ -4,13 +4,15 @@ #include #include -#if BOOST_VERSION < 104200 -//#if 1 -# define USINGOSSPUUID +#ifdef USINGOSSPUUID # include #else -# define USINGBOOSTUUID -# include +# if BOOST_VERSION < 104200 +# error "Boost UUIDs required v1.42 or above" +# else +# include +# define USINGBOOSTUUID +# endif #endif class UUID { -- cgit v1.2.3