diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2010-07-05 01:15:14 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2010-07-05 01:15:14 +0000 |
commit | 55a8ab1c8b2d3ff2ad7b3325f87e78b8976a6169 (patch) | |
tree | bdfe463fd8b180c37b65007e19a29aa915fff3b3 /validat1.cpp | |
parent | 32a4a9f72510c22a1c4ef7b73b0496ea031a090b (diff) | |
download | cryptopp-55a8ab1c8b2d3ff2ad7b3325f87e78b8976a6169.tar.gz |
port to Sun Studio 12u1 Sun C++ 5.10 SunOS_i386 128229-02 2009/09/21
change makefile to compile for both i386 and x86_64 on Darwin/Mac OS X
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@499 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'validat1.cpp')
-rw-r--r-- | validat1.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/validat1.cpp b/validat1.cpp index 9935bbd..680314c 100644 --- a/validat1.cpp +++ b/validat1.cpp @@ -130,7 +130,10 @@ bool TestSettings() cout << "\nTesting Settings...\n\n"; - if (*(word32 *)"\x01\x02\x03\x04" == 0x04030201L) + word32 w; + memcpy_s(&w, sizeof(w), "\x01\x02\x03\x04", 4); + + if (w == 0x04030201L) { #ifdef IS_LITTLE_ENDIAN cout << "passed: "; @@ -140,7 +143,7 @@ bool TestSettings() #endif cout << "Your machine is little endian.\n"; } - else if (*(word32 *)"\x01\x02\x03\x04" == 0x01020304L) + else if (w == 0x01020304L) { #ifndef IS_LITTLE_ENDIAN cout << "passed: "; |