diff options
author | Marc Laukien <marc@zeroc.com> | 2002-09-22 15:57:38 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-09-22 15:57:38 +0000 |
commit | dff71be00b07d293b318fede3167b3c48f2270b8 (patch) | |
tree | 35e0236914020cd396dca7675119fb3c435693ac /cpp/src/IceUtil/UUID.cpp | |
parent | thread fixes (diff) | |
download | ice-dff71be00b07d293b318fede3167b3c48f2270b8.tar.bz2 ice-dff71be00b07d293b318fede3167b3c48f2270b8.tar.xz ice-dff71be00b07d293b318fede3167b3c48f2270b8.zip |
dos2unix
Diffstat (limited to 'cpp/src/IceUtil/UUID.cpp')
-rw-r--r-- | cpp/src/IceUtil/UUID.cpp | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/cpp/src/IceUtil/UUID.cpp b/cpp/src/IceUtil/UUID.cpp index 21bab48af46..95ddb2a1d38 100644 --- a/cpp/src/IceUtil/UUID.cpp +++ b/cpp/src/IceUtil/UUID.cpp @@ -1,50 +1,50 @@ -// **********************************************************************
-//
-// Copyright (c) 2001
-// Mutable Realms, Inc.
-// Huntsville, AL, USA
-//
-// All Rights Reserved
-//
-// **********************************************************************
-
-#include <IceUtil/UUID.h>
-
-#ifdef _WIN32
-# include <rpc.h>
-#else
-extern "C" // uuid/uuid.h seems to miss extern "C" declarations.
-{
-# include <uuid/uuid.h>
-}
-#endif
-
-using namespace std;
-
-string
-IceUtil::generateUUID()
-{
-#ifdef _WIN32
-
- UUID uuid;
- UuidCreate(&uuid);
-
- unsigned char* str;
- UuidToString(&uuid, &str);
-
- string result(reinterpret_cast<char*>(str));
- RpcStringFree(&str);
- return result;
-
-#else
-
- uuid_t uuid;
- uuid_generate(uuid);
-
- char str[37];
- uuid_unparse(uuid, str);
-
- return str;
-
-#endif
-}
+// ********************************************************************** +// +// Copyright (c) 2001 +// Mutable Realms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#include <IceUtil/UUID.h> + +#ifdef _WIN32 +# include <rpc.h> +#else +extern "C" // uuid/uuid.h seems to miss extern "C" declarations. +{ +# include <uuid/uuid.h> +} +#endif + +using namespace std; + +string +IceUtil::generateUUID() +{ +#ifdef _WIN32 + + UUID uuid; + UuidCreate(&uuid); + + unsigned char* str; + UuidToString(&uuid, &str); + + string result(reinterpret_cast<char*>(str)); + RpcStringFree(&str); + return result; + +#else + + uuid_t uuid; + uuid_generate(uuid); + + char str[37]; + uuid_unparse(uuid, str); + + return str; + +#endif +} |