summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-05-31 17:34:49 +0000
committerEric Andersen <andersen@codepoet.org>2001-05-31 17:34:49 +0000
commitf43cd38254b0f915fcade2f61218430ebb5e3db3 (patch)
tree3dbd29b68021b8d5277e7aa8b3894b4b1618fcc0
parentacbe47d22b76913e1be97ac0ef4ad0f332819813 (diff)
Cleanup some stupid warnings
-rw-r--r--include/resolv.h11
-rw-r--r--libc/inet/resolv.c23
-rw-r--r--libc/inet/rpc/clnt_simple.c14
-rw-r--r--libc/stdio/getline.c1
4 files changed, 24 insertions, 25 deletions
diff --git a/include/resolv.h b/include/resolv.h
index 76b97945d..e988347ad 100644
--- a/include/resolv.h
+++ b/include/resolv.h
@@ -73,17 +73,6 @@ int encode_packet(struct resolv_header * h,
unsigned char * dest, int maxlen);
int decode_packet(unsigned char * data, struct resolv_header * h);
-int dns_lookup(const char * name, int type, int nscount, const char ** nsip,
- unsigned char ** outpacket, struct resolv_answer * a);
-
-int resolve_address(const char * address,
- int nscount, const char ** nsip,
- struct in_addr * in);
-
-int resolve_mailbox(const char * address,
- int nscount, const char ** nsip,
- struct in_addr * in);
-
extern int open_nameservers(void);
extern void close_nameservers(void);
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c
index d02d29fbc..00b7a7634 100644
--- a/libc/inet/resolv.c
+++ b/libc/inet/resolv.c
@@ -67,12 +67,19 @@
extern int nameservers;
-extern const char * nameserver[MAX_SERVERS];
+extern char * nameserver[MAX_SERVERS];
extern int searchdomains;
-extern const char * searchdomain[MAX_SEARCH];
+extern char * searchdomain[MAX_SEARCH];
extern struct hostent * get_hosts_byname(const char * name);
extern struct hostent * get_hosts_byaddr(const char * addr, int len, int type);
extern struct hostent * read_etc_hosts(const char * name, int ip);
+extern int resolve_address(const char * address, int nscount,
+ char ** nsip, struct in_addr * in);
+extern int resolve_mailbox(const char * address, int nscount,
+ char ** nsip, struct in_addr * in);
+extern int dns_lookup(const char * name, int type, int nscount,
+ char ** nsip, unsigned char ** outpacket, struct resolv_answer * a);
+
#ifdef L_encodeh
@@ -451,7 +458,7 @@ void dns_catch_signal(int signo)
dns_caught_signal = 1;
}
-int dns_lookup(const char *name, int type, int nscount, const char **nsip,
+int dns_lookup(const char *name, int type, int nscount, char **nsip,
unsigned char **outpacket, struct resolv_answer *a)
{
static int id = 1;
@@ -650,7 +657,7 @@ fail:
#ifdef L_resolveaddress
int resolve_address(const char *address, int nscount,
- const char **nsip, struct in_addr *in)
+ char **nsip, struct in_addr *in)
{
unsigned char *packet;
struct resolv_answer a;
@@ -700,8 +707,8 @@ int resolve_address(const char *address, int nscount,
#ifdef L_resolvemailbox
-int resolve_mailbox(const char *address,
- int nscount, const char **nsip, struct in_addr *in)
+int resolve_mailbox(const char *address, int nscount,
+ char **nsip, struct in_addr *in)
{
struct resolv_answer a;
unsigned char *packet;
@@ -760,9 +767,9 @@ int resolve_mailbox(const char *address,
#ifdef L_opennameservers
int nameservers;
-const char * nameserver[MAX_SERVERS];
+char * nameserver[MAX_SERVERS];
int searchdomains;
-const char * searchdomain[MAX_SEARCH];
+char * searchdomain[MAX_SEARCH];
/*
* we currently read formats not quite the same as that on normal
diff --git a/libc/inet/rpc/clnt_simple.c b/libc/inet/rpc/clnt_simple.c
index 4b2a6e4d6..c0369e17c 100644
--- a/libc/inet/rpc/clnt_simple.c
+++ b/libc/inet/rpc/clnt_simple.c
@@ -74,7 +74,9 @@ int callrpc (const char *host, const u_long prognum,
crp->socket = RPC_ANYSOCK;
}
if (crp->valid && crp->oldprognum == prognum
- && crp->oldversnum == versnum && strcmp(crp->oldhost, host) == 0) {
+ && crp->oldversnum == versnum &&
+ strcmp(crp->oldhost, host) == 0)
+ {
/* reuse old client */
} else {
crp->valid = 0;
@@ -91,9 +93,9 @@ int callrpc (const char *host, const u_long prognum,
bcopy(hp->h_addr, (char *) &server_addr.sin_addr, hp->h_length);
server_addr.sin_family = AF_INET;
server_addr.sin_port = 0;
- if ((crp->client = clntudp_create(&server_addr, (u_long) prognum,
- (u_long) versnum, timeout,
- &crp->socket)) == NULL)
+ if ((crp->client = clntudp_create(&server_addr,
+ (u_long) prognum, (u_long) versnum,
+ timeout, &crp->socket)) == NULL)
return ((int) rpc_createerr.cf_stat);
crp->valid = 1;
crp->oldprognum = prognum;
@@ -102,8 +104,8 @@ int callrpc (const char *host, const u_long prognum,
}
tottimeout.tv_sec = 25;
tottimeout.tv_usec = 0;
- clnt_stat = clnt_call(crp->client, procnum, inproc, in,
- outproc, out, tottimeout);
+ clnt_stat = clnt_call(crp->client, procnum, inproc, (char*)in,
+ outproc, out, tottimeout);
/*
* if call failed, empty cache
*/
diff --git a/libc/stdio/getline.c b/libc/stdio/getline.c
index ecc48ffac..41f3a442c 100644
--- a/libc/stdio/getline.c
+++ b/libc/stdio/getline.c
@@ -22,6 +22,7 @@
*/
#include <stddef.h>
+#define __USE_GNU
#include <stdio.h>
/* Basically getdelim() with the delimiter hard wired to '\n' */