summaryrefslogtreecommitdiff
path: root/src/lib/libc/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/net')
-rw-r--r--src/lib/libc/net/htons.c7
-rw-r--r--src/lib/libc/net/ntohs.c7
-rw-r--r--src/lib/libc/net/res_comp.c12
-rw-r--r--src/lib/libc/net/res_random.c8
4 files changed, 6 insertions, 28 deletions
diff --git a/src/lib/libc/net/htons.c b/src/lib/libc/net/htons.c
index 47cf25952d..ded70712ea 100644
--- a/src/lib/libc/net/htons.c
+++ b/src/lib/libc/net/htons.c
@@ -4,7 +4,7 @@
4 */ 4 */
5 5
6#if defined(LIBC_SCCS) && !defined(lint) 6#if defined(LIBC_SCCS) && !defined(lint)
7static char *rcsid = "$OpenBSD: htons.c,v 1.6 1997/07/25 20:30:07 mickey Exp $"; 7static char *rcsid = "$OpenBSD: htons.c,v 1.7 2002/02/19 19:39:36 millert Exp $";
8#endif /* LIBC_SCCS and not lint */ 8#endif /* LIBC_SCCS and not lint */
9 9
10#include <sys/types.h> 10#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 $";
13#undef htons 13#undef htons
14 14
15u_int16_t 15u_int16_t
16#ifdef __STDC__
17htons(u_int16_t x) 16htons(u_int16_t x)
18#else
19htons(x)
20 u_int16_t x;
21#endif
22{ 17{
23#if BYTE_ORDER == LITTLE_ENDIAN 18#if BYTE_ORDER == LITTLE_ENDIAN
24 u_char *s = (u_char *) &x; 19 u_char *s = (u_char *) &x;
diff --git a/src/lib/libc/net/ntohs.c b/src/lib/libc/net/ntohs.c
index cf6414d4a6..4c3ab33f31 100644
--- a/src/lib/libc/net/ntohs.c
+++ b/src/lib/libc/net/ntohs.c
@@ -4,7 +4,7 @@
4 */ 4 */
5 5
6#if defined(LIBC_SCCS) && !defined(lint) 6#if defined(LIBC_SCCS) && !defined(lint)
7static char *rcsid = "$OpenBSD: ntohs.c,v 1.6 1997/07/25 20:30:07 mickey Exp $"; 7static char *rcsid = "$OpenBSD: ntohs.c,v 1.7 2002/02/19 19:39:36 millert Exp $";
8#endif /* LIBC_SCCS and not lint */ 8#endif /* LIBC_SCCS and not lint */
9 9
10#include <sys/types.h> 10#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 $";
13#undef ntohs 13#undef ntohs
14 14
15u_int16_t 15u_int16_t
16#ifdef __STDC__
17ntohs(u_int16_t x) 16ntohs(u_int16_t x)
18#else
19ntohs(x)
20 u_int16_t x;
21#endif
22{ 17{
23#if BYTE_ORDER == LITTLE_ENDIAN 18#if BYTE_ORDER == LITTLE_ENDIAN
24 u_char *s = (u_char *) &x; 19 u_char *s = (u_char *) &x;
diff --git a/src/lib/libc/net/res_comp.c b/src/lib/libc/net/res_comp.c
index 948923cf37..25e196b2cf 100644
--- a/src/lib/libc/net/res_comp.c
+++ b/src/lib/libc/net/res_comp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: res_comp.c,v 1.9 2002/02/17 19:42:23 millert Exp $ */ 1/* $OpenBSD: res_comp.c,v 1.10 2002/02/19 19:39:36 millert Exp $ */
2 2
3/* 3/*
4 * ++Copyright++ 1985, 1993 4 * ++Copyright++ 1985, 1993
@@ -60,7 +60,7 @@
60static char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93"; 60static char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93";
61static char rcsid[] = "$From: res_comp.c,v 8.11 1996/12/02 09:17:22 vixie Exp $"; 61static char rcsid[] = "$From: res_comp.c,v 8.11 1996/12/02 09:17:22 vixie Exp $";
62#else 62#else
63static char rcsid[] = "$OpenBSD: res_comp.c,v 1.9 2002/02/17 19:42:23 millert Exp $"; 63static char rcsid[] = "$OpenBSD: res_comp.c,v 1.10 2002/02/19 19:39:36 millert Exp $";
64#endif 64#endif
65#endif /* LIBC_SCCS and not lint */ 65#endif /* LIBC_SCCS and not lint */
66 66
@@ -489,13 +489,7 @@ _getlong(msgp)
489} 489}
490 490
491void 491void
492#if defined(__STDC__) || defined(__cplusplus) 492__putshort(register u_int16_t s, register u_char *msgp)
493__putshort(register u_int16_t s, register u_char *msgp) /* must match proto */
494#else
495__putshort(s, msgp)
496 register u_int16_t s;
497 register u_char *msgp;
498#endif
499{ 493{
500 PUTSHORT(s, msgp); 494 PUTSHORT(s, msgp);
501} 495}
diff --git a/src/lib/libc/net/res_random.c b/src/lib/libc/net/res_random.c
index 6a6a142e96..7a7d0bd677 100644
--- a/src/lib/libc/net/res_random.c
+++ b/src/lib/libc/net/res_random.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: res_random.c,v 1.10 2002/02/16 21:27:23 millert Exp $ */ 1/* $OpenBSD: res_random.c,v 1.11 2002/02/19 19:39:36 millert Exp $ */
2 2
3/* 3/*
4 * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> 4 * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
@@ -100,14 +100,8 @@ static void res_initid(void);
100 * of 0 - (mod-1) 100 * of 0 - (mod-1)
101 */ 101 */
102 102
103#ifdef __STDC__
104static u_int16_t 103static u_int16_t
105pmod(u_int16_t gen, u_int16_t exp, u_int16_t mod) 104pmod(u_int16_t gen, u_int16_t exp, u_int16_t mod)
106#else
107static u_int16_t
108pmod(gen, exp, mod)
109 u_int16_t gen, exp, mod;
110#endif
111{ 105{
112 u_int16_t s, t, u; 106 u_int16_t s, t, u;
113 107