Skip to content

Commit 2138d8f

Browse files
committed
add Cosmopolitan
1 parent 4418c2a commit 2138d8f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# base16384
2+
> **Note**: This project used the awesome cross-patfrom binary compiling tool [cosmopolitan](https://github.com/jart/cosmopolitan)
3+
24
Encode binary file to printable utf16be, and vise versa.
35

46
# Description 说明

base1432.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
// base1432.c
22
// fumiama 20220319
3-
#ifndef __cosmopolitan // always le
3+
#ifdef __cosmopolitan // always le
4+
# define be16toh(x) bswap_16(x)
5+
# define be32toh(x) bswap_32(x)
6+
# define htobe16(x) bswap_16(x)
7+
# define htobe32(x) bswap_32(x)
8+
#else
49
#include <stdio.h>
510
#include <stdint.h>
611
#include <stdlib.h>

0 commit comments

Comments
 (0)