diff options
| author | cvs2svn <admin@example.com> | 2021-08-18 16:06:57 +0000 |
|---|---|---|
| committer | cvs2svn <admin@example.com> | 2021-08-18 16:06:57 +0000 |
| commit | d56c8fa8260d226f98b26f017b45b9c2b135f38d (patch) | |
| tree | 348178b41617813cc93787187984a734ef8379ca /src/lib/libc/net/htonl.c | |
| parent | 18b9c1bcab7c37d8c5bd05b8e0d14d0c59d96650 (diff) | |
| download | openbsd-tb_20210818.tar.gz openbsd-tb_20210818.tar.bz2 openbsd-tb_20210818.zip | |
This commit was manufactured by cvs2git to create tag 'tb_20210818'.tb_20210818
Diffstat (limited to 'src/lib/libc/net/htonl.c')
| -rw-r--r-- | src/lib/libc/net/htonl.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/lib/libc/net/htonl.c b/src/lib/libc/net/htonl.c deleted file mode 100644 index 6ee6e7efbf..0000000000 --- a/src/lib/libc/net/htonl.c +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | /* $OpenBSD: htonl.c,v 1.7 2014/07/21 01:51:10 guenther Exp $ */ | ||
| 2 | /* | ||
| 3 | * Written by J.T. Conklin <jtc@netbsd.org>. | ||
| 4 | * Public domain. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <sys/types.h> | ||
| 8 | #include <endian.h> | ||
| 9 | |||
| 10 | #undef htonl | ||
| 11 | |||
| 12 | u_int32_t | ||
| 13 | htonl(u_int32_t x) | ||
| 14 | { | ||
| 15 | #if BYTE_ORDER == LITTLE_ENDIAN | ||
| 16 | u_char *s = (u_char *)&x; | ||
| 17 | return (u_int32_t)(s[0] << 24 | s[1] << 16 | s[2] << 8 | s[3]); | ||
| 18 | #else | ||
| 19 | return x; | ||
| 20 | #endif | ||
| 21 | } | ||
