| * Copyright (c) Edward Thomson. All rights reserved. |
| * This file is part of ntlmclient, distributed under the MIT license. |
| * For full terms and copyright information, and for third-party |
| * copyright information, see the included LICENSE.txt file. |
| #ifndef PRIVATE_COMPAT_H__ |
| #define PRIVATE_COMPAT_H__ |
| typedef unsigned char bool; |
| /* See man page endian(3) */ |
| #elif defined(__OpenBSD__) |
| /* See man page htobe64(3) */ |
| #elif defined(__FreeBSD__) |
| /* See man page bwaps64(9) */ |
| #elif defined(sun) || defined(__sun) |
| /* See man page byteorder(3SOCKET) */ |
| # if defined(_BIG_ENDIAN) |
| # define htonll(x) ((((uint64_t)htonl(x)) << 32) + htonl((uint64_t)(x) >> 32)) |
| # define MIN(x, y) (((x) < (y)) ? (x) : (y)) |
| #endif /* PRIVATE_COMPAT_H__ */ |