diff options
author | Roland McGrath <roland@gnu.org> | 1996-03-19 21:10:11 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-03-19 21:10:11 +0000 |
commit | c224a18a9045610c4ec1e4d959f6a5dd6b117dd9 (patch) | |
tree | 3ec6bbc9ad25817511f08d4a10035d351d88f6bf /inet | |
parent | b20e47cb14ec8edccab7c722743a731e67280702 (diff) | |
download | glibc-c224a18a9045610c4ec1e4d959f6a5dd6b117dd9.zip glibc-c224a18a9045610c4ec1e4d959f6a5dd6b117dd9.tar.gz glibc-c224a18a9045610c4ec1e4d959f6a5dd6b117dd9.tar.bz2 |
* config.make.in (weak-symbols): Variable removed.
* configure.in (--with-weak-symbols): Option removed.
(NO_UNDERSCORES, HAVE_ASM_WEAK_DIRECTIVE, HAVE_ASM_WEAKEXT_DIRECTIVE):
New tests.
* config.h.in (HAVE_WEAK_SYMBOLS): #undef removed.
(NO_UNDERSCORES, HAVE_ASM_WEAK_DIRECTIVE, HAVE_ASM_WEAKEXT_DIRECTIVE):
New #undefs.
* libc-symbols.h: Use them instead of HAVE_WEAK_SYMBOLS.
* inet/inet_lnaof.c: Use u_int32_t instead of u_long.
* inet/inet_mkadr.c: Likewise.
* inet/inet_net.c: Likewise.
* inet/inet_netof.c: Likewise.
* inet/rcmd.c: Likewise.
* inet/arpa/inet.h: Likewise.
* inet/netinet/in.h: Likewise.
* inet/netinet/tcp.h: Likewise.
* inet/protocols/rwhod.h: Likewise.
* inet/protocols/talkd.h: Likewise.
* resolv/inet_addr.c: Likewise.
* sunrpc/rpc/xdr.h (IXDR_GET_LONG, IXDR_PUT_LONG): change casts to
u_int32_t (instead of u_long).
Diffstat (limited to 'inet')
-rw-r--r-- | inet/arpa/inet.h | 11 | ||||
-rw-r--r-- | inet/inet_lnaof.c | 4 | ||||
-rw-r--r-- | inet/inet_mkadr.c | 4 | ||||
-rw-r--r-- | inet/inet_net.c | 6 | ||||
-rw-r--r-- | inet/inet_netof.c | 4 | ||||
-rw-r--r-- | inet/netinet/in.h | 18 | ||||
-rw-r--r-- | inet/netinet/tcp.h | 2 | ||||
-rw-r--r-- | inet/protocols/rwhod.h | 4 | ||||
-rw-r--r-- | inet/protocols/talkd.h | 8 | ||||
-rw-r--r-- | inet/rcmd.c | 20 |
10 files changed, 43 insertions, 38 deletions
diff --git a/inet/arpa/inet.h b/inet/arpa/inet.h index a231484..2413dcf 100644 --- a/inet/arpa/inet.h +++ b/inet/arpa/inet.h @@ -39,14 +39,15 @@ /* External definitions for functions in inet(3) */ #include <sys/cdefs.h> +#include <sys/types.h> __BEGIN_DECLS -unsigned long inet_addr __P((const char *)); +u_int32_t inet_addr __P((const char *)); int inet_aton __P((const char *, struct in_addr *)); -unsigned long inet_lnaof __P((struct in_addr)); -struct in_addr inet_makeaddr __P((u_long , u_long)); -unsigned long inet_netof __P((struct in_addr)); -unsigned long inet_network __P((const char *)); +u_int32_t inet_lnaof __P((struct in_addr)); +struct in_addr inet_makeaddr __P((u_int32_t , u_int32_t)); +u_int32_t inet_netof __P((struct in_addr)); +u_int32_t inet_network __P((const char *)); char *inet_ntoa __P((struct in_addr)); __END_DECLS diff --git a/inet/inet_lnaof.c b/inet/inet_lnaof.c index 406be30..cd5ef29 100644 --- a/inet/inet_lnaof.c +++ b/inet/inet_lnaof.c @@ -44,11 +44,11 @@ static char sccsid[] = "@(#)inet_lnaof.c 8.1 (Berkeley) 6/4/93"; * internet address; handles class a/b/c network * number formats. */ -u_long +u_int32_t inet_lnaof(in) struct in_addr in; { - register u_long i = ntohl(in.s_addr); + register u_int32_t i = ntohl(in.s_addr); if (IN_CLASSA(i)) return ((i)&IN_CLASSA_HOST); diff --git a/inet/inet_mkadr.c b/inet/inet_mkadr.c index 7976188..7f26074 100644 --- a/inet/inet_mkadr.c +++ b/inet/inet_mkadr.c @@ -45,9 +45,9 @@ static char sccsid[] = "@(#)inet_makeaddr.c 8.1 (Berkeley) 6/4/93"; */ struct in_addr inet_makeaddr(net, host) - u_long net, host; + u_int32_t net, host; { - u_long addr; + u_int32_t addr; if (net < 128) addr = (net << IN_CLASSA_NSHIFT) | (host & IN_CLASSA_HOST); diff --git a/inet/inet_net.c b/inet/inet_net.c index fda53b6..cfaadd7 100644 --- a/inet/inet_net.c +++ b/inet/inet_net.c @@ -45,13 +45,13 @@ static char sccsid[] = "@(#)inet_network.c 8.1 (Berkeley) 6/4/93"; * The library routines call this routine to interpret * network numbers. */ -u_long +u_int32_t inet_network(cp) register const char *cp; { - register u_long val, base, n; + register u_int32_t val, base, n; register char c; - u_long parts[4], *pp = parts; + u_int32_t parts[4], *pp = parts; register int i; again: diff --git a/inet/inet_netof.c b/inet/inet_netof.c index d6de694..40cbc0e 100644 --- a/inet/inet_netof.c +++ b/inet/inet_netof.c @@ -43,11 +43,11 @@ static char sccsid[] = "@(#)inet_netof.c 8.1 (Berkeley) 6/4/93"; * Return the network number from an internet * address; handles class a/b/c network #'s. */ -u_long +u_int32_t inet_netof(in) struct in_addr in; { - register u_long i = ntohl(in.s_addr); + register u_int32_t i = ntohl(in.s_addr); if (IN_CLASSA(i)) return (((i)&IN_CLASSA_NET) >> IN_CLASSA_NSHIFT); diff --git a/inet/netinet/in.h b/inet/netinet/in.h index 609edf8..a135cf2 100644 --- a/inet/netinet/in.h +++ b/inet/netinet/in.h @@ -89,7 +89,7 @@ enum /* Internet address. */ struct in_addr { - unsigned long int s_addr; + unsigned int s_addr; }; @@ -98,33 +98,33 @@ struct in_addr On subnets, host and network parts are found according to the subnet mask, not these masks. */ -#define IN_CLASSA(a) ((((long int) (a)) & 0x80000000) == 0) +#define IN_CLASSA(a) ((((unsigned) (a)) & 0x80000000) == 0) #define IN_CLASSA_NET 0xff000000 #define IN_CLASSA_NSHIFT 24 #define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET) #define IN_CLASSA_MAX 128 -#define IN_CLASSB(a) ((((long int) (a)) & 0xc0000000) == 0x80000000) +#define IN_CLASSB(a) ((((unsigned) (a)) & 0xc0000000) == 0x80000000) #define IN_CLASSB_NET 0xffff0000 #define IN_CLASSB_NSHIFT 16 #define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET) #define IN_CLASSB_MAX 65536 -#define IN_CLASSC(a) ((((long int) (a)) & 0xc0000000) == 0xc0000000) +#define IN_CLASSC(a) ((((unsigned) (a)) & 0xc0000000) == 0xc0000000) #define IN_CLASSC_NET 0xffffff00 #define IN_CLASSC_NSHIFT 8 #define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET) -#define IN_CLASSD(a) ((((long int) (a)) & 0xf0000000) == 0xe0000000) +#define IN_CLASSD(a) ((((unsigned) (a)) & 0xf0000000) == 0xe0000000) #define IN_MULTICAST(a) IN_CLASSD(a) -#define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xe0000000) == 0xe0000000) -#define IN_BADCLASS(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000) +#define IN_EXPERIMENTAL(a) ((((unsigned) (a)) & 0xe0000000) == 0xe0000000) +#define IN_BADCLASS(a) ((((unsigned) (a)) & 0xf0000000) == 0xf0000000) /* Address to accept any incoming messages. */ -#define INADDR_ANY ((unsigned long int) 0x00000000) +#define INADDR_ANY ((unsigned) 0x00000000) /* Address to send to all hosts. */ -#define INADDR_BROADCAST ((unsigned long int) 0xffffffff) +#define INADDR_BROADCAST ((unsigned) 0xffffffff) /* Address indicating an error return. */ #define INADDR_NONE 0xffffffff diff --git a/inet/netinet/tcp.h b/inet/netinet/tcp.h index 6b77ff6..bc821e1 100644 --- a/inet/netinet/tcp.h +++ b/inet/netinet/tcp.h @@ -33,7 +33,7 @@ * @(#)tcp.h 8.1 (Berkeley) 6/10/93 */ -typedef u_long tcp_seq; +typedef unsigned int tcp_seq; /* * TCP header. * Per RFC 793, September, 1981. diff --git a/inet/protocols/rwhod.h b/inet/protocols/rwhod.h index 93008a4..4ce4490 100644 --- a/inet/protocols/rwhod.h +++ b/inet/protocols/rwhod.h @@ -36,13 +36,15 @@ #ifndef _RWHOD_H_ #define _RWHOD_H_ +#include <sys/types.h> + /* * rwho protocol packet format. */ struct outmp { char out_line[8]; /* tty name */ char out_name[8]; /* user id */ - long out_time; /* time on */ + int32_t out_time; /* time on */ }; struct whod { diff --git a/inet/protocols/talkd.h b/inet/protocols/talkd.h index 0d30d5b..c523bf5 100644 --- a/inet/protocols/talkd.h +++ b/inet/protocols/talkd.h @@ -54,6 +54,8 @@ * stream connection through which the conversation takes place. */ +#include <sys/types.h> + /* * Client->server request message format. */ @@ -62,10 +64,10 @@ typedef struct { u_char type; /* request type, see below */ u_char answer; /* not used */ u_char pad; - u_long id_num; /* message id */ + u_int32_t id_num; /* message id */ struct osockaddr addr; /* old (4.3) style */ struct osockaddr ctl_addr; /* old (4.3) style */ - long pid; /* caller's process id */ + int32_t pid; /* caller's process id */ #define NAME_SIZE 12 char l_name[NAME_SIZE];/* caller's name */ char r_name[NAME_SIZE];/* callee's name */ @@ -81,7 +83,7 @@ typedef struct { u_char type; /* type of request message, see below */ u_char answer; /* respose to request message, see below */ u_char pad; - u_long id_num; /* message id */ + u_int32_t id_num; /* message id */ struct osockaddr addr; /* address for establishing conversation */ } CTL_RESPONSE; diff --git a/inet/rcmd.c b/inet/rcmd.c index ae6e0b6..7a29db2 100644 --- a/inet/rcmd.c +++ b/inet/rcmd.c @@ -52,8 +52,8 @@ static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94"; #include <ctype.h> #include <string.h> -int __ivaliduser __P((FILE *, u_long, const char *, const char *)); -static int __icheckhost __P((u_long, char *)); +int __ivaliduser __P((FILE *, u_int32_t, const char *, const char *)); +static int __icheckhost __P((u_int32_t, char *)); int rcmd(ahost, rport, locuser, remuser, cmd, fd2p) @@ -65,7 +65,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p) struct hostent *hp; struct sockaddr_in sin, from; fd_set reads; - long oldmask; + int32_t oldmask; pid_t pid; int s, lport, timo; char c; @@ -242,7 +242,7 @@ ruserok(rhost, superuser, ruser, luser) int superuser; { struct hostent *hp; - u_long addr; + u_int32_t addr; char **ap; if ((hp = gethostbyname(rhost)) == NULL) @@ -266,7 +266,7 @@ ruserok(rhost, superuser, ruser, luser) */ int iruserok(raddr, superuser, ruser, luser) - u_long raddr; + u_int32_t raddr; int superuser; const char *ruser, *luser; { @@ -347,7 +347,7 @@ again: int __ivaliduser(hostf, raddr, luser, ruser) FILE *hostf; - u_long raddr; + u_int32_t raddr; const char *luser, *ruser; { register char *user, *p; @@ -389,15 +389,15 @@ __ivaliduser(hostf, raddr, luser, ruser) */ static int __icheckhost(raddr, lhost) - u_long raddr; + u_int32_t raddr; register char *lhost; { register struct hostent *hp; - register u_long laddr; + register u_int32_t laddr; register char **pp; /* Try for raw ip address first. */ - if (isdigit(*lhost) && (long)(laddr = inet_addr(lhost)) != -1) + if (isdigit(*lhost) && (int32_t)(laddr = inet_addr(lhost)) != -1) return (raddr == laddr); /* Better be a hostname. */ @@ -406,7 +406,7 @@ __icheckhost(raddr, lhost) /* Spin through ip addresses. */ for (pp = hp->h_addr_list; *pp; ++pp) - if (!bcmp(&raddr, *pp, sizeof(u_long))) + if (!bcmp(&raddr, *pp, sizeof(u_int32_t))) return (1); /* No match. */ |