Apparently a recent round of vandalism by the C++ standards committee

includes disallowing the standard and historic type name "unsigned". Add
a gratuitous "int" to recent changes.

C++ is really a blight on the world.
This commit is contained in:
dholland 2016-01-23 01:26:14 +00:00
parent cd48b72d19
commit 398f572480
9 changed files with 48 additions and 46 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ifaddrs.h,v 1.6 2016/01/22 21:55:57 dholland Exp $ */ /* $NetBSD: ifaddrs.h,v 1.7 2016/01/23 01:26:14 dholland Exp $ */
/* /*
* Copyright (c) 1995, 1999 * Copyright (c) 1995, 1999
@ -31,7 +31,7 @@
struct ifaddrs { struct ifaddrs {
struct ifaddrs *ifa_next; struct ifaddrs *ifa_next;
char *ifa_name; char *ifa_name;
unsigned ifa_flags; unsigned int ifa_flags;
struct sockaddr *ifa_addr; struct sockaddr *ifa_addr;
struct sockaddr *ifa_netmask; struct sockaddr *ifa_netmask;
struct sockaddr *ifa_dstaddr; struct sockaddr *ifa_dstaddr;

View File

@ -1,4 +1,4 @@
/* $NetBSD: link_aout.h,v 1.22 2016/01/22 21:55:57 dholland Exp $ */ /* $NetBSD: link_aout.h,v 1.23 2016/01/23 01:26:14 dholland Exp $ */
/*- /*-
* Copyright (c) 1998 The NetBSD Foundation, Inc. * Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -52,7 +52,7 @@
struct sod { /* Shared Object Descriptor */ struct sod { /* Shared Object Descriptor */
long sod_name; /* name (relative to load address) */ long sod_name; /* name (relative to load address) */
unsigned sod_library : 1, /* Searched for by library rules */ unsigned int sod_library : 1, /* Searched for by library rules */
sod_reserved : 31; sod_reserved : 31;
short sod_major; /* major version number */ short sod_major; /* major version number */
short sod_minor; /* minor version number */ short sod_minor; /* minor version number */
@ -71,7 +71,7 @@ struct so_map { /* Shared Object Map */
struct so_map *som_next; /* Next map in chain */ struct so_map *som_next; /* Next map in chain */
struct sod *som_sod; /* Sod responsible for this map */ struct sod *som_sod; /* Sod responsible for this map */
caddr_t som_sodbase; /* Base address of this sod */ caddr_t som_sodbase; /* Base address of this sod */
unsigned som_write : 1; /* Text is currently writable */ unsigned int som_write : 1; /* Text is currently writable */
struct _dynamic *som_dynamic; /* _dynamic structure */ struct _dynamic *som_dynamic; /* _dynamic structure */
caddr_t som_spd; /* Private data */ caddr_t som_spd; /* Private data */
}; };

View File

