Codebase list libcryptx-perl / 99d1b54
HP-UX related fixes Karel Miko 8 years ago
3 changed file(s) with 22 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
1212 - maybe: add enc_b64/dec_b64 + enc_b64u/dec_b64u + enc_b32/dec_b32
1313 - maybe: x509_rsa_pubkey + x509_rsa_pubkey_alg
1414
15 0.026_01..03 2015/12/29
15 0.026_04 2015/12/31
1616 - sync with https://github.com/libtom/libtomcrypt (branch develop)
17 - 0.026_02 = with -Wall
18 - 0.026_03 = with -DLTC_NO_FAST
17 - HP-UX related fixes
1918
2019 0.026 2015/11/28
2120 - switch to JSON::MaybeXS
8181 #define LTC_FAST
8282 #endif
8383
84 /* detect HP-UX */
85 #if defined(__hpux) || defined(__hpux__)
86 #define ENDIAN_BIG
87 #if defined(__ia64) || defined(__ia64__) || defined(__LP64__)
88 #define ENDIAN_64BITWORD
89 #else
90 #define ENDIAN_32BITWORD
91 #endif
92 #endif
93
8494 /* fix for MSVC ...evil! */
8595 #ifdef _MSC_VER
8696 #define CONST64(n) n ## ui64
93103 /* this is the "32-bit at least" data type
94104 * Re-define it to suit your platform but it must be at least 32-bits
95105 */
96 #if defined(__x86_64__) || (defined(__sparc__) && defined(__arch64__))
106 #if defined(__x86_64__) || (defined(__sparc__) && defined(__arch64__)) || defined(__LP64__)
97107 typedef unsigned ulong32;
98108 #else
99109 typedef unsigned long ulong32;
100110 #endif
101111
102 #ifdef LTC_NO_FAST
112 #if defined(LTC_NO_FAST) || (__GNUC__ < 4)
103113 #undef LTC_FAST
104114 #endif
105115
106116 #ifdef LTC_FAST
107 #if __GNUC__ < 4 /* if the compiler does not support gnu extensions, i.e. its neither clang nor gcc nor icc */
108 #error the LTC_FAST hack is only available on compilers that support __attribute__((may_alias)) - disable it for your compiler, and dont worry, it won`t buy you much anyway
109 #else
110117 #ifdef ENDIAN_64BITWORD
111118 typedef ulong64 __attribute__((__may_alias__)) LTC_FAST_TYPE;
112119 #else
113120 typedef ulong32 __attribute__((__may_alias__)) LTC_FAST_TYPE;
114121 #endif
115122 #endif
116 #endif /* LTC_FAST */
117123
118124 /* detect sparc and sparc64 */
119125 #if defined(__sparc__)
6868 y += x; \
6969 }
7070
71 #ifdef __HP_cc
72 static void packet_store_header (unsigned char *dst, int section, int subsection)
73 #else
7174 static inline void packet_store_header (unsigned char *dst, int section, int subsection)
75 #endif
7276 {
7377 LTC_ARGCHKVD(dst != NULL);
7478
8286
8387 }
8488
89 #ifdef __HP_cc
90 static int packet_valid_header (unsigned char *src, int section, int subsection)
91 #else
8592 static inline int packet_valid_header (unsigned char *src, int section, int subsection)
93 #endif
8694 {
8795 unsigned long ver;
8896