annotate Core/Endianness.h @ 2319:ae6245053bcf

made some manufacturer obsolete: MedInria (that was not used), Syngovia & AgfaImpax (replaced by GenericNoWildcardInDates) + added 'GenericNoWildcards'
author amazy
date Thu, 13 Jul 2017 12:37:55 +0200
parents a3a65de1840f
children 5edec967055e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1938
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
2244
a3a65de1840f shared copyright with osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1976
diff changeset
5 * Copyright (C) 2017 Osimis, Belgium
1938
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU General Public License as
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * published by the Free Software Foundation, either version 3 of the
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * License, or (at your option) any later version.
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * In addition, as a special exception, the copyright holders of this
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * program give permission to link the code of its release with the
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * OpenSSL project's "OpenSSL" library (or with modified versions of it
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * that use the same license as the "OpenSSL" library), and distribute
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * the linked executables. You must obey the GNU General Public License
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * in all respects for all of the code used other than "OpenSSL". If you
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * modify file(s) with this exception, you may extend this exception to
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * your version of the file(s), but you are not obligated to do so. If
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 * you do not wish to do so, delete this exception statement from your
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 * version. If you delete this exception statement from all source files
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 * in the program, then also delete it here.
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 *
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 * This program is distributed in the hope that it will be useful, but
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 * WITHOUT ANY WARRANTY; without even the implied warranty of
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 * General Public License for more details.
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 *
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 * You should have received a copy of the GNU General Public License
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 * along with this program. If not, see <http://www.gnu.org/licenses/>.
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 **/
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 #pragma once
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 /********************************************************************
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 ** LINUX ARCHITECTURES
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 ********************************************************************/
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40
1976
325772dadcd6 Macro "__linux" (now obsolete) replaced by macro "__linux__"
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1971
diff changeset
41 #if defined(__linux__)
1971
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
42 # define ORTHANC_HAS_BUILTIN_BYTE_SWAP 1
1938
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 # include <endian.h>
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 #endif
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 /********************************************************************
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 ** WINDOWS ARCHITECTURES
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 **
1950
533ff46e944b return a single raw frame from DICOM videos
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1939
diff changeset
50 ** On Windows x86, "host" will always be little-endian ("le").
1938
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 ********************************************************************/
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 #if defined(_WIN32)
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 # if defined(_MSC_VER)
1971
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
55 // Visual Studio - http://msdn.microsoft.com/en-us/library/a3140177.aspx
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
56 # define ORTHANC_HAS_BUILTIN_BYTE_SWAP 1
1938
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 # define be16toh(x) _byteswap_ushort(x)
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 # define be32toh(x) _byteswap_ulong(x)
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 # define be64toh(x) _byteswap_uint64(x)
1971
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
60 # elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
61 // MinGW >= 4.3 - Use builtin intrinsic for byte swapping
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
62 # define ORTHANC_HAS_BUILTIN_BYTE_SWAP 1
1938
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 # define be16toh(x) __builtin_bswap16(x)
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 # define be32toh(x) __builtin_bswap32(x)
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 # define be64toh(x) __builtin_bswap64(x)
1971
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
66 # else
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
67 // MinGW <= 4.2, we must manually implement the byte swapping
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
68 # define ORTHANC_HAS_BUILTIN_BYTE_SWAP 0
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
69 # define be16toh(x) __orthanc_bswap16(x)
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
70 # define be32toh(x) __orthanc_bswap32(x)
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
71 # define be64toh(x) __orthanc_bswap64(x)
1938
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 # endif
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 # define htobe16(x) be16toh(x)
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 # define htobe32(x) be32toh(x)
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 # define htobe64(x) be64toh(x)
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 # define htole16(x) x
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 # define htole32(x) x
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 # define htole64(x) x
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 # define le16toh(x) x
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 # define le32toh(x) x
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 # define le64toh(x) x
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 #endif
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 /********************************************************************
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 ** FREEBSD ARCHITECTURES
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 ********************************************************************/
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
1971
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
93 # define ORTHANC_HAS_BUILTIN_BYTE_SWAP 1
1938
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 # include <arpa/inet.h>
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 #endif
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 /********************************************************************
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 ** APPLE ARCHITECTURES (including OS X)
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 ********************************************************************/
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 #if defined(__APPLE__)
1971
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
103 # define ORTHANC_HAS_BUILTIN_BYTE_SWAP 1
1938
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 # include <libkern/OSByteOrder.h>
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 # define be16toh(x) OSSwapBigToHostInt16(x)
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 # define be32toh(x) OSSwapBigToHostInt32(x)
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 # define be64toh(x) OSSwapBigToHostInt64(x)
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 # define htobe16(x) OSSwapHostToBigInt16(x)
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 # define htobe32(x) OSSwapHostToBigInt32(x)
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 # define htobe64(x) OSSwapHostToBigInt64(x)
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 # define htole16(x) OSSwapHostToLittleInt16(x)
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 # define htole32(x) OSSwapHostToLittleInt32(x)
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 # define htole64(x) OSSwapHostToLittleInt64(x)
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 # define le16toh(x) OSSwapLittleToHostInt16(x)
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 # define le32toh(x) OSSwapLittleToHostInt32(x)
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 # define le64toh(x) OSSwapLittleToHostInt64(x)
48ad54f7b21f endianness
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 #endif
1971
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
121
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
122
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
123 /********************************************************************
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
124 ** PORTABLE (BUT SLOW) IMPLEMENTATION OF BYTE-SWAPPING
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
125 ********************************************************************/
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
126
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
127 #if ORTHANC_HAS_BUILTIN_BYTE_SWAP != 1
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
128
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
129 #include <stdint.h>
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
130
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
131 static inline uint16_t __orthanc_bswap16(uint16_t a)
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
132 {
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
133 return (a << 8) | (a >> 8);
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
134 }
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
135
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
136 static inline uint32_t __orthanc_bswap32(uint32_t a)
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
137 {
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
138 const uint8_t* p = reinterpret_cast<const uint8_t*>(&a);
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
139 return (static_cast<uint32_t>(p[0]) << 24 |
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
140 static_cast<uint32_t>(p[1]) << 16 |
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
141 static_cast<uint32_t>(p[2]) << 8 |
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
142 static_cast<uint32_t>(p[3]));
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
143 }
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
144
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
145 static inline uint64_t __orthanc_bswap64(uint64_t a)
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
146 {
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
147 const uint8_t* p = reinterpret_cast<const uint8_t*>(&a);
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
148 return (static_cast<uint64_t>(p[0]) << 56 |
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
149 static_cast<uint64_t>(p[1]) << 48 |
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
150 static_cast<uint64_t>(p[2]) << 40 |
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
151 static_cast<uint64_t>(p[3]) << 32 |
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
152 static_cast<uint64_t>(p[4]) << 24 |
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
153 static_cast<uint64_t>(p[5]) << 16 |
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
154 static_cast<uint64_t>(p[6]) << 8 |
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
155 static_cast<uint64_t>(p[7]));
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
156 }
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
157
869a87c08673 fix for mingw <= 4.2
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1950
diff changeset
158 #endif