diff options
| author | cvs2svn <admin@example.com> | 2012-07-13 17:49:56 +0000 |
|---|---|---|
| committer | cvs2svn <admin@example.com> | 2012-07-13 17:49:56 +0000 |
| commit | ee04221ea8063435416c7e6369e6eae76843aa71 (patch) | |
| tree | 821921a1dd0a5a3cece91121e121cc63c4b68128 /src/lib/libc/net/htonl.c | |
| parent | adf6731f6e1d04718aee00cb93435143046aee9a (diff) | |
| download | openbsd-eric_g2k12.tar.gz openbsd-eric_g2k12.tar.bz2 openbsd-eric_g2k12.zip | |
This commit was manufactured by cvs2git to create tag 'eric_g2k12'.eric_g2k12
Diffstat (limited to '')
| -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 5ab4189597..0000000000 --- a/src/lib/libc/net/htonl.c +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | /* $OpenBSD: htonl.c,v 1.6 2005/08/06 20:30:03 espie Exp $ */ | ||
| 2 | /* | ||
| 3 | * Written by J.T. Conklin <jtc@netbsd.org>. | ||
| 4 | * Public domain. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #include <sys/types.h> | ||
| 8 | #include <machine/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 | } | ||
