diff --git a/src/_csrc/portable_endian.h b/src/_csrc/portable_endian.h index 5f47fc19c3aec3e657db1bd324aadfbbc11efd7e_c3JjL19jc3JjL3BvcnRhYmxlX2VuZGlhbi5o..91cceebb5c3c911691da01b1d2fa522318582b5b_c3JjL19jc3JjL3BvcnRhYmxlX2VuZGlhbi5o 100644 --- a/src/_csrc/portable_endian.h +++ b/src/_csrc/portable_endian.h @@ -229,6 +229,24 @@ # define be64toh(x) (x) # define le64toh(x) (((uint64_t)le32toh(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)le32toh(((uint32_t)(x)))) << 32)) +#elif defined(__vms) +# #include <stdint.h> +# define htobe16(x) htons(x) +# define htole16(x) (x) +# define be16toh(x) ntohs(x) +# define le16toh(x) (x) + +# define htobe32(x) htonl(x) +# define htole32(x) (x) +# define be32toh(x) ntohl(x) +# define le32toh(x) (x) + +# define htobe64(x) (((uint64_t)htonl(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)htonl(((uint32_t)(x)))) << 32)) +# define htole64(x) (x) +# define be64toh(x) (((uint64_t)ntohl(((uint32_t)(((uint64_t)(x)) >> 32)))) | (((uint64_t)ntohl(((uint32_t)(x)))) << 32)) +# define le64toh(x) (x) +// typedef uint8_t u_int8_t; + #else # error platform not supported diff --git a/src/_csrc/pycabcrypt.h b/src/_csrc/pycabcrypt.h index 5f47fc19c3aec3e657db1bd324aadfbbc11efd7e_c3JjL19jc3JjL3B5Y2FiY3J5cHQuaA==..91cceebb5c3c911691da01b1d2fa522318582b5b_c3JjL19jc3JjL3B5Y2FiY3J5cHQuaA== 100644 --- a/src/_csrc/pycabcrypt.h +++ b/src/_csrc/pycabcrypt.h @@ -28,6 +28,13 @@ typedef uint16_t u_int16_t; typedef uint32_t u_int32_t; typedef uint64_t u_int64_t; +#elif defined(__vms) +#include <stdint.h> +typedef uint8_t u_int8_t; +typedef uint16_t u_int16_t; +typedef uint32_t u_int32_t; +typedef uint64_t u_int64_t; +#define __attribute__(unused) #else #include <stdint.h> #endif