diff options
| author | cvs2svn <admin@example.com> | 2022-05-04 18:02:08 +0000 |
|---|---|---|
| committer | cvs2svn <admin@example.com> | 2022-05-04 18:02:08 +0000 |
| commit | 3c94dc45dfb15483d76c47a128ec352cc0b655ac (patch) | |
| tree | a7cfb4512c784e9518f1b1c2f4009295b8766ef4 /src/lib/libc/net/ntohl.c | |
| parent | f32cca700e59c0fd1ddd8f1fd4b35a5401be28fe (diff) | |
| download | openbsd-tb_20220504.tar.gz openbsd-tb_20220504.tar.bz2 openbsd-tb_20220504.zip | |
This commit was manufactured by cvs2git to create tag 'tb_20220504'.tb_20220504
Diffstat (limited to 'src/lib/libc/net/ntohl.c')
| -rw-r--r-- | src/lib/libc/net/ntohl.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/lib/libc/net/ntohl.c b/src/lib/libc/net/ntohl.c deleted file mode 100644 index 0d05bac78a..0000000000 --- a/src/lib/libc/net/ntohl.c +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | /* $OpenBSD: ntohl.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 ntohl | ||
| 11 | |||
| 12 | u_int32_t | ||
| 13 | ntohl(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 | } | ||
