1
0
mirror of https://github.com/fumiama/base16384.git synced 2026-06-10 13:40:26 +08:00

add Cosmopolitan

This commit is contained in:
源文雨
2022-03-29 20:47:26 +08:00
parent 42f8368a40
commit 95e9642cd3
4 changed files with 27 additions and 5 deletions

View File

@@ -1,5 +1,14 @@
// base1432.c
// fumiama 20220319
#ifdef __cosmopolitan // always le
# define be16toh(x) __builtin_bswap16(x)
# define be32toh(x) __builtin_bswap32(x)
# define htobe16(x) __builtin_bswap16(x)
# define htobe32(x) __builtin_bswap32(x)
typedef unsigned int uint32_t;
typedef int int32_t;
typedef unsigned char uint8_t;
#else
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
@@ -36,6 +45,7 @@
# define htobe32(x) _byteswap_ulong(x)
#endif
#endif
#endif
#include "base14.h"
// #define DEBUG