Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Apparently a recent round of vandalism by the C++ standards ...



details:   https://anonhg.NetBSD.org/src/rev/6d514ca92dfd
branches:  trunk
changeset: 343124:6d514ca92dfd
user:      dholland <dholland%NetBSD.org@localhost>
date:      Sat Jan 23 01:26:14 2016 +0000

description:
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.

diffstat:

 include/ifaddrs.h         |   4 ++--
 include/link_aout.h       |   6 +++---
 include/login_cap.h       |   8 ++++----
 include/nsswitch.h        |  10 +++++-----
 lib/libpci/pci.h          |  16 +++++++++-------
 sys/fs/msdosfs/direntry.h |   8 ++++----
 sys/sys/envsys.h          |  14 +++++++-------
 sys/sys/fdio.h            |  24 ++++++++++++------------
 sys/sys/wdog.h            |   4 ++--
 9 files changed, 48 insertions(+), 46 deletions(-)

diffs (281 lines):

diff -r e63f54cd5b71 -r 6d514ca92dfd include/ifaddrs.h
--- a/include/ifaddrs.h Sat Jan 23 01:15:23 2016 +0000
+++ b/include/ifaddrs.h Sat Jan 23 01:26:14 2016 +0000
@@ -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
@@ -31,7 +31,7 @@
 struct ifaddrs {
        struct ifaddrs  *ifa_next;
        char            *ifa_name;
-       unsigned         ifa_flags;
+       unsigned int     ifa_flags;
        struct sockaddr *ifa_addr;
        struct sockaddr *ifa_netmask;
        struct sockaddr *ifa_dstaddr;
diff -r e63f54cd5b71 -r 6d514ca92dfd include/link_aout.h
--- a/include/link_aout.h       Sat Jan 23 01:15:23 2016 +0000
+++ b/include/link_aout.h       Sat Jan 23 01:26:14 2016 +0000
@@ -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.
@@ -52,7 +52,7 @@
 
 struct sod {   /* Shared Object Descriptor */
        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;
        short   sod_major;              /* major version number */
        short   sod_minor;              /* minor version number */
@@ -71,7 +71,7 @@
        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 */
-       unsigned        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 -r e63f54cd5b71 -r 6d514ca92dfd include/login_cap.h
--- a/include/login_cap.h       Sat Jan 23 01:15:23 2016 +0000
+++ b/include/login_cap.h       Sat Jan 23 01:26:14 2016 +0000
@@ -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.
@@ -73,15 +73,15 @@
     __RENAME(__login_getpwclass50);
 #endif
 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_getcapsize(login_cap_t *, const char *, quad_t, quad_t);
 char   *login_getcapstr(login_cap_t *, const char *, char *, char *);
 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__
-int    setusercontext(login_cap_t *, struct passwd *, uid_t, unsigned)
+int    setusercontext(login_cap_t *, struct passwd *, uid_t, unsigned int)
     __RENAME(__setusercontext50);
 #endif
 void   setuserpath(login_cap_t *, const char *, envfunc_t, void *);
diff -r e63f54cd5b71 -r 6d514ca92dfd include/nsswitch.h
--- a/include/nsswitch.h        Sat Jan 23 01:15:23 2016 +0000
+++ b/include/nsswitch.h        Sat Jan 23 01:26:14 2016 +0000
@@ -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.
@@ -175,8 +175,8 @@
  * nss_module_unregister_fn - module un-registration function
  *     called at module unload
  */
-typedef        void (*nss_module_unregister_fn)(ns_mtab *, unsigned);
-typedef        ns_mtab *(*nss_module_register_fn)(const char *, unsigned *,
+typedef        void (*nss_module_unregister_fn)(ns_mtab *, unsigned int);
+typedef        ns_mtab *(*nss_module_register_fn)(const char *, unsigned int *,
                                           nss_module_unregister_fn *);
 
 #ifdef _NS_PRIVATE
@@ -193,7 +193,7 @@
 typedef struct {
        const char      *name;          /* name of database */
        ns_src          *srclist;       /* list of sources */
-       unsigned         srclistsize;   /* size of srclist */
+       unsigned int     srclistsize;   /* size of srclist */
 } ns_dbt;
 
 /*
@@ -203,7 +203,7 @@
        const char      *name;          /* module name */
        void            *handle;        /* handle from dlopen() */
        ns_mtab         *mtab;          /* method table */
-       unsigned         mtabsize;      /* size of mtab */
+       unsigned int     mtabsize;      /* size of mtab */
                                        /* called to unload module */
        nss_module_unregister_fn unregister;
 } ns_mod;
diff -r e63f54cd5b71 -r 6d514ca92dfd lib/libpci/pci.h
--- a/lib/libpci/pci.h  Sat Jan 23 01:15:23 2016 +0000
+++ b/lib/libpci/pci.h  Sat Jan 23 01:26:14 2016 +0000
@@ -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.
@@ -48,18 +48,20 @@
 typedef uint32_t pcireg_t;     /* XXX */
 
 /* pci_bus.c */
-int    pcibus_conf_read(int, unsigned, unsigned, unsigned, unsigned, pcireg_t *);
-int    pcibus_conf_write(int, unsigned, unsigned, unsigned, unsigned, pcireg_t);
+int    pcibus_conf_read(int, unsigned int, unsigned int, unsigned int,
+               unsigned int, pcireg_t *);
+int    pcibus_conf_write(int, unsigned int, unsigned int, unsigned int,
+               unsigned int, pcireg_t);
 
 /* pci_device.c */
-int    pcidev_conf_read(int, unsigned, pcireg_t *);
-int    pcidev_conf_write(int, unsigned, pcireg_t);
+int    pcidev_conf_read(int, unsigned int, pcireg_t *);
+int    pcidev_conf_write(int, unsigned int, pcireg_t);
 
 /* 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 */
 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_ */
diff -r e63f54cd5b71 -r 6d514ca92dfd sys/fs/msdosfs/direntry.h
--- a/sys/fs/msdosfs/direntry.h Sat Jan 23 01:15:23 2016 +0000
+++ b/sys/fs/msdosfs/direntry.h Sat Jan 23 01:26:14 2016 +0000
@@ -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.
@@ -130,11 +130,11 @@
 struct dirent;
 void   unix2dostime(const struct timespec *tsp, int gmtoff, uint16_t *ddp,
            uint16_t *dtp, uint8_t *dhp);
-void   dos2unixtime(unsigned dd, unsigned dt, unsigned dh, int gmtoff,
-           struct timespec *tsp);
+void   dos2unixtime(unsigned int dd, unsigned int dt, unsigned int dh,
+           int gmtoff, struct timespec *tsp);
 int    dos2unixfn(unsigned char dn[11], unsigned char *un, int lower);
 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 cnt, int chksum);
 int    winChkName(const unsigned char *un, int unlen, struct winentry *wep,
diff -r e63f54cd5b71 -r 6d514ca92dfd sys/sys/envsys.h
--- a/sys/sys/envsys.h  Sat Jan 23 01:15:23 2016 +0000
+++ b/sys/sys/envsys.h  Sat Jan 23 01:26:14 2016 +0000
@@ -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.
@@ -127,7 +127,7 @@
 /* get sensor data */
 
 struct envsys_tre_data {
-       unsigned sensor;
+       unsigned int sensor;
        union {                         /* all data is given */
                uint32_t data_us;       /* in microKelvins, */
                int32_t data_s;         /* rpms, volts, amps, */
@@ -136,7 +136,7 @@
 
        uint32_t        warnflags;      /* warning 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;
 
@@ -184,11 +184,11 @@
 /* set and check sensor info */
 
 struct envsys_basic_info {
-       unsigned sensor;        /* sensor number */
-       unsigned units;         /* type of sensor */
+       unsigned int sensor;    /* sensor number */
+       unsigned int units;     /* type of sensor */
        char    desc[33];       /* sensor description */
-       unsigned rfact;         /* for volts, (int)(factor x 10^4) */
-       unsigned rpms;          /* for fans, set nominal RPMs */
+       unsigned int rfact;     /* for volts, (int)(factor x 10^4) */
+       unsigned int rpms;      /* for fans, set nominal RPMs */
        uint32_t validflags;    /* sensor valid flags */
 };
 typedef struct envsys_basic_info envsys_basic_info_t;
diff -r e63f54cd5b71 -r 6d514ca92dfd sys/sys/fdio.h
--- a/sys/sys/fdio.h    Sat Jan 23 01:15:23 2016 +0000
+++ b/sys/sys/fdio.h    Sat Jan 23 01:26:14 2016 +0000
@@ -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.
@@ -46,7 +46,7 @@
 #define FDFORMAT_VERSION 19961120
 
 struct fdformat_cmd {
-       unsigned formatcmd_version;     /* FDFORMAT_VERSION */
+       unsigned int formatcmd_version; /* FDFORMAT_VERSION */
        int head;               /* IN */
        int cylinder;           /* IN */
 };
@@ -54,20 +54,20 @@
 struct fdformat_parms {
 /* list of items taken from i386 formatting glop (NEC 765);
    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,
                                   and add elements to the end of the
                                   structure */
-    unsigned nbps;                     /* number of bytes per sector */
-    unsigned ncyl;                     /* number of cylinders */
-    unsigned nspt;                     /* sectors per track */
-    unsigned ntrk;                     /* number of heads/tracks per cyl */
-    unsigned stepspercyl;              /* steps per cylinder */
-    unsigned gaplen;                   /* formatting gap length */
-    unsigned fillbyte;                 /* formatting fill byte */
-    unsigned xfer_rate;                        /* in bits per second; driver
+    unsigned int nbps;                 /* number of bytes per sector */
+    unsigned int ncyl;                 /* number of cylinders */
+    unsigned int nspt;                 /* sectors per track */
+    unsigned int ntrk;                 /* number of heads/tracks per cyl */
+    unsigned int stepspercyl;          /* steps per cylinder */
+    unsigned int gaplen;               /* formatting gap length */
+    unsigned int fillbyte;             /* formatting fill byte */
+    unsigned int xfer_rate;            /* in bits per second; driver
                                           must convert */
-    unsigned interleave;               /* interleave factor */
+    unsigned int interleave;           /* interleave factor */
 };
 
 
diff -r e63f54cd5b71 -r 6d514ca92dfd sys/sys/wdog.h
--- a/sys/sys/wdog.h    Sat Jan 23 01:15:23 2016 +0000
+++ b/sys/sys/wdog.h    Sat Jan 23 01:26:14 2016 +0000
@@ -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.
@@ -48,7 +48,7 @@
 struct wdog_mode {
        char wm_name[WDOG_NAMESIZE];
        int wm_mode;            /* timer mode */
-       unsigned wm_period;     /* timer period (seconds) */
+       unsigned int wm_period; /* timer period (seconds) */
 };
 
 /*



Home | Main Index | Thread Index | Old Index