diff options
author | tholo <> | 1996-03-25 22:06:55 +0000 |
---|---|---|
committer | tholo <> | 1996-03-25 22:06:55 +0000 |
commit | 26bf2499c42c994d91e3a86ae74b1a2d8b829c9f (patch) | |
tree | 25e84b7bf48bc541c13556ad6f6f66b0faa30a2b /src/lib/libc/net/htons.c | |
parent | c25c16795b2748b87f78736ade4213077a6cd03a (diff) | |
download | openbsd-26bf2499c42c994d91e3a86ae74b1a2d8b829c9f.tar.gz openbsd-26bf2499c42c994d91e3a86ae74b1a2d8b829c9f.tar.bz2 openbsd-26bf2499c42c994d91e3a86ae74b1a2d8b829c9f.zip |
Pull in prototypes
Do the right thing in presense of __STDC__
Diffstat (limited to 'src/lib/libc/net/htons.c')
-rw-r--r-- | src/lib/libc/net/htons.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/libc/net/htons.c b/src/lib/libc/net/htons.c index b2500a51d1..9b1de6ccfc 100644 --- a/src/lib/libc/net/htons.c +++ b/src/lib/libc/net/htons.c | |||
@@ -15,8 +15,12 @@ static char *rcsid = "$NetBSD: htons.c,v 1.5 1995/04/28 23:25:19 jtc Exp $"; | |||
15 | #undef htons | 15 | #undef htons |
16 | 16 | ||
17 | unsigned short | 17 | unsigned short |
18 | #if __STDC__ | ||
19 | htons(unsigned short x) | ||
20 | #else | ||
18 | htons(x) | 21 | htons(x) |
19 | unsigned short x; | 22 | unsigned short x; |
23 | #endif | ||
20 | { | 24 | { |
21 | #if BYTE_ORDER == LITTLE_ENDIAN | 25 | #if BYTE_ORDER == LITTLE_ENDIAN |
22 | u_char *s = (u_char *) &x; | 26 | u_char *s = (u_char *) &x; |