diff options
author | weidai <weidai11@users.noreply.github.com> | 2010-07-05 01:15:14 +0000 |
---|---|---|
committer | weidai <weidai11@users.noreply.github.com> | 2010-07-05 01:15:14 +0000 |
commit | 1315a7bc9a32e86db2ae4aa7cefcfec5b2f4e3ab (patch) | |
tree | bdfe463fd8b180c37b65007e19a29aa915fff3b3 /validat1.cpp | |
parent | 954fed3d5d6edb2639d5e093b0529b589ac31120 (diff) | |
download | cryptopp-git-1315a7bc9a32e86db2ae4aa7cefcfec5b2f4e3ab.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
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 9935bbdb..680314c1 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: "; |