diff options
Diffstat (limited to 'src/lib/libc/net')
-rw-r--r-- | src/lib/libc/net/htons.c | 7 | ||||
-rw-r--r-- | src/lib/libc/net/ntohs.c | 7 | ||||
-rw-r--r-- | src/lib/libc/net/res_comp.c | 12 | ||||
-rw-r--r-- | src/lib/libc/net/res_random.c | 8 |
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) |
7 | static char *rcsid = "$OpenBSD: htons.c,v 1.6 1997/07/25 20:30:07 mickey Exp $"; | 7 | static 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 | ||
15 | u_int16_t | 15 | u_int16_t |
16 | #ifdef __STDC__ | ||
17 | htons(u_int16_t x) | 16 | htons(u_int16_t x) |
18 | #else | ||
19 | htons(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) |
7 | static char *rcsid = "$OpenBSD: ntohs.c,v 1.6 1997/07/25 20:30:07 mickey Exp $"; | 7 | static 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 | ||
15 | u_int16_t | 15 | u_int16_t |
16 | #ifdef __STDC__ | ||
17 | ntohs(u_int16_t x) | 16 | ntohs(u_int16_t x) |
18 | #else | ||
19 | ntohs(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 @@ | |||
60 | static char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93"; | 60 | static char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93"; |
61 | static char rcsid[] = "$From: res_comp.c,v 8.11 1996/12/02 09:17:22 vixie Exp $"; | 61 | static char rcsid[] = "$From: res_comp.c,v 8.11 1996/12/02 09:17:22 vixie Exp $"; |
62 | #else | 62 | #else |
63 | static char rcsid[] = "$OpenBSD: res_comp.c,v 1.9 2002/02/17 19:42:23 millert Exp $"; | 63 | static 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 | ||
491 | void | 491 | void |
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__ | ||
104 | static u_int16_t | 103 | static u_int16_t |
105 | pmod(u_int16_t gen, u_int16_t exp, u_int16_t mod) | 104 | pmod(u_int16_t gen, u_int16_t exp, u_int16_t mod) |
106 | #else | ||
107 | static u_int16_t | ||
108 | pmod(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 | ||