mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 02:51:27 +00:00
Make pnUtUuid compile on *nix.
This commit is contained in:
@ -45,6 +45,7 @@ set(pnUtils_SOURCES
|
||||
pnUtSpareList.cpp
|
||||
pnUtStr.cpp
|
||||
pnUtTime.cpp
|
||||
pnUtUuid.cpp
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
@ -59,13 +60,12 @@ if(WIN32)
|
||||
|
||||
pnUtCrypt.cpp
|
||||
pnUtTls.cpp
|
||||
pnUtUuid.cpp
|
||||
)
|
||||
else()
|
||||
set(pnUtils_UNIX
|
||||
Unix/pnUtUxStr.cpp
|
||||
#Unix/pnUtUxSync.cpp
|
||||
#Unix/pnUtUxUuid.cpp
|
||||
Unix/pnUtUxUuid.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@ -50,7 +50,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
#include "pnUtCoreLib.h" // must be first in list
|
||||
#include "pnUtPragma.h"
|
||||
#include "pnProduct/pnProduct.h"
|
||||
|
||||
#include <malloc.h>
|
||||
|
||||
|
@ -45,7 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
*
|
||||
***/
|
||||
|
||||
#include "../pnUtUUID.h"
|
||||
#include "../pnUtUuid.h"
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
|
@ -52,18 +52,14 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "pnUtCoreLib.h" // must be first in list
|
||||
#include "pnUtPragma.h"
|
||||
#include "pnUtAddr.h"
|
||||
#if HS_BUILD_FOR_WIN32
|
||||
#include "pnUtUuid.h"
|
||||
#endif
|
||||
#include "pnUtMath.h"
|
||||
#include "pnUtSort.h"
|
||||
#include "pnUtArray.h"
|
||||
#include "pnUtList.h"
|
||||
#include "pnUtHash.h"
|
||||
#include "pnUtPriQ.h"
|
||||
#if HS_BUILD_FOR_WIN32
|
||||
#include "pnUtSync.h"
|
||||
#endif
|
||||
#include "pnUtTime.h"
|
||||
#if HS_BUILD_FOR_WIN32
|
||||
#include "pnUtTls.h"
|
||||
|
@ -46,6 +46,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
***/
|
||||
|
||||
#include "pnUtCrypt.h"
|
||||
#include "pnUtStr.h"
|
||||
#include "pnUtTime.h"
|
||||
|
||||
#include <openssl/md5.h>
|
||||
#include <openssl/sha.h>
|
||||
@ -360,13 +362,13 @@ void CryptHashPasswordChallenge (
|
||||
const ShaDigest & namePassHash,
|
||||
ShaDigest * challengeHash
|
||||
) {
|
||||
#include <pshpack1.h>
|
||||
#pragma pack(push, 1)
|
||||
struct {
|
||||
uint32_t clientChallenge;
|
||||
uint32_t serverChallenge;
|
||||
ShaDigest namePassHash;
|
||||
} buffer;
|
||||
#include <poppack.h>
|
||||
#pragma pack(pop)
|
||||
buffer.clientChallenge = clientChallenge;
|
||||
buffer.serverChallenge = serverChallenge;
|
||||
buffer.namePassHash = namePassHash;
|
||||
|
@ -104,9 +104,9 @@ public:
|
||||
|
||||
#ifdef HS_BUILD_FOR_WIN32
|
||||
typedef HANDLE EventHandle;
|
||||
#else
|
||||
# error "CEvent: Not implemented on this platform"
|
||||
#endif
|
||||
//#else
|
||||
//# error "CEvent: Not implemented on this platform"
|
||||
//#endif
|
||||
|
||||
const unsigned kEventWaitForever = (unsigned)-1;
|
||||
|
||||
@ -130,5 +130,6 @@ public:
|
||||
|
||||
const EventHandle & Handle () const { return m_handle; }
|
||||
};
|
||||
#endif // HS_BUILD_FOR_WIN32
|
||||
|
||||
#endif
|
||||
|
@ -46,6 +46,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
***/
|
||||
|
||||
#include "pnUtUuid.h"
|
||||
#include "pnUtHash.h"
|
||||
#include "pnUtStr.h"
|
||||
|
||||
|
||||
const Uuid kNilGuid;
|
||||
|
@ -95,7 +95,7 @@ bool GuidFromHex (const uint8_t buf[], unsigned length, Uuid * uuid);
|
||||
*
|
||||
***/
|
||||
|
||||
#include <pshpack1.h>
|
||||
#pragma pack(push, 1)
|
||||
struct Uuid {
|
||||
union {
|
||||
uint32_t uint32_ts[4];
|
||||
@ -113,6 +113,6 @@ struct Uuid {
|
||||
inline bool operator != (const Uuid & rhs) const { return !GuidsAreEqual(*this, rhs); }
|
||||
inline bool operator != (int rhs) const { ASSERT(!rhs); return !GuidsAreEqual(*this, kNilGuid); }
|
||||
};
|
||||
#include <poppack.h>
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user