summaryrefslogtreecommitdiff
path: root/lib/libc/net
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-02-19 19:39:42 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-02-19 19:39:42 +0000
commit3923126b85f9e8a77cab9a41b5a62125acd5b4cd (patch)
tree1a8b19c5db03f8c989fc8228811837b182feb7a3 /lib/libc/net
parentcc03bdb70090357d2393b6ec82e3cde4d5ce5edd (diff)
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.
Diffstat (limited to 'lib/libc/net')
-rw-r--r--lib/libc/net/htons.c7
-rw-r--r--lib/libc/net/ntohs.c7
-rw-r--r--lib/libc/net/res_comp.c12
-rw-r--r--lib/libc/net/res_random.c8
4 files changed, 6 insertions, 28 deletions
diff --git a/lib/libc/net/htons.c b/lib/libc/net/htons.c
index 47cf25952db..ded70712ea0 100644
--- a/lib/libc/net/htons.c
+++ b/lib/libc/net/htons.c
@@ -4,7 +4,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: htons.c,v 1.6 1997/07/25 20:30:07 mickey Exp $";
+static char *rcsid = "$OpenBSD: htons.c,v 1.7 2002/02/19 19:39:36 millert Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -13,12 +13,7 @@ static char *rcsid = "$OpenBSD: htons.c,v 1.6 1997/07/25 20:30:07 mickey Exp $";
#undef htons
u_int16_t
-#ifdef __STDC__
htons(u_int16_t x)
-#else
-htons(x)
- u_int16_t x;
-#endif
{
#if BYTE_ORDER == LITTLE_ENDIAN
u_char *s = (u_char *) &x;
diff --git a/lib/libc/net/ntohs.c b/lib/libc/net/ntohs.c
index cf6414d4a63..4c3ab33f31c 100644
--- a/lib/libc/net/ntohs.c
+++ b/lib/libc/net/ntohs.c
@@ -4,7 +4,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: ntohs.c,v 1.6 1997/07/25 20:30:07 mickey Exp $";
+static char *rcsid = "$OpenBSD: ntohs.c,v 1.7 2002/02/19 19:39:36 millert Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -13,12 +13,7 @@ static char *rcsid = "$OpenBSD: ntohs.c,v 1.6 1997/07/25 20:30:07 mickey Exp $";
#undef ntohs
u_int16_t
-#ifdef __STDC__
ntohs(u_int16_t x)
-#else
-ntohs(x)
- u_int16_t x;
-#endif
{
#if BYTE_ORDER == LITTLE_ENDIAN
u_char *s = (u_char *) &x;
diff --git a/lib/libc/net/res_comp.c b/lib/libc/net/res_comp.c
index 948923cf37d..25e196b2cfb 100644
--- a/lib/libc/net/res_comp.c
+++ b/lib/libc/net/res_comp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: res_comp.c,v 1.9 2002/02/17 19:42:23 millert Exp $ */
+/* $OpenBSD: res_comp.c,v 1.10 2002/02/19 19:39:36 millert Exp $ */
/*
* ++Copyright++ 1985, 1993
@@ -60,7 +60,7 @@
static char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93";
static char rcsid[] = "$From: res_comp.c,v 8.11 1996/12/02 09:17:22 vixie Exp $";
#else
-static char rcsid[] = "$OpenBSD: res_comp.c,v 1.9 2002/02/17 19:42:23 millert Exp $";
+static char rcsid[] = "$OpenBSD: res_comp.c,v 1.10 2002/02/19 19:39:36 millert Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -489,13 +489,7 @@ _getlong(msgp)
}
void
-#if defined(__STDC__) || defined(__cplusplus)
-__putshort(register u_int16_t s, register u_char *msgp) /* must match proto */
-#else
-__putshort(s, msgp)
- register u_int16_t s;
- register u_char *msgp;
-#endif
+__putshort(register u_int16_t s, register u_char *msgp)
{
PUTSHORT(s, msgp);
}
diff --git a/lib/libc/net/res_random.c b/lib/libc/net/res_random.c
index 6a6a142e96b..7a7d0bd6777 100644
--- a/lib/libc/net/res_random.c
+++ b/lib/libc/net/res_random.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: res_random.c,v 1.10 2002/02/16 21:27:23 millert Exp $ */
+/* $OpenBSD: res_random.c,v 1.11 2002/02/19 19:39:36 millert Exp $ */
/*
* Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
@@ -100,14 +100,8 @@ static void res_initid(void);
* of 0 - (mod-1)
*/
-#ifdef __STDC__
static u_int16_t
pmod(u_int16_t gen, u_int16_t exp, u_int16_t mod)
-#else
-static u_int16_t
-pmod(gen, exp, mod)
- u_int16_t gen, exp, mod;
-#endif
{
u_int16_t s, t, u;