@ -1,4 +1,4 @@
/* $NetBSD: login_cap.h,v 1.12 2016/01/22 21:55:57 dholland Exp $ */ /* $NetBSD: login_cap.h,v 1.13 2016/01/23 01:26:14 dholland Exp $ */
/*- /*-
* Copyright (c) 1995,1997 Berkeley Software Design, Inc. All rights reserved. * Copyright (c) 1995,1997 Berkeley Software Design, Inc. All rights reserved.
@ -73,15 +73,15 @@ login_cap_t *login_getpwclass(const struct passwd *)
__RENAME(__login_getpwclass50); __RENAME(__login_getpwclass50);
#endif #endif
void login_close(login_cap_t *); void login_close(login_cap_t *);
int login_getcapbool(login_cap_t *, const char *, unsigned); int login_getcapbool(login_cap_t *, const char *, unsigned int);
quad_t login_getcapnum(login_cap_t *, const char *, quad_t, quad_t); quad_t login_getcapnum(login_cap_t *, const char *, quad_t, quad_t);
quad_t login_getcapsize(login_cap_t *, const char *, quad_t, quad_t); quad_t login_getcapsize(login_cap_t *, const char *, quad_t, quad_t);
char *login_getcapstr(login_cap_t *, const char *, char *, char *); char *login_getcapstr(login_cap_t *, const char *, char *, char *);
quad_t login_getcaptime(login_cap_t *, const char *, quad_t, quad_t); quad_t login_getcaptime(login_cap_t *, const char *, quad_t, quad_t);
int setclasscontext(const char *, unsigned); int setclasscontext(const char *, unsigned int);
#ifndef __LIBC12_SOURCE__ #ifndef __LIBC12_SOURCE__
int setusercontext(login_cap_t *, struct passwd *, uid_t, unsigned) int setusercontext(login_cap_t *, struct passwd *, uid_t, unsigned int)
__RENAME(__setusercontext50); __RENAME(__setusercontext50);
#endif #endif
void setuserpath(login_cap_t *, const char *, envfunc_t, void *); void setuserpath(login_cap_t *, const char *, envfunc_t, void *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: nsswitch.h,v 1.22 2016/01/22 21:55:57 dholland Exp $ */ /* $NetBSD: nsswitch.h,v 1.23 2016/01/23 01:26:14 dholland Exp $ */
/*- /*-
* Copyright (c) 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc. * Copyright (c) 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc.
@ -175,8 +175,8 @@ typedef struct {
* nss_module_unregister_fn - module un-registration function * nss_module_unregister_fn - module un-registration function
* called at module unload * called at module unload
*/ */
typedef void (*nss_module_unregister_fn)(ns_mtab *, unsigned); typedef void (*nss_module_unregister_fn)(ns_mtab *, unsigned int);
typedef ns_mtab *(*nss_module_register_fn)(const char *, unsigned *, typedef ns_mtab *(*nss_module_register_fn)(const char *, unsigned int *,
nss_module_unregister_fn *); nss_module_unregister_fn *);
#ifdef _NS_PRIVATE #ifdef _NS_PRIVATE
@ -193,7 +193,7 @@ typedef ns_mtab *(*nss_module_register_fn)(const char *, unsigned *,
typedef struct { typedef struct {
const char *name; /* name of database */ const char *name; /* name of database */
ns_src *srclist; /* list of sources */ ns_src *srclist; /* list of sources */
unsigned srclistsize; /* size of srclist */ unsigned int srclistsize; /* size of srclist */
} ns_dbt; } ns_dbt;
/* /*
@ -203,7 +203,7 @@ typedef struct {
const char *name; /* module name */ const char *name; /* module name */
void *handle; /* handle from dlopen() */ void *handle; /* handle from dlopen() */
ns_mtab *mtab; /* method table */ ns_mtab *mtab; /* method table */
unsigned mtabsize; /* size of mtab */ unsigned int mtabsize; /* size of mtab */
/* called to unload module */ /* called to unload module */
nss_module_unregister_fn unregister; nss_module_unregister_fn unregister;
} ns_mod; } ns_mod;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci.h,v 1.7 2016/01/22 22:22:48 dholland Exp $ */ /* $NetBSD: pci.h,v 1.8 2016/01/23 01:26:14 dholland Exp $ */
/* /*
* Copyright 2001 Wasabi Systems, Inc. * Copyright 2001 Wasabi Systems, Inc.
@ -48,18 +48,20 @@
typedef uint32_t pcireg_t; /* XXX */ typedef uint32_t pcireg_t; /* XXX */
/* pci_bus.c */ /* pci_bus.c */
int pcibus_conf_read(int, unsigned, unsigned, unsigned, unsigned, pcireg_t *); int pcibus_conf_read(int, unsigned int, unsigned int, unsigned int,
int pcibus_conf_write(int, unsigned, unsigned, unsigned, unsigned, pcireg_t); unsigned int, pcireg_t *);
int pcibus_conf_write(int, unsigned int, unsigned int, unsigned int,
unsigned int, pcireg_t);
/* pci_device.c */ /* pci_device.c */
int pcidev_conf_read(int, unsigned, pcireg_t *); int pcidev_conf_read(int, unsigned int, pcireg_t *);
int pcidev_conf_write(int, unsigned, pcireg_t); int pcidev_conf_write(int, unsigned int, pcireg_t);
/* pci_drvname.c */ /* pci_drvname.c */
int pci_drvname(int, unsigned, unsigned, char *, size_t); int pci_drvname(int, unsigned int, unsigned int, char *, size_t);
/* pci_subr.c */ /* pci_subr.c */
void pci_devinfo(pcireg_t, pcireg_t, int, char *, size_t); void pci_devinfo(pcireg_t, pcireg_t, int, char *, size_t);
void pci_conf_print(int, unsigned, unsigned, unsigned); void pci_conf_print(int, unsigned int, unsigned int, unsigned int);
#endif /* _PCI_H_ */ #endif /* _PCI_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: direntry.h,v 1.8 2016/01/22 22:53:36 dholland Exp $ */ /* $NetBSD: direntry.h,v 1.9 2016/01/23 01:26:14 dholland Exp $ */
/*- /*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@ -130,11 +130,11 @@ struct winentry {
struct dirent; struct dirent;
void unix2dostime(const struct timespec *tsp, int gmtoff, uint16_t *ddp, void unix2dostime(const struct timespec *tsp, int gmtoff, uint16_t *ddp,
uint16_t *dtp, uint8_t *dhp); uint16_t *dtp, uint8_t *dhp);
void dos2unixtime(unsigned dd, unsigned dt, unsigned dh, int gmtoff, void dos2unixtime(unsigned int dd, unsigned int dt, unsigned int dh,
struct timespec *tsp); int gmtoff, struct timespec *tsp);
int dos2unixfn(unsigned char dn[11], unsigned char *un, int lower); int dos2unixfn(unsigned char dn[11], unsigned char *un, int lower);
int unix2dosfn(const unsigned char *un, unsigned char dn[12], int unlen, int unix2dosfn(const unsigned char *un, unsigned char dn[12], int unlen,
unsigned gen); unsigned int gen);
int unix2winfn(const unsigned char *un, int unlen, struct winentry *wep, int unix2winfn(const unsigned char *un, int unlen, struct winentry *wep,
int cnt, int chksum); int cnt, int chksum);
int winChkName(const unsigned char *un, int unlen, struct winentry *wep, int winChkName(const unsigned char *un, int unlen, struct winentry *wep,

View File

@ -1,4 +1,4 @@
/* $NetBSD: envsys.h,v 1.35 2016/01/22 23:33:42 dholland Exp $ */ /* $NetBSD: envsys.h,v 1.36 2016/01/23 01:26:14 dholland Exp $ */
/*- /*-
* Copyright (c) 1999, 2007, 2014 The NetBSD Foundation, Inc. * Copyright (c) 1999, 2007, 2014 The NetBSD Foundation, Inc.
@ -127,7 +127,7 @@ enum envsys_indicator_states {
/* get sensor data */ /* get sensor data */
struct envsys_tre_data { struct envsys_tre_data {
unsigned sensor; unsigned int sensor;
union { /* all data is given */ union { /* all data is given */
uint32_t data_us; /* in microKelvins, */ uint32_t data_us; /* in microKelvins, */
int32_t data_s; /* rpms, volts, amps, */ int32_t data_s; /* rpms, volts, amps, */
@ -136,7 +136,7 @@ struct envsys_tre_data {
uint32_t warnflags; /* warning flags */ uint32_t warnflags; /* warning flags */
uint32_t validflags; /* sensor valid flags */ uint32_t validflags; /* sensor valid flags */
unsigned units; /* type of sensor */ unsigned int units; /* type of sensor */
}; };
typedef struct envsys_tre_data envsys_tre_data_t; typedef struct envsys_tre_data envsys_tre_data_t;
@ -184,11 +184,11 @@ static const char * const envsysdrivestatus[] = {
/* set and check sensor info */ /* set and check sensor info */
struct envsys_basic_info { struct envsys_basic_info {
unsigned sensor; /* sensor number */ unsigned int sensor; /* sensor number */
unsigned units; /* type of sensor */ unsigned int units; /* type of sensor */
char desc[33]; /* sensor description */ char desc[33]; /* sensor description */
unsigned rfact; /* for volts, (int)(factor x 10^4) */ unsigned int rfact; /* for volts, (int)(factor x 10^4) */
unsigned rpms; /* for fans, set nominal RPMs */ unsigned int rpms; /* for fans, set nominal RPMs */
uint32_t validflags; /* sensor valid flags */ uint32_t validflags; /* sensor valid flags */
}; };
typedef struct envsys_basic_info envsys_basic_info_t; typedef struct envsys_basic_info envsys_basic_info_t;

View File

@ -1,4 +1,4 @@
/* $NetBSD: fdio.h,v 1.5 2016/01/22 23:35:18 dholland Exp $ */ /* $NetBSD: fdio.h,v 1.6 2016/01/23 01:26:14 dholland Exp $ */
/*- /*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -46,7 +46,7 @@ enum fdformat_result {
#define FDFORMAT_VERSION 19961120 #define FDFORMAT_VERSION 19961120
struct fdformat_cmd { struct fdformat_cmd {
unsigned formatcmd_version; /* FDFORMAT_VERSION */ unsigned int formatcmd_version; /* FDFORMAT_VERSION */
int head; /* IN */ int head; /* IN */
int cylinder; /* IN */ int cylinder; /* IN */
}; };
@ -54,20 +54,20 @@ struct fdformat_cmd {
struct fdformat_parms { struct fdformat_parms {
/* list of items taken from i386 formatting glop (NEC 765); /* list of items taken from i386 formatting glop (NEC 765);
should be made the union of support needed for other devices. */ should be made the union of support needed for other devices. */
unsigned fdformat_version; /* rev this when needed; write drivers to unsigned int fdformat_version;/* rev this when needed; write drivers to
allow forward compatibility, please, allow forward compatibility, please,
and add elements to the end of the and add elements to the end of the
structure */ structure */
unsigned nbps; /* number of bytes per sector */ unsigned int nbps; /* number of bytes per sector */
unsigned ncyl; /* number of cylinders */ unsigned int ncyl; /* number of cylinders */
unsigned nspt; /* sectors per track */ unsigned int nspt; /* sectors per track */
unsigned ntrk; /* number of heads/tracks per cyl */ unsigned int ntrk; /* number of heads/tracks per cyl */
unsigned stepspercyl; /* steps per cylinder */ unsigned int stepspercyl; /* steps per cylinder */
unsigned gaplen; /* formatting gap length */ unsigned int gaplen; /* formatting gap length */
unsigned fillbyte; /* formatting fill byte */ unsigned int fillbyte; /* formatting fill byte */
unsigned xfer_rate; /* in bits per second; driver unsigned int xfer_rate; /* in bits per second; driver
must convert */ must convert */
unsigned interleave; /* interleave factor */ unsigned int interleave; /* interleave factor */
}; };

View File

@ -1,4 +1,4 @@
/* $NetBSD: wdog.h,v 1.4 2016/01/22 23:47:04 dholland Exp $ */ /* $NetBSD: wdog.h,v 1.5 2016/01/23 01:26:14 dholland Exp $ */
/*- /*-
* Copyright (c) 2000 Zembu Labs, Inc. * Copyright (c) 2000 Zembu Labs, Inc.
@ -48,7 +48,7 @@
struct wdog_mode { struct wdog_mode {
char wm_name[WDOG_NAMESIZE]; char wm_name[WDOG_NAMESIZE];
int wm_mode; /* timer mode */ int wm_mode; /* timer mode */
unsigned wm_period; /* timer period (seconds) */ unsigned int wm_period; /* timer period (seconds) */
}; };
/* /*