diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-01-22 21:48:03 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-01-22 21:48:03 +0000 |
commit | 0fcbeb515df8d1e45ccfbdace5b45653846c747f (patch) | |
tree | 18a83d6a9152115190c74cabf28d3c8d85cbe104 /include | |
parent | b077ac3d3a8974b4166c58200100eda9c12aa3bb (diff) |
Remove unnecessary typedef usage.
u_char -> unsigned char
u_short -> unsigned short
u_long -> unsigned long
u_int -> unsigned int
okay millert@
Diffstat (limited to 'include')
-rw-r--r-- | include/arpa/inet.h | 6 | ||||
-rw-r--r-- | include/arpa/nameser.h | 18 | ||||
-rw-r--r-- | include/bm.h | 22 | ||||
-rw-r--r-- | include/db.h | 68 | ||||
-rw-r--r-- | include/fts.h | 8 | ||||
-rw-r--r-- | include/ifaddrs.h | 4 | ||||
-rw-r--r-- | include/kvm.h | 6 | ||||
-rw-r--r-- | include/link.h | 16 | ||||
-rw-r--r-- | include/link_aout.h | 4 | ||||
-rw-r--r-- | include/login_cap.h | 8 | ||||
-rw-r--r-- | include/mpool.h | 28 | ||||
-rw-r--r-- | include/protocols/talkd.h | 38 | ||||
-rw-r--r-- | include/resolv.h | 126 | ||||
-rw-r--r-- | include/rmd160.h | 16 | ||||
-rw-r--r-- | include/rpc/auth.h | 11 | ||||
-rw-r--r-- | include/rpc/auth_unix.h | 14 | ||||
-rw-r--r-- | include/rpc/clnt.h | 72 | ||||
-rw-r--r-- | include/rpc/pmap_clnt.h | 22 | ||||
-rw-r--r-- | include/rpc/pmap_prot.h | 24 | ||||
-rw-r--r-- | include/rpc/pmap_rmt.h | 8 | ||||
-rw-r--r-- | include/rpc/rpc_msg.h | 6 | ||||
-rw-r--r-- | include/rpc/svc.h | 24 | ||||
-rw-r--r-- | include/rpc/xdr.h | 65 | ||||
-rw-r--r-- | include/rpcsvc/yp_prot.h | 98 | ||||
-rw-r--r-- | include/rpcsvc/ypclnt.h | 4 | ||||
-rw-r--r-- | include/sha1.h | 14 |
26 files changed, 375 insertions, 355 deletions
diff --git a/include/arpa/inet.h b/include/arpa/inet.h index 63c42ac4111..4f177917c24 100644 --- a/include/arpa/inet.h +++ b/include/arpa/inet.h @@ -1,4 +1,4 @@ -/* $OpenBSD: inet.h,v 1.9 2003/08/01 17:38:33 avsm Exp $ */ +/* $OpenBSD: inet.h,v 1.10 2004/01/22 21:48:02 espie Exp $ */ /* * ++Copyright++ 1983, 1993 @@ -86,8 +86,8 @@ char *inet_ntoa(struct in_addr); int inet_pton(int, const char *, void *); const char *inet_ntop(int, const void *, char *, size_t) __attribute__ ((__bounded__(__string__,3,4))); -u_int inet_nsap_addr(const char *, u_char *, int); -char *inet_nsap_ntoa(int, const u_char *, char *); +unsigned int inet_nsap_addr(const char *, unsigned char *, int); +char *inet_nsap_ntoa(int, const unsigned char *, char *); __END_DECLS #endif /* !_INET_H_ */ diff --git a/include/arpa/nameser.h b/include/arpa/nameser.h index ee5c82d78d0..70e4eae2799 100644 --- a/include/arpa/nameser.h +++ b/include/arpa/nameser.h @@ -1,4 +1,4 @@ -/* $OpenBSD: nameser.h,v 1.9 2004/01/17 21:01:31 jakob Exp $ */ +/* $OpenBSD: nameser.h,v 1.10 2004/01/22 21:48:02 espie Exp $ */ /* * ++Copyright++ 1983, 1989, 1993 @@ -361,8 +361,8 @@ typedef struct { */ #define INDIR_MASK 0xc0 -extern u_int16_t _getshort(const u_char *); -extern u_int32_t _getlong(const u_char *); +extern u_int16_t _getshort(const unsigned char *); +extern u_int32_t _getlong(const unsigned char *); /* * Inline versions of get/put short/long. Pointer is advanced. @@ -371,7 +371,7 @@ extern u_int32_t _getlong(const u_char *); * portable or it can be elegant but rarely both. */ #define GETSHORT(s, cp) { \ - register u_char *t_cp = (u_char *)(cp); \ + unsigned char *t_cp = (unsigned char *)(cp); \ (s) = ((u_int16_t)t_cp[0] << 8) \ | ((u_int16_t)t_cp[1]) \ ; \ @@ -379,7 +379,7 @@ extern u_int32_t _getlong(const u_char *); } #define GETLONG(l, cp) { \ - register u_char *t_cp = (u_char *)(cp); \ + unsigned char *t_cp = (unsigned char *)(cp); \ (l) = ((u_int32_t)t_cp[0] << 24) \ | ((u_int32_t)t_cp[1] << 16) \ | ((u_int32_t)t_cp[2] << 8) \ @@ -389,16 +389,16 @@ extern u_int32_t _getlong(const u_char *); } #define PUTSHORT(s, cp) { \ - register u_int16_t t_s = (u_int16_t)(s); \ - register u_char *t_cp = (u_char *)(cp); \ + u_int16_t t_s = (u_int16_t)(s); \ + unsigned char *t_cp = (unsigned char *)(cp); \ *t_cp++ = t_s >> 8; \ *t_cp = t_s; \ (cp) += INT16SZ; \ } #define PUTLONG(l, cp) { \ - register u_int32_t t_l = (u_int32_t)(l); \ - register u_char *t_cp = (u_char *)(cp); \ + u_int32_t t_l = (u_int32_t)(l); \ + unsigned char *t_cp = (unsigned char *)(cp); \ *t_cp++ = t_l >> 24; \ *t_cp++ = t_l >> 16; \ *t_cp++ = t_l >> 8; \ diff --git a/include/bm.h b/include/bm.h index f16731ff14c..a9d6f2127bd 100644 --- a/include/bm.h +++ b/include/bm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bm.h,v 1.7 2003/08/01 17:38:33 avsm Exp $ */ +/* $OpenBSD: bm.h,v 1.8 2004/01/22 21:48:02 espie Exp $ */ /* $NetBSD: bm.h,v 1.3 1994/10/26 00:55:46 cgd Exp $ */ /*- @@ -39,21 +39,21 @@ #define _BM_H_ typedef struct { - u_char *pat; /* pattern */ - size_t patlen; /* pattern length */ - size_t *delta; /* skip delta */ - int rarec; /* rare character */ - size_t rareoff; /* rare offset */ - size_t md2; /* mini delta */ + unsigned char *pat; /* pattern */ + size_t patlen; /* pattern length */ + size_t *delta; /* skip delta */ + int rarec; /* rare character */ + size_t rareoff; /* rare offset */ + size_t md2; /* mini delta */ } bm_pat; #include <sys/cdefs.h> __BEGIN_DECLS -bm_pat *bm_comp(u_char const *, size_t, u_char const *); -u_char *bm_exec(bm_pat *, u_char *, size_t) - __attribute__ ((__bounded__(__string__,2,3))); -void bm_free(bm_pat *); +bm_pat *bm_comp(unsigned char const *, size_t, unsigned char const *); +unsigned char *bm_exec(bm_pat *, unsigned char *, size_t) + __attribute__ ((__bounded__(__string__,2,3))); +void bm_free(bm_pat *); __END_DECLS #endif /* !_BM_H_ */ diff --git a/include/db.h b/include/db.h index ebefb540e1b..404dcf8cd5c 100644 --- a/include/db.h +++ b/include/db.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db.h,v 1.7 2003/06/02 19:34:12 millert Exp $ */ +/* $OpenBSD: db.h,v 1.8 2004/01/22 21:48:02 espie Exp $ */ /* $NetBSD: db.h,v 1.13 1994/10/26 00:55:48 cgd Exp $ */ /*- @@ -99,11 +99,11 @@ typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE; typedef struct __db { DBTYPE type; /* Underlying db type. */ int (*close)(struct __db *); - int (*del)(const struct __db *, const DBT *, u_int); - int (*get)(const struct __db *, const DBT *, DBT *, u_int); - int (*put)(const struct __db *, DBT *, const DBT *, u_int); - int (*seq)(const struct __db *, DBT *, DBT *, u_int); - int (*sync)(const struct __db *, u_int); + int (*del)(const struct __db *, const DBT *, unsigned int); + int (*get)(const struct __db *, const DBT *, DBT *, unsigned int); + int (*put)(const struct __db *, DBT *, const DBT *, unsigned int); + int (*seq)(const struct __db *, DBT *, DBT *, unsigned int); + int (*sync)(const struct __db *, unsigned int); void *internal; /* Access method private. */ int (*fd)(const struct __db *); } DB; @@ -114,16 +114,16 @@ typedef struct __db { /* Structure used to pass parameters to the btree routines. */ typedef struct { #define R_DUP 0x01 /* duplicate keys */ - u_long flags; - u_int cachesize; /* bytes to cache */ - int maxkeypage; /* maximum keys per page */ - int minkeypage; /* minimum keys per page */ - u_int psize; /* page size */ - int (*compare) /* comparison function */ -(const DBT *, const DBT *); - size_t (*prefix) /* prefix function */ -(const DBT *, const DBT *); - int lorder; /* byte order */ + unsigned long flags; + unsigned int cachesize; /* bytes to cache */ + int maxkeypage; /* maximum keys per page */ + int minkeypage; /* minimum keys per page */ + unsigned int psize; /* page size */ + int (*compare) /* comparison function */ + (const DBT *, const DBT *); + size_t (*prefix) /* prefix function */ + (const DBT *, const DBT *); + int lorder; /* byte order */ } BTREEINFO; #define HASHMAGIC 0x061561 @@ -131,27 +131,29 @@ typedef struct { /* Structure used to pass parameters to the hashing routines. */ typedef struct { - u_int bsize; /* bucket size */ - u_int ffactor; /* fill factor */ - u_int nelem; /* number of elements */ - u_int cachesize; /* bytes to cache */ - u_int32_t /* hash function */ - (*hash)(const void *, size_t); - int lorder; /* byte order */ + unsigned int bsize; /* bucket size */ + unsigned int ffactor; /* fill factor */ + unsigned int nelem; /* number of elements */ + unsigned int cachesize; /* bytes to cache */ + u_int32_t /* hash function */ + (*hash)(const void *, size_t); + int lorder; /* byte order */ } HASHINFO; /* Structure used to pass parameters to the record routines. */ typedef struct { -#define R_FIXEDLEN 0x01 /* fixed-length records */ -#define R_NOKEY 0x02 /* key not required */ -#define R_SNAPSHOT 0x04 /* snapshot the input */ - u_long flags; - u_int cachesize; /* bytes to cache */ - u_int psize; /* page size */ - int lorder; /* byte order */ - size_t reclen; /* record length (fixed-length records) */ - u_char bval; /* delimiting byte (variable-length records) */ - char *bfname; /* btree file name */ +#define R_FIXEDLEN 0x01 /* fixed-length records */ +#define R_NOKEY 0x02 /* key not required */ +#define R_SNAPSHOT 0x04 /* snapshot the input */ + unsigned long flags; + unsigned int cachesize; /* bytes to cache */ + unsigned int psize; /* page size */ + int lorder; /* byte order */ + size_t reclen; /* record length + (fixed-length records) */ + unsigned char bval; /* delimiting byte + (variable-length records) */ + char *bfname; /* btree file name */ } RECNOINFO; #ifdef __DBINTERFACE_PRIVATE diff --git a/include/fts.h b/include/fts.h index 7d82ec7374a..f325bfb4adb 100644 --- a/include/fts.h +++ b/include/fts.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fts.h,v 1.9 2003/06/02 19:34:12 millert Exp $ */ +/* $OpenBSD: fts.h,v 1.10 2004/01/22 21:48:02 espie Exp $ */ /* $NetBSD: fts.h,v 1.5 1994/12/28 01:41:50 mycroft Exp $ */ /* @@ -96,18 +96,18 @@ typedef struct _ftsent { #define FTS_SL 12 /* symbolic link */ #define FTS_SLNONE 13 /* symbolic link without target */ #define FTS_W 14 /* whiteout object */ - u_short fts_info; /* user flags for FTSENT structure */ + unsigned short fts_info; /* user flags for FTSENT structure */ #define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */ #define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */ #define FTS_ISW 0x04 /* this is a whiteout object */ - u_short fts_flags; /* private flags for FTSENT structure */ + unsigned short fts_flags; /* private flags for FTSENT structure */ #define FTS_AGAIN 1 /* read node again */ #define FTS_FOLLOW 2 /* follow symbolic link */ #define FTS_NOINSTR 3 /* no instructions */ #define FTS_SKIP 4 /* discard node */ - u_short fts_instr; /* fts_set() instructions */ + unsigned short fts_instr; /* fts_set() instructions */ struct stat *fts_statp; /* stat(2) information */ char fts_name[1]; /* file name */ diff --git a/include/ifaddrs.h b/include/ifaddrs.h index 373e6014ac9..9baa15954eb 100644 --- a/include/ifaddrs.h +++ b/include/ifaddrs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ifaddrs.h,v 1.3 2002/02/16 21:27:17 millert Exp $ */ +/* $OpenBSD: ifaddrs.h,v 1.4 2004/01/22 21:48:02 espie Exp $ */ /* * Copyright (c) 1995, 1999 @@ -31,7 +31,7 @@ struct ifaddrs { struct ifaddrs *ifa_next; char *ifa_name; - u_int ifa_flags; + unsigned int ifa_flags; struct sockaddr *ifa_addr; struct sockaddr *ifa_netmask; struct sockaddr *ifa_dstaddr; diff --git a/include/kvm.h b/include/kvm.h index a1d019a2c9f..1f5db078e06 100644 --- a/include/kvm.h +++ b/include/kvm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm.h,v 1.10 2004/01/07 02:16:32 millert Exp $ */ +/* $OpenBSD: kvm.h,v 1.11 2004/01/22 21:48:02 espie Exp $ */ /* $NetBSD: kvm.h,v 1.7 1996/04/19 12:02:50 leo Exp $ */ /*- @@ -75,9 +75,9 @@ kvm_t *kvm_open (const char *, const char *, const char *, int, const char *); kvm_t *kvm_openfiles (const char *, const char *, const char *, int, char *); -ssize_t kvm_read(kvm_t *, u_long, void *, size_t) +ssize_t kvm_read(kvm_t *, unsigned long, void *, size_t) __attribute__((__bounded__(__buffer__,3,4))); -ssize_t kvm_write(kvm_t *, u_long, const void *, size_t) +ssize_t kvm_write(kvm_t *, unsigned long, const void *, size_t) __attribute__((__bounded__(__buffer__,3,4))); __END_DECLS diff --git a/include/link.h b/include/link.h index 058b97dfe8a..d5104f031f5 100644 --- a/include/link.h +++ b/include/link.h @@ -1,4 +1,4 @@ -/* $OpenBSD: link.h,v 1.13 2002/09/07 20:35:03 deraadt Exp $ */ +/* $OpenBSD: link.h,v 1.14 2004/01/22 21:48:02 espie Exp $ */ /* $NetBSD: link.h,v 1.10 1996/01/09 00:00:11 pk Exp $ */ /* @@ -49,12 +49,12 @@ */ struct sod { /* Shared Object Descriptor */ - long sod_name; /* name (relative to load address) */ - u_int sod_library : 1, /* Searched for by library rules */ - sod_reserved : 31; - short sod_major; /* major version number */ - short sod_minor; /* minor version number */ - long sod_next; /* next sod */ + long sod_name; /* name (relative to load address) */ + unsigned int sod_library : 1,/* Searched for by library rules */ + sod_reserved : 31; + short sod_major; /* major version number */ + short sod_minor; /* minor version number */ + long sod_next; /* next sod */ }; /* @@ -69,7 +69,7 @@ struct so_map { /* Shared Object Map */ struct so_map *som_next; /* Next map in chain */ struct sod *som_sod; /* Sod responsible for this map */ caddr_t som_sodbase; /* Base address of this sod */ - u_int som_write : 1; /* Text is currently writable */ + unsigned int som_write : 1; /* Text is currently writable */ struct _dynamic *som_dynamic; /* _dynamic structure */ caddr_t som_spd; /* Private data */ }; diff --git a/include/link_aout.h b/include/link_aout.h index 6394da379df..f78f2e78b8a 100644 --- a/include/link_aout.h +++ b/include/link_aout.h @@ -1,4 +1,4 @@ -/* $OpenBSD: link_aout.h,v 1.1 2002/06/07 03:00:01 art Exp $ */ +/* $OpenBSD: link_aout.h,v 1.2 2004/01/22 21:48:02 espie Exp $ */ /* * Copyright (c) 1993 Paul Kranenburg @@ -47,7 +47,7 @@ */ struct nzlist { struct nlist nlist; - u_long nz_size; + unsigned long nz_size; #define nz_un nlist.n_un #define nz_strx nlist.n_un.n_strx #define nz_name nlist.n_un.n_name diff --git a/include/login_cap.h b/include/login_cap.h index 46b81f9e5ba..da913b8e30e 100644 --- a/include/login_cap.h +++ b/include/login_cap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: login_cap.h,v 1.9 2002/08/02 23:56:44 millert Exp $ */ +/* $OpenBSD: login_cap.h,v 1.10 2004/01/22 21:48:02 espie Exp $ */ /*- * Copyright (c) 1995,1997 Berkeley Software Design, Inc. All rights reserved. @@ -91,7 +91,7 @@ struct passwd; login_cap_t *login_getclass(char *); void login_close(login_cap_t *); -int login_getcapbool(login_cap_t *, char *, u_int); +int login_getcapbool(login_cap_t *, char *, unsigned int); quad_t login_getcapnum(login_cap_t *, char *, quad_t, quad_t); quad_t login_getcapsize(login_cap_t *, char *, quad_t, quad_t); char *login_getcapstr(login_cap_t *, char *, char *, char *); @@ -99,8 +99,8 @@ quad_t login_getcaptime(login_cap_t *, char *, quad_t, quad_t); char *login_getstyle(login_cap_t *, char *, char *); int secure_path(char *); -int setclasscontext(char *, u_int); -int setusercontext(login_cap_t *, struct passwd *, uid_t, u_int); +int setclasscontext(char *, unsigned int); +int setusercontext(login_cap_t *, struct passwd *, uid_t, unsigned int); __END_DECLS diff --git a/include/mpool.h b/include/mpool.h index 4ec96f965de..fb33d4493de 100644 --- a/include/mpool.h +++ b/include/mpool.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mpool.h,v 1.9 2003/06/02 19:34:12 millert Exp $ */ +/* $OpenBSD: mpool.h,v 1.10 2004/01/22 21:48:02 espie Exp $ */ /* $NetBSD: mpool.h,v 1.7 1996/05/03 21:13:41 cgd Exp $ */ /*- @@ -67,7 +67,7 @@ typedef struct MPOOL { pgno_t curcache; /* current number of cached pages */ pgno_t maxcache; /* max number of cached pages */ pgno_t npages; /* number of pages in the file */ - u_long pagesize; /* file page size */ + unsigned long pagesize; /* file page size */ int fd; /* file descriptor */ /* page in conversion routine */ void (*pgin)(void *, pgno_t, void *); @@ -75,15 +75,15 @@ typedef struct MPOOL { void (*pgout)(void *, pgno_t, void *); void *pgcookie; /* cookie for page in/out routines */ #ifdef STATISTICS - u_long cachehit; - u_long cachemiss; - u_long pagealloc; - u_long pageflush; - u_long pageget; - u_long pagenew; - u_long pageput; - u_long pageread; - u_long pagewrite; + unsigned long cachehit; + unsigned long cachemiss; + unsigned long pagealloc; + unsigned long pageflush; + unsigned long pageget; + unsigned long pagenew; + unsigned long pageput; + unsigned long pageread; + unsigned long pagewrite; #endif } MPOOL; @@ -97,10 +97,10 @@ __BEGIN_DECLS MPOOL *mpool_open(void *, int, pgno_t, pgno_t); void mpool_filter(MPOOL *, void (*)(void *, pgno_t, void *), void (*)(void *, pgno_t, void *), void *); -void *mpool_new(MPOOL *, pgno_t *, u_int); -void *mpool_get(MPOOL *, pgno_t, u_int); +void *mpool_new(MPOOL *, pgno_t *, unsigned int); +void *mpool_get(MPOOL *, pgno_t, unsigned int); int mpool_delete(MPOOL *, void *); -int mpool_put(MPOOL *, void *, u_int); +int mpool_put(MPOOL *, void *, unsigned int); int mpool_sync(MPOOL *); int mpool_close(MPOOL *); #ifdef STATISTICS diff --git a/include/protocols/talkd.h b/include/protocols/talkd.h index 7dce0aef4ca..09503582a62 100644 --- a/include/protocols/talkd.h +++ b/include/protocols/talkd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: talkd.h,v 1.3 2003/06/02 19:34:12 millert Exp $ */ +/* $OpenBSD: talkd.h,v 1.4 2004/01/22 21:48:02 espie Exp $ */ /* $NetBSD: talkd.h,v 1.5 1995/03/04 07:59:30 cgd Exp $ */ /* @@ -57,31 +57,33 @@ * Client->server request message format. */ typedef struct { - u_char vers; /* protocol version */ - u_char type; /* request type, see below */ - u_char answer; /* not used */ - u_char pad; - u_int32_t id_num; /* message id */ - struct osockaddr addr; /* old (4.3) style */ - struct osockaddr ctl_addr; /* old (4.3) style */ - int32_t pid; /* caller's process id */ + unsigned char vers; /* protocol version */ + unsigned char type; /* request type, see below */ + unsigned char answer; /* not used */ + unsigned char pad; + u_int32_t id_num; /* message id */ + struct osockaddr addr; /* old (4.3) style */ + struct osockaddr ctl_addr; /* old (4.3) style */ + 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 */ + char l_name[NAME_SIZE]; /* caller's name */ + char r_name[NAME_SIZE]; /* callee's name */ #define TTY_SIZE 16 - char r_tty[TTY_SIZE]; /* callee's tty name */ + char r_tty[TTY_SIZE]; /* callee's tty name */ } CTL_MSG; /* * Server->client response message format. */ typedef struct { - u_char vers; /* protocol version */ - u_char type; /* type of request message, see below */ - u_char answer; /* respose to request message, see below */ - u_char pad; - u_int32_t id_num; /* message id */ - struct osockaddr addr; /* address for establishing conversation */ + unsigned char vers; /* protocol version */ + unsigned char type; /* type of request message, see below */ + unsigned char answer; /* response to request message, + see below */ + unsigned char pad; + u_int32_t id_num; /* message id */ + struct osockaddr addr; /* address for establishing + conversation */ } CTL_RESPONSE; #define TALK_VERSION 1 /* protocol version */ diff --git a/include/resolv.h b/include/resolv.h index 7ce9726abb3..19346841fed 100644 --- a/include/resolv.h +++ b/include/resolv.h @@ -1,4 +1,4 @@ -/* $OpenBSD: resolv.h,v 1.14 2003/08/01 17:38:33 avsm Exp $ */ +/* $OpenBSD: resolv.h,v 1.15 2004/01/22 21:48:02 espie Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -134,15 +134,15 @@ struct __res_state { int retrans; /* retransmission time interval */ int retry; /* number of times to retransmit */ - u_long options; /* option flags - see below. */ + unsigned long options; /* option flags - see below. */ int nscount; /* number of name servers */ struct sockaddr_in nsaddr_list[MAXNS]; /* address of name server */ #define nsaddr nsaddr_list[0] /* for backward compatibility */ - u_short id; /* current message id */ + unsigned short id; /* current message id */ char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */ char defdname[256]; /* default domain (deprecated) */ - u_long pfcode; /* RES_PRF_ flags - see below. */ + unsigned long pfcode; /* RES_PRF_ flags - see below. */ unsigned ndots:4; /* threshold for initial abs. query */ unsigned nsort:4; /* number of elements in sort_list[] */ char unused[3]; @@ -220,16 +220,16 @@ typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error } res_sendhookact; typedef res_sendhookact (*res_send_qhook)(struct sockaddr_in * const *ns, - const u_char **query, + const unsigned char **query, int *querylen, - u_char *ans, + unsigned char *ans, int anssiz, int *resplen); typedef res_sendhookact (*res_send_rhook)(const struct sockaddr_in *ns, - const u_char *query, + const unsigned char *query, int querylen, - u_char *ans, + unsigned char *ans, int anssiz, int *resplen); @@ -296,62 +296,70 @@ extern const struct res_sym __p_type_syms[]; #endif __BEGIN_DECLS -int res_hnok(const char *); -int res_ownok(const char *); -int res_mailok(const char *); -int res_dnok(const char *); -int sym_ston(const struct res_sym *, char *, int *); -const char * sym_ntos(const struct res_sym *, int, int *); -const char * sym_ntop(const struct res_sym *, int, int *); -int b64_ntop(u_char const *, size_t, char *, size_t); -int b64_pton(char const *, u_char *, size_t); -int loc_aton(const char *, u_char *); -const char * loc_ntoa(const u_char *, char *); -int dn_skipname(const u_char *, const u_char *); -void fp_resstat(struct __res_state *, FILE *); -void fp_query(const u_char *, FILE *); -void fp_nquery(const u_char *, int, FILE *); -const char * hostalias(const char *); -void putlong(u_int32_t, u_char *); -void putshort(u_int16_t, u_char *); -const char * p_class(int); -const char * p_time(u_int32_t); -const char * p_type(int); -void p_query(const u_char *); -const u_char * p_cdnname(const u_char *, const u_char *, int, FILE *); -const u_char * p_cdname(const u_char *, const u_char *, FILE *); -const u_char * p_fqnname(const u_char *cp, const u_char *msg, - int, char *, int); -const u_char * p_fqname(const u_char *, const u_char *, FILE *); -const u_char * p_rr(const u_char *, const u_char *, FILE *); -const char * p_option(u_long option); -char * p_secstodate(u_long); -int dn_count_labels(char *); -int dn_comp(const char *, u_char *, int, - u_char **, u_char **); -int dn_expand(const u_char *, const u_char *, const u_char *, - char *, int); -int res_init(void); -u_int res_randomid(void); -int res_query(const char *, int, int, u_char *, int) +int res_hnok(const char *); +int res_ownok(const char *); +int res_mailok(const char *); +int res_dnok(const char *); +int sym_ston(const struct res_sym *, char *, int *); +const char * sym_ntos(const struct res_sym *, int, int *); +const char * sym_ntop(const struct res_sym *, int, int *); +int b64_ntop(unsigned char const *, size_t, char *, size_t); +int b64_pton(char const *, unsigned char *, size_t); +int loc_aton(const char *, unsigned char *); +const char * loc_ntoa(const unsigned char *, char *); +int dn_skipname(const unsigned char *, + const unsigned char *); +void fp_resstat(struct __res_state *, FILE *); +void fp_query(const unsigned char *, FILE *); +void fp_nquery(const unsigned char *, int, FILE *); +const char * hostalias(const char *); +void putlong(u_int32_t, unsigned char *); +void putshort(u_int16_t, unsigned char *); +const char * p_class(int); +const char * p_time(u_int32_t); +const char * p_type(int); +void p_query(const unsigned char *); +const unsigned char * p_cdnname(const unsigned char *, const unsigned char *, + int, FILE *); +const unsigned char * p_cdname(const unsigned char *, const unsigned char *, + FILE *); +const unsigned char * p_fqnname(const unsigned char *, const unsigned char *, + int, char *, int); +const unsigned char * p_fqname(const unsigned char *, const unsigned char *, + FILE *); +const unsigned char * p_rr(const unsigned char *, const unsigned char *, + FILE *); +const char * p_option(unsigned long); +char * p_secstodate(unsigned long); +int dn_count_labels(char *); +int dn_comp(const char *, unsigned char *, int, + unsigned char **, unsigned char **); +int dn_expand(const unsigned char *, const unsigned char *, + const unsigned char *, char *, int); +int res_init(void); +unsigned int res_randomid(void); +int res_query(const char *, int, int, unsigned char *, int) __attribute__((__bounded__(__string__,4,5))); -int res_search(const char *, int, int, u_char *, int) - __attribute__((__bounded__(__string__,4,5))); -int res_querydomain(const char *, const char *, int, int, - u_char *, int) +int res_search(const char *, int, int, unsigned char *, int) + __attribute__((__bounded__(__string__,4,5))); +int res_querydomain(const char *, const char *, int, int, + unsigned char *, int) __attribute__((__bounded__(__string__,5,6))); -int res_mkquery(int, const char *, int, int, const u_char *, int, - const u_char *, u_char *, int) +int res_mkquery(int, const char *, int, int, + const unsigned char *, int, const unsigned char *, + unsigned char *, int) __attribute__((__bounded__(__string__,5,6))) __attribute__((__bounded__(__string__,8,9))); -int res_send(const u_char *, int, u_char *, int) +int res_send(const unsigned char *, int, unsigned char *, + int) __attribute__((__bounded__(__string__,3,4))); -int res_isourserver(const struct sockaddr_in *); -int res_nameinquery(const char *, int, int, - const u_char *, const u_char *); -int res_queriesmatch(const u_char *, const u_char *, - const u_char *, const u_char *); -void res_close(void); +int res_isourserver(const struct sockaddr_in *); +int res_nameinquery(const char *, int, int, + const unsigned char *, const unsigned char *); +int res_queriesmatch(const unsigned char *, + const unsigned char *, const unsigned char *, + const unsigned char *); +void res_close(void); __END_DECLS #endif /* !_RESOLV_H_ */ diff --git a/include/rmd160.h b/include/rmd160.h index 1c5b885a0db..cfb009df150 100644 --- a/include/rmd160.h +++ b/include/rmd160.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rmd160.h,v 1.11 2003/10/07 22:17:27 avsm Exp $ */ +/* $OpenBSD: rmd160.h,v 1.12 2004/01/22 21:48:02 espie Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -27,27 +27,27 @@ /* RMD160 context. */ typedef struct RMD160Context { - u_int32_t state[5]; /* state */ - u_int64_t count; /* number of bits, modulo 2^64 */ - u_char buffer[64]; /* input buffer */ + u_int32_t state[5]; /* state */ + u_int64_t count; /* number of bits, modulo 2^64 */ + unsigned char buffer[64]; /* input buffer */ } RMD160_CTX; #include <sys/cdefs.h> __BEGIN_DECLS void RMD160Init(RMD160_CTX *); -void RMD160Transform(u_int32_t [5], const u_char [64]) +void RMD160Transform(u_int32_t [5], const unsigned char [64]) __attribute__((__bounded__(__minbytes__,1,5))) __attribute__((__bounded__(__minbytes__,2,64))); -void RMD160Update(RMD160_CTX *, const u_char *, u_int32_t) +void RMD160Update(RMD160_CTX *, const unsigned char *, u_int32_t) __attribute__((__bounded__(__string__,2,3))); -void RMD160Final(u_char [20], RMD160_CTX *) +void RMD160Final(unsigned char [20], RMD160_CTX *) __attribute__((__bounded__(__minbytes__,1,20))); char *RMD160End(RMD160_CTX *, char *) __attribute__((__bounded__(__minbytes__,2,41))); char *RMD160File(char *, char *) __attribute__((__bounded__(__minbytes__,2,41))); -char *RMD160Data(const u_char *, size_t, char *) +char *RMD160Data(const unsigned char *, size_t, char *) __attribute__((__bounded__(__string__,1,2))) __attribute__((__bounded__(__minbytes__,3,41))); __END_DECLS diff --git a/include/rpc/auth.h b/include/rpc/auth.h index fc983083b47..77d6b77503f 100644 --- a/include/rpc/auth.h +++ b/include/rpc/auth.h @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.h,v 1.4 2002/02/17 19:42:21 millert Exp $ */ +/* $OpenBSD: auth.h,v 1.5 2004/01/22 21:48:02 espie Exp $ */ /* $NetBSD: auth.h,v 1.7 1995/04/29 05:27:55 cgd Exp $ */ /* @@ -88,9 +88,9 @@ __END_DECLS * Authentication info. Opaque to client. */ struct opaque_auth { - enum_t oa_flavor; /* flavor of auth */ - caddr_t oa_base; /* address of more auth stuff */ - u_int oa_length; /* not to exceed MAX_AUTH_BYTES */ + enum_t oa_flavor; /* flavor of auth */ + caddr_t oa_base; /* address of more auth stuff */ + unsigned int oa_length; /* not to exceed MAX_AUTH_BYTES */ }; @@ -172,7 +172,8 @@ struct sockaddr_in; extern AUTH *authunix_create(char *, int, int, int, int *); extern AUTH *authunix_create_default(void); extern AUTH *authnone_create(void); -extern AUTH *authdes_create(char *, u_int, struct sockaddr_in *, des_block *); +extern AUTH *authdes_create(char *, unsigned int, struct sockaddr_in *, + des_block *); __END_DECLS #define AUTH_NONE 0 /* no authentication */ diff --git a/include/rpc/auth_unix.h b/include/rpc/auth_unix.h index e65f224fe62..a0eec0de2fd 100644 --- a/include/rpc/auth_unix.h +++ b/include/rpc/auth_unix.h @@ -1,4 +1,4 @@ -/* $OpenBSD: auth_unix.h,v 1.3 2002/02/16 21:27:18 millert Exp $ */ +/* $OpenBSD: auth_unix.h,v 1.4 2004/01/22 21:48:02 espie Exp $ */ /* $NetBSD: auth_unix.h,v 1.4 1994/10/26 00:56:56 cgd Exp $ */ /* @@ -60,12 +60,12 @@ * Unix style credentials. */ struct authunix_parms { - u_long aup_time; - char *aup_machname; - int aup_uid; - int aup_gid; - u_int aup_len; - int *aup_gids; + unsigned long aup_time; + char *aup_machname; + int aup_uid; + int aup_gid; + unsigned int aup_len; + int *aup_gids; }; __BEGIN_DECLS diff --git a/include/rpc/clnt.h b/include/rpc/clnt.h index 353cb6334d4..29add82934b 100644 --- a/include/rpc/clnt.h +++ b/include/rpc/clnt.h @@ -1,4 +1,4 @@ -/* $OpenBSD: clnt.h,v 1.9 2003/03/16 00:34:01 margarida Exp $ */ +/* $OpenBSD: clnt.h,v 1.10 2004/01/22 21:48:02 espie Exp $ */ /* $NetBSD: clnt.h,v 1.6 1995/04/29 05:27:58 cgd Exp $ */ /* @@ -121,8 +121,8 @@ typedef struct __rpc_client { struct clnt_ops { /* call remote procedure */ enum clnt_stat (*cl_call)(struct __rpc_client *, - u_long, xdrproc_t, caddr_t, xdrproc_t, - caddr_t, struct timeval); + unsigned long, xdrproc_t, caddr_t, + xdrproc_t, caddr_t, struct timeval); /* abort a call */ void (*cl_abort)(struct __rpc_client *); /* get specific error code */ @@ -134,8 +134,8 @@ typedef struct __rpc_client { /* destroy this structure */ void (*cl_destroy)(struct __rpc_client *); /* the ioctl() of rpc */ - bool_t (*cl_control)(struct __rpc_client *, u_int, - void *); + bool_t (*cl_control)(struct __rpc_client *, + unsigned int, void *); } *cl_ops; caddr_t cl_private; /* private stuff */ } CLIENT; @@ -152,7 +152,7 @@ typedef struct __rpc_client { * enum clnt_stat * CLNT_CALL(rh, proc, xargs, argsp, xres, resp, timeout) * CLIENT *rh; - * u_long proc; + * unsigned long proc; * xdrproc_t xargs; * caddr_t argsp; * xdrproc_t xres; @@ -197,7 +197,7 @@ typedef struct __rpc_client { * bool_t * CLNT_CONTROL(cl, request, info) * CLIENT *cl; - * u_int request; + * unsigned int request; * char *info; */ #define CLNT_CONTROL(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in)) @@ -230,16 +230,16 @@ typedef struct __rpc_client { * and network administration. */ -#define RPCTEST_PROGRAM ((u_long)1) -#define RPCTEST_VERSION ((u_long)1) -#define RPCTEST_NULL_PROC ((u_long)2) -#define RPCTEST_NULL_BATCH_PROC ((u_long)3) +#define RPCTEST_PROGRAM ((unsigned long)1) +#define RPCTEST_VERSION ((unsigned long)1) +#define RPCTEST_NULL_PROC ((unsigned long)2) +#define RPCTEST_NULL_BATCH_PROC ((unsigned long)3) /* * By convention, procedure 0 takes null arguments and returns them */ -#define NULLPROC ((u_int)0) +#define NULLPROC ((unsigned int)0) /* * Below are the client handle creation routines for the various @@ -251,11 +251,11 @@ typedef struct __rpc_client { * Memory based rpc (for speed check and testing) * CLIENT * * clntraw_create(prog, vers) - * u_long prog; - * u_long vers; + * unsigned long prog; + * unsigned long vers; */ __BEGIN_DECLS -extern CLIENT *clntraw_create(u_long, u_long); +extern CLIENT *clntraw_create(unsigned long, unsigned long); __END_DECLS @@ -263,13 +263,13 @@ __END_DECLS * Generic client creation routine. Supported protocols are "udp" and "tcp" * CLIENT * * clnt_create(host, prog, vers, prot); - * char *host; -- hostname - * u_long prog; -- program number - * u_long vers; -- version number - * char *prot; -- protocol + * char *host; -- hostname + * unsigned long prog; -- program number + * unsigned long vers; -- version number + * char *prot; -- protocol */ __BEGIN_DECLS -extern CLIENT *clnt_create(char *, u_long, u_long, char *); +extern CLIENT *clnt_create(char *, unsigned long, unsigned long, char *); __END_DECLS @@ -278,15 +278,15 @@ __END_DECLS * CLIENT * * clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz) * struct sockaddr_in *raddr; - * u_long prog; - * u_long version; + * unsigned long prog; + * unsigned long version; * int *sockp; - * u_int sendsz; - * u_int recvsz; + * unsigned int sendsz; + * unsigned int recvsz; */ __BEGIN_DECLS -extern CLIENT *clnttcp_create(struct sockaddr_in *, u_long, u_long, int *, - u_int, u_int); +extern CLIENT *clnttcp_create(struct sockaddr_in *, unsigned long, + unsigned long, int *, unsigned int, unsigned int); __END_DECLS @@ -295,8 +295,8 @@ __END_DECLS * CLIENT * * clntudp_create(raddr, program, version, wait, sockp) * struct sockaddr_in *raddr; - * u_long program; - * u_long version; + * unsigned long program; + * unsigned long version; * struct timeval wait; * int *sockp; * @@ -304,18 +304,18 @@ __END_DECLS * CLIENT * * clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz, recvsz) * struct sockaddr_in *raddr; - * u_long program; - * u_long version; + * unsigned long program; + * unsigned long version; * struct timeval wait; * int *sockp; - * u_int sendsz; - * u_int recvsz; + * unsigned int sendsz; + * unsigned int recvsz; */ __BEGIN_DECLS -extern CLIENT *clntudp_create(struct sockaddr_in *, u_long, u_long, - struct timeval, int *); -extern CLIENT *clntudp_bufcreate(struct sockaddr_in *, u_long, u_long, - struct timeval, int *, u_int, u_int); +extern CLIENT *clntudp_create(struct sockaddr_in *, unsigned long, + unsigned long, struct timeval, int *); +extern CLIENT *clntudp_bufcreate(struct sockaddr_in *, unsigned long, + unsigned long, struct timeval, int *, unsigned int, unsigned int); __END_DECLS diff --git a/include/rpc/pmap_clnt.h b/include/rpc/pmap_clnt.h index 2a6fbecb355..4c3937b5c5d 100644 --- a/include/rpc/pmap_clnt.h +++ b/include/rpc/pmap_clnt.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap_clnt.h,v 1.5 2002/02/17 19:42:21 millert Exp $ */ +/* $OpenBSD: pmap_clnt.h,v 1.6 2004/01/22 21:48:02 espie Exp $ */ /* $NetBSD: pmap_clnt.h,v 1.5 1994/12/04 01:12:42 cgd Exp $ */ /* @@ -67,17 +67,19 @@ #include <sys/cdefs.h> __BEGIN_DECLS -extern bool_t pmap_set(u_long, u_long, u_int, int); -extern bool_t pmap_unset(u_long, u_long); +extern bool_t pmap_set(unsigned long, unsigned long, unsigned int, + int); +extern bool_t pmap_unset(unsigned long, unsigned long); extern struct pmaplist *pmap_getmaps(struct sockaddr_in *); -extern enum clnt_stat pmap_rmtcall(struct sockaddr_in *, u_long, u_long, - u_long, xdrproc_t, caddr_t, xdrproc_t, caddr_t, - struct timeval, u_long *); -extern enum clnt_stat clnt_broadcast(u_long, u_long, u_long, xdrproc_t, - char *, xdrproc_t, char *, +extern enum clnt_stat pmap_rmtcall(struct sockaddr_in *, unsigned long, + unsigned long, unsigned long, xdrproc_t, caddr_t, + xdrproc_t, caddr_t, struct timeval, + unsigned long *); +extern enum clnt_stat clnt_broadcast(unsigned long, unsigned long, + unsigned long, xdrproc_t, char *, xdrproc_t, char *, bool_t (*)(caddr_t, struct sockaddr_in *)); -extern u_short pmap_getport(struct sockaddr_in *, u_long, u_long, - u_int); +extern unsigned short pmap_getport(struct sockaddr_in *, unsigned long, + unsigned long, unsigned int); __END_DECLS #endif /* !_RPC_PMAPCLNT_H */ diff --git a/include/rpc/pmap_prot.h b/include/rpc/pmap_prot.h index 32e88323b2f..f90d110a416 100644 --- a/include/rpc/pmap_prot.h +++ b/include/rpc/pmap_prot.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap_prot.h,v 1.4 2002/02/16 21:27:18 millert Exp $ */ +/* $OpenBSD: pmap_prot.h,v 1.5 2004/01/22 21:48:02 espie Exp $ */ /* $NetBSD: pmap_prot.h,v 1.4 1994/10/26 00:57:00 cgd Exp $ */ /* @@ -74,17 +74,17 @@ #define _RPC_PMAPPROT_H #include <sys/cdefs.h> -#define PMAPPORT ((u_short)111) -#define PMAPPROG ((u_long)100000) -#define PMAPVERS ((u_long)2) -#define PMAPVERS_PROTO ((u_long)2) -#define PMAPVERS_ORIG ((u_long)1) -#define PMAPPROC_NULL ((u_long)0) -#define PMAPPROC_SET ((u_long)1) -#define PMAPPROC_UNSET ((u_long)2) -#define PMAPPROC_GETPORT ((u_long)3) -#define PMAPPROC_DUMP ((u_long)4) -#define PMAPPROC_CALLIT ((u_long)5) +#define PMAPPORT ((unsigned short)111) +#define PMAPPROG ((unsigned long)100000) +#define PMAPVERS ((unsigned long)2) +#define PMAPVERS_PROTO ((unsigned long)2) +#define PMAPVERS_ORIG ((unsigned long)1) +#define PMAPPROC_NULL ((unsigned long)0) +#define PMAPPROC_SET ((unsigned long)1) +#define PMAPPROC_UNSET ((unsigned long)2) +#define PMAPPROC_GETPORT ((unsigned long)3) +#define PMAPPROC_DUMP ((unsigned long)4) +#define PMAPPROC_CALLIT ((unsigned long)5) struct pmap { unsigned long pm_prog; diff --git a/include/rpc/pmap_rmt.h b/include/rpc/pmap_rmt.h index ca3a4d66457..c2a6b2daadc 100644 --- a/include/rpc/pmap_rmt.h +++ b/include/rpc/pmap_rmt.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap_rmt.h,v 1.3 2002/02/16 21:27:18 millert Exp $ */ +/* $OpenBSD: pmap_rmt.h,v 1.4 2004/01/22 21:48:02 espie Exp $ */ /* $NetBSD: pmap_rmt.h,v 1.4 1994/10/26 00:57:01 cgd Exp $ */ /* @@ -45,14 +45,14 @@ #include <sys/cdefs.h> struct rmtcallargs { - u_long prog, vers, proc, arglen; + unsigned long prog, vers, proc, arglen; caddr_t args_ptr; xdrproc_t xdr_args; }; struct rmtcallres { - u_long *port_ptr; - u_long resultslen; + unsigned long *port_ptr; + unsigned long resultslen; caddr_t results_ptr; xdrproc_t xdr_results; }; diff --git a/include/rpc/rpc_msg.h b/include/rpc/rpc_msg.h index 1305959c8f7..821ae6223f3 100644 --- a/include/rpc/rpc_msg.h +++ b/include/rpc/rpc_msg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rpc_msg.h,v 1.3 2002/02/16 21:27:18 millert Exp $ */ +/* $OpenBSD: rpc_msg.h,v 1.4 2004/01/22 21:48:02 espie Exp $ */ /* $NetBSD: rpc_msg.h,v 1.5 1995/04/29 05:28:00 cgd Exp $ */ /* @@ -43,8 +43,8 @@ #ifndef _RPC_RPCMSG_H #define _RPC_RPCMSG_H -#define RPC_MSG_VERSION ((u_long) 2) -#define RPC_SERVICE_PORT ((u_short) 2048) +#define RPC_MSG_VERSION ((unsigned long) 2) +#define RPC_SERVICE_PORT ((unsigned short) 2048) /* * Bottom up definition of an rpc message. diff --git a/include/rpc/svc.h b/include/rpc/svc.h index 717a27c73cb..e99472105bd 100644 --- a/include/rpc/svc.h +++ b/include/rpc/svc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: svc.h,v 1.8 2003/12/31 03:27:23 millert Exp $ */ +/* $OpenBSD: svc.h,v 1.9 2004/01/22 21:48:02 espie Exp $ */ /* $NetBSD: svc.h,v 1.9 1995/04/29 05:28:01 cgd Exp $ */ /* @@ -77,7 +77,7 @@ enum xprt_stat { */ typedef struct __rpc_svcxprt { int xp_sock; - u_short xp_port; /* associated port number */ + unsigned short xp_port; /* associated port number */ struct xp_ops { /* receive incomming requests */ bool_t (*xp_recv)(struct __rpc_svcxprt *, @@ -164,13 +164,13 @@ struct svc_req { * * svc_register(xprt, prog, vers, dispatch, protocol) * SVCXPRT *xprt; - * u_long prog; - * u_long vers; + * unsigned long prog; + * unsigned long vers; * void (*dispatch)(); * int protocol; like TCP or UDP, zero means do not register */ __BEGIN_DECLS -extern bool_t svc_register(SVCXPRT *, u_long, u_long, +extern bool_t svc_register(SVCXPRT *, unsigned long, unsigned long, void (*)(struct svc_req *, SVCXPRT *), int); __END_DECLS @@ -178,11 +178,11 @@ __END_DECLS * Service un-registration * * svc_unregister(prog, vers) - * u_long prog; - * u_long vers; + * unsigned long prog; + * unsigned long vers; */ __BEGIN_DECLS -extern void svc_unregister(u_long, u_long); +extern void svc_unregister(unsigned long, unsigned long); __END_DECLS /* @@ -240,7 +240,7 @@ extern bool_t svc_sendreply(SVCXPRT *, xdrproc_t, char *); extern void svcerr_decode(SVCXPRT *); extern void svcerr_weakauth(SVCXPRT *); extern void svcerr_noproc(SVCXPRT *); -extern void svcerr_progvers(SVCXPRT *, u_long, u_long); +extern void svcerr_progvers(SVCXPRT *, unsigned long, unsigned long); extern void svcerr_auth(SVCXPRT *, enum auth_stat); extern void svcerr_noprog(SVCXPRT *); extern void svcerr_systemerr(SVCXPRT *); @@ -304,7 +304,7 @@ __END_DECLS */ __BEGIN_DECLS extern SVCXPRT *svcudp_create(int); -extern SVCXPRT *svcudp_bufcreate(int, u_int, u_int); +extern SVCXPRT *svcudp_bufcreate(int, unsigned int, unsigned int); __END_DECLS @@ -312,14 +312,14 @@ __END_DECLS * Tcp based rpc. */ __BEGIN_DECLS -extern SVCXPRT *svctcp_create(int, u_int, u_int); +extern SVCXPRT *svctcp_create(int, unsigned int, unsigned int); __END_DECLS /* * Fd based rpc. */ __BEGIN_DECLS -extern SVCXPRT *svcfd_create(int, u_int, u_int); +extern SVCXPRT *svcfd_create(int, unsigned int, unsigned int); __END_DECLS #endif /* !_RPC_SVC_H */ diff --git a/include/rpc/xdr.h b/include/rpc/xdr.h index e91b90be117..6100b0fffd3 100644 --- a/include/rpc/xdr.h +++ b/include/rpc/xdr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: xdr.h,v 1.6 2003/03/10 03:45:20 david Exp $ */ +/* $OpenBSD: xdr.h,v 1.7 2004/01/22 21:48:02 espie Exp $ */ /* $NetBSD: xdr.h,v 1.7 1995/04/29 05:28:06 cgd Exp $ */ /* @@ -105,22 +105,24 @@ typedef struct __rpc_xdr { /* put a long to " */ bool_t (*x_putlong)(struct __rpc_xdr *, long *); /* get some bytes from " */ - bool_t (*x_getbytes)(struct __rpc_xdr *, caddr_t, u_int); + bool_t (*x_getbytes)(struct __rpc_xdr *, caddr_t, + unsigned int); /* put some bytes to " */ - bool_t (*x_putbytes)(struct __rpc_xdr *, caddr_t, u_int); + bool_t (*x_putbytes)(struct __rpc_xdr *, caddr_t, + unsigned int); /* returns bytes off from beginning */ - u_int (*x_getpostn)(struct __rpc_xdr *); + unsigned int (*x_getpostn)(struct __rpc_xdr *); /* lets you reposition the stream */ - bool_t (*x_setpostn)(struct __rpc_xdr *, u_int); + bool_t (*x_setpostn)(struct __rpc_xdr *, unsigned int); /* buf quick ptr to buffered data */ - int32_t *(*x_inline)(struct __rpc_xdr *, u_int); + int32_t *(*x_inline)(struct __rpc_xdr *, unsigned int); /* free privates of this xdr_stream */ void (*x_destroy)(struct __rpc_xdr *); } *x_ops; caddr_t x_public; /* users' data */ caddr_t x_private; /* pointer to private data */ caddr_t x_base; /* private used for position info */ - u_int x_handy; /* extra private word */ + unsigned int x_handy; /* extra private word */ } XDR; /* @@ -133,7 +135,7 @@ typedef struct __rpc_xdr { * * XXX can't actually prototype it, because some take three args!!! */ -typedef bool_t (*xdrproc_t)(/* XDR *, void *, u_int */); +typedef bool_t (*xdrproc_t)(/* XDR *, void *, unsigned int */); /* * Operations defined on a XDR handle @@ -141,8 +143,8 @@ typedef bool_t (*xdrproc_t)(/* XDR *, void *, u_int */); * XDR *xdrs; * long *longp; * caddr_t addr; - * u_int len; - * u_int pos; + * unsigned int len; + * unsigned int pos; */ #define XDR_GETLONG(xdrs, longp) \ (*(xdrs)->x_ops->x_getlong)(xdrs, longp) @@ -217,14 +219,14 @@ struct xdr_discrim { * N.B. and frozen for all time: each data type here uses 4 bytes * of external representation. */ -#define IXDR_GET_LONG(buf) ((long)ntohl((u_long)*(buf)++)) -#define IXDR_PUT_LONG(buf, v) (*(buf)++ = (long)htonl((u_long)v)) +#define IXDR_GET_LONG(buf) ((long)ntohl((unsigned long)*(buf)++)) +#define IXDR_PUT_LONG(buf, v) (*(buf)++ = (long)htonl((unsigned long)v)) #define IXDR_GET_BOOL(buf) ((bool_t)IXDR_GET_LONG(buf)) #define IXDR_GET_ENUM(buf, t) ((t)IXDR_GET_LONG(buf)) -#define IXDR_GET_U_LONG(buf) ((u_long)IXDR_GET_LONG(buf)) +#define IXDR_GET_U_LONG(buf) ((unsigned long)IXDR_GET_LONG(buf)) #define IXDR_GET_SHORT(buf) ((short)IXDR_GET_LONG(buf)) -#define IXDR_GET_U_SHORT(buf) ((u_short)IXDR_GET_LONG(buf)) +#define IXDR_GET_U_SHORT(buf) ((unsigned short)IXDR_GET_LONG(buf)) #define IXDR_PUT_BOOL(buf, v) IXDR_PUT_LONG((buf), ((long)(v))) #define IXDR_PUT_ENUM(buf, v) IXDR_PUT_LONG((buf), ((long)(v))) @@ -238,29 +240,32 @@ struct xdr_discrim { __BEGIN_DECLS extern bool_t xdr_void(void); extern bool_t xdr_int(XDR *, int *); -extern bool_t xdr_u_int(XDR *, u_int *); +extern bool_t xdr_u_int(XDR *, unsigned int *); extern bool_t xdr_long(XDR *, long *); -extern bool_t xdr_u_long(XDR *, u_long *); +extern bool_t xdr_u_long(XDR *, unsigned long *); extern bool_t xdr_short(XDR *, short *); -extern bool_t xdr_u_short(XDR *, u_short *); +extern bool_t xdr_u_short(XDR *, unsigned short *); extern bool_t xdr_int16_t(XDR *, int16_t *); extern bool_t xdr_u_int16_t(XDR *, u_int16_t *); extern bool_t xdr_int32_t(XDR *, int32_t *); extern bool_t xdr_u_int32_t(XDR *, u_int32_t *); extern bool_t xdr_bool(XDR *, bool_t *); extern bool_t xdr_enum(XDR *, enum_t *); -extern bool_t xdr_array(XDR *, char **, u_int *, u_int, u_int, xdrproc_t); -extern bool_t xdr_bytes(XDR *, char **, u_int *, u_int); -extern bool_t xdr_opaque(XDR *, caddr_t, u_int); -extern bool_t xdr_string(XDR *, char **, u_int); -extern bool_t xdr_union(XDR *, enum_t *, char *, struct xdr_discrim *, xdrproc_t); +extern bool_t xdr_array(XDR *, char **, unsigned int *, unsigned int, + unsigned int, xdrproc_t); +extern bool_t xdr_bytes(XDR *, char **, unsigned int *, unsigned int); +extern bool_t xdr_opaque(XDR *, caddr_t, unsigned int); +extern bool_t xdr_string(XDR *, char **, unsigned int); +extern bool_t xdr_union(XDR *, enum_t *, char *, struct xdr_discrim *, + xdrproc_t); extern bool_t xdr_char(XDR *, char *); -extern bool_t xdr_u_char(XDR *, u_char *); -extern bool_t xdr_vector(XDR *, char *, u_int, u_int, xdrproc_t); +extern bool_t xdr_u_char(XDR *, unsigned char *); +extern bool_t xdr_vector(XDR *, char *, unsigned int, unsigned int, + xdrproc_t); extern bool_t xdr_float(XDR *, float *); extern bool_t xdr_double(XDR *, double *); -extern bool_t xdr_reference(XDR *, caddr_t *, u_int, xdrproc_t); -extern bool_t xdr_pointer(XDR *, caddr_t *, u_int, xdrproc_t); +extern bool_t xdr_reference(XDR *, caddr_t *, unsigned int, xdrproc_t); +extern bool_t xdr_pointer(XDR *, caddr_t *, unsigned int, xdrproc_t); extern bool_t xdr_wrapstring(XDR *, char **); extern void xdr_free(xdrproc_t, char *); __END_DECLS @@ -271,8 +276,8 @@ __END_DECLS */ #define MAX_NETOBJ_SZ 1024 struct netobj { - u_int n_len; - char *n_bytes; + unsigned int n_len; + char *n_bytes; }; typedef struct netobj netobj; extern bool_t xdr_netobj(XDR *, struct netobj *); @@ -283,7 +288,7 @@ extern bool_t xdr_netobj(XDR *, struct netobj *); */ __BEGIN_DECLS /* XDR using memory buffers */ -extern void xdrmem_create(XDR *, char *, u_int, enum xdr_op); +extern void xdrmem_create(XDR *, char *, unsigned int, enum xdr_op); #ifdef _STDIO_H_ /* XDR using stdio library */ @@ -291,7 +296,7 @@ extern void xdrstdio_create(XDR *, FILE *, enum xdr_op); #endif /* XDR pseudo records for tcp */ -extern void xdrrec_create(XDR *, u_int, u_int, char *, +extern void xdrrec_create(XDR *, unsigned int, unsigned int, char *, int (*)(caddr_t, caddr_t, int), int (*)(caddr_t, caddr_t, int)); diff --git a/include/rpcsvc/yp_prot.h b/include/rpcsvc/yp_prot.h index e9da4a32ebe..1a704451fdc 100644 --- a/include/rpcsvc/yp_prot.h +++ b/include/rpcsvc/yp_prot.h @@ -1,4 +1,4 @@ -/* $OpenBSD: yp_prot.h,v 1.7 2004/01/16 21:54:18 deraadt Exp $ */ +/* $OpenBSD: yp_prot.h,v 1.8 2004/01/22 21:48:02 espie Exp $ */ /* $NetBSD: yp_prot.h,v 1.6 1995/07/14 21:10:58 christos Exp $ */ /* @@ -66,19 +66,19 @@ */ #ifndef BOOL_DEFINED -typedef u_int bool; +typedef unsigned int bool; #define BOOL_DEFINED #endif /* Program and version symbols, magic numbers */ -#define YPPROG ((u_long)100004) -#define YPVERS ((u_long)2) -#define YPVERS_ORIG ((u_long)1) -#define YPMAXRECORD ((u_long)1024) -#define YPMAXDOMAIN ((u_long)64) -#define YPMAXMAP ((u_long)64) -#define YPMAXPEER ((u_long)256) +#define YPPROG ((unsigned long)100004) +#define YPVERS ((unsigned long)2) +#define YPVERS_ORIG ((unsigned long)1) +#define YPMAXRECORD ((unsigned long)1024) +#define YPMAXDOMAIN ((unsigned long)64) +#define YPMAXMAP ((unsigned long)64) +#define YPMAXPEER ((unsigned long)256) /* * I don't know if anything of sun's depends on this, or if they @@ -98,7 +98,7 @@ typedef struct { struct ypmap_parms { const char *domain; const char *map; - u_long ordernum; + unsigned long ordernum; char *owner; }; @@ -115,9 +115,9 @@ struct ypreq_nokey { struct ypreq_xfr { struct ypmap_parms map_parms; - u_long transid; - u_long proto; - u_short port; + unsigned long transid; + unsigned long proto; + unsigned short port; }; #define ypxfr_domain map_parms.domain #define ypxfr_map map_parms.map @@ -125,24 +125,24 @@ struct ypreq_xfr { #define ypxfr_owner map_parms.owner struct ypresp_val { - u_long status; + unsigned long status; datum valdat; }; struct ypresp_key_val { - u_long status; + unsigned long status; datum keydat; datum valdat; }; struct ypresp_master { - u_long status; + unsigned long status; char *master; }; struct ypresp_order { - u_long status; - u_long ordernum; + unsigned long status; + unsigned long ordernum; }; struct ypresp_all { @@ -158,23 +158,23 @@ struct ypmaplist { }; struct ypresp_maplist { - u_long status; + unsigned long status; struct ypmaplist *list; }; /* ypserv procedure numbers */ -#define YPPROC_NULL ((u_long)0) -#define YPPROC_DOMAIN ((u_long)1) -#define YPPROC_DOMAIN_NONACK ((u_long)2) -#define YPPROC_MATCH ((u_long)3) -#define YPPROC_FIRST ((u_long)4) -#define YPPROC_NEXT ((u_long)5) -#define YPPROC_XFR ((u_long)6) -#define YPPROC_CLEAR ((u_long)7) -#define YPPROC_ALL ((u_long)8) -#define YPPROC_MASTER ((u_long)9) -#define YPPROC_ORDER ((u_long)10) -#define YPPROC_MAPLIST ((u_long)11) +#define YPPROC_NULL ((unsigned long)0) +#define YPPROC_DOMAIN ((unsigned long)1) +#define YPPROC_DOMAIN_NONACK ((unsigned long)2) +#define YPPROC_MATCH ((unsigned long)3) +#define YPPROC_FIRST ((unsigned long)4) +#define YPPROC_NEXT ((unsigned long)5) +#define YPPROC_XFR ((unsigned long)6) +#define YPPROC_CLEAR ((unsigned long)7) +#define YPPROC_ALL ((unsigned long)8) +#define YPPROC_MASTER ((unsigned long)9) +#define YPPROC_ORDER ((unsigned long)10) +#define YPPROC_MAPLIST ((unsigned long)11) /* ypserv procedure return status values */ #define YP_TRUE ((unsigned long)1) /* general purpose success code */ @@ -205,10 +205,10 @@ struct dom_binding { struct dom_binding *dom_pnext; char dom_domain[YPMAXDOMAIN + 1]; struct sockaddr_in dom_server_addr; - u_short dom_server_port; + unsigned short dom_server_port; int dom_socket; CLIENT *dom_client; - u_short dom_local_port; + unsigned short dom_local_port; long dom_vers; }; @@ -226,14 +226,14 @@ struct dom_binding { * used by ypset. */ -#define YPBINDPROG ((u_long)100007) -#define YPBINDVERS ((u_long)2) -#define YPBINDVERS_ORIG ((u_long)1) +#define YPBINDPROG ((unsigned long)100007) +#define YPBINDVERS ((unsigned long)2) +#define YPBINDVERS_ORIG ((unsigned long)1) /* ypbind procedure numbers */ -#define YPBINDPROC_NULL ((u_long)0) -#define YPBINDPROC_DOMAIN ((u_long)1) -#define YPBINDPROC_SETDOM ((u_long)2) +#define YPBINDPROC_NULL ((unsigned long)0) +#define YPBINDPROC_DOMAIN ((unsigned long)1) +#define YPBINDPROC_SETDOM ((unsigned long)2) /* error code in ypbind_resp.ypbind_status */ enum ypbind_resptype { @@ -244,13 +244,13 @@ enum ypbind_resptype { /* network order, of course */ struct ypbind_binding { struct in_addr ypbind_binding_addr; - u_short ypbind_binding_port; + unsigned short ypbind_binding_port; }; struct ypbind_resp { enum ypbind_resptype ypbind_status; union { - u_long ypbind_error; + unsigned long ypbind_error; struct ypbind_binding ypbind_bindinfo; } ypbind_respbody; }; @@ -266,7 +266,7 @@ struct ypbind_resp { struct ypbind_setdom { char ypsetdom_domain[YPMAXDOMAIN + 1]; struct ypbind_binding ypsetdom_binding; - u_short ypsetdom_vers; + unsigned short ypsetdom_vers; }; #define ypsetdom_addr ypsetdom_binding.ypbind_binding_addr #define ypsetdom_port ypsetdom_binding.ypbind_binding_port @@ -283,16 +283,16 @@ struct ypbind_setdom { * This protocol is not implemented, naturally, because this YP * implementation only does the client side. */ -#define YPPUSHVERS ((u_long)1) -#define YPPUSHVERS_ORIG ((u_long)1) +#define YPPUSHVERS ((unsigned long)1) +#define YPPUSHVERS_ORIG ((unsigned long)1) /* yppush procedure numbers */ -#define YPPUSHPROC_NULL ((u_long)0) -#define YPPUSHPROC_XFRRESP ((u_long)1) +#define YPPUSHPROC_NULL ((unsigned long)0) +#define YPPUSHPROC_XFRRESP ((unsigned long)1) struct yppushresp_xfr { - u_long transid; - u_long status; + unsigned long transid; + unsigned long status; }; /* yppush status value in yppushresp_xfr.status */ @@ -329,7 +329,7 @@ bool_t xdr_ypresp_val(XDR *, struct ypresp_val *); bool_t xdr_ypbind_setdom(XDR *, struct ypbind_setdom *); bool_t xdr_ypresp_key_val(XDR *, struct ypresp_key_val *); bool_t xdr_ypresp_all(XDR *, struct ypresp_all *); -bool_t xdr_ypresp_all_seq(XDR *, u_long *); +bool_t xdr_ypresp_all_seq(XDR *, unsigned long *); bool_t xdr_ypresp_master(XDR *, struct ypresp_master *); bool_t xdr_ypmaplist_str(XDR *, char *); bool_t xdr_ypmaplist(XDR *, struct ypmaplist *); diff --git a/include/rpcsvc/ypclnt.h b/include/rpcsvc/ypclnt.h index 19448431c94..f271e5c6246 100644 --- a/include/rpcsvc/ypclnt.h +++ b/include/rpcsvc/ypclnt.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ypclnt.h,v 1.8 2004/01/16 21:54:18 deraadt Exp $ */ +/* $OpenBSD: ypclnt.h,v 1.9 2004/01/22 21:48:02 espie Exp $ */ /* $NetBSD: ypclnt.h,v 1.7 1995/07/14 21:11:10 christos Exp $ */ /* @@ -57,7 +57,7 @@ struct ypall_callback { /* return non-0 to stop getting called */ - int (*foreach)(u_long, char *, int, char *, int, void *); + int (*foreach)(unsigned long, char *, int, char *, int, void *); char *data; /* opaque pointer for use of callback fn */ }; diff --git a/include/sha1.h b/include/sha1.h index f6bb73d04ab..857108e0026 100644 --- a/include/sha1.h +++ b/include/sha1.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sha1.h,v 1.15 2003/10/07 22:17:27 avsm Exp $ */ +/* $OpenBSD: sha1.h,v 1.16 2004/01/22 21:48:02 espie Exp $ */ /* * SHA-1 in C @@ -12,25 +12,25 @@ typedef struct { u_int32_t state[5]; u_int32_t count[2]; - u_char buffer[64]; + unsigned char buffer[64]; } SHA1_CTX; #include <sys/cdefs.h> __BEGIN_DECLS -void SHA1Transform(u_int32_t state[5], const u_char buffer[64]) +void SHA1Transform(u_int32_t [5], const unsigned char [64]) __attribute__((__bounded__(__minbytes__,1,5))) __attribute__((__bounded__(__minbytes__,2,64))); -void SHA1Init(SHA1_CTX *context); -void SHA1Update(SHA1_CTX *context, const u_char *data, u_int len) +void SHA1Init(SHA1_CTX *); +void SHA1Update(SHA1_CTX *, const unsigned char *, unsigned int) __attribute__((__bounded__(__string__,2,3))); -void SHA1Final(u_char digest[20], SHA1_CTX *context) +void SHA1Final(unsigned char [20], SHA1_CTX *) __attribute__((__bounded__(__minbytes__,1,20))); char *SHA1End(SHA1_CTX *, char *) __attribute__((__bounded__(__minbytes__,2,41))); char *SHA1File(char *, char *) __attribute__((__bounded__(__minbytes__,2,41))); -char *SHA1Data(const u_char *, size_t, char *) +char *SHA1Data(const unsigned char *, size_t, char *) __attribute__((__bounded__(__string__,1,2))) __attribute__((__bounded__(__minbytes__,3,41))); __END_DECLS |