Check-in [ef57276d7c]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Updated patch for NetBSD compiler, from NixOS project
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ef57276d7c35e798aa75b7706c52dfbbc6932ba7
User & Date: rkeene 2019-05-09 23:10:31
Context
2019-05-09
23:10
Make sure when overwriting files we have permission to do so check-in: 019ff6c17d user: rkeene tags: trunk
23:10
Updated patch for NetBSD compiler, from NixOS project check-in: ef57276d7c user: rkeene tags: trunk
2019-05-08
21:57
NetBSD 8 requires some ctype work check-in: 22acd7c457 user: rkeene tags: trunk
Changes

Changes to patches/gcc/gcc-9.1.0-netbsdctypes.diff.

            1  +Fix NetBSD ctypes, from Nix:
            2  +    https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/compilers/gcc
     1      3   diff -uNr gcc-9.1.0.orig/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h gcc-9.1.0-netbsdctypes/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h
     2      4   --- gcc-9.1.0.orig/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h	2019-01-01 06:31:55.000000000 -0600
     3         -+++ gcc-9.1.0-netbsdctypes/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h	2019-05-08 16:44:07.429830428 -0500
     4         -@@ -45,7 +45,7 @@
            5  ++++ gcc-9.1.0-netbsdctypes/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h	2019-05-09 14:50:54.011379165 -0500
            6  +@@ -38,40 +38,46 @@
            7  +   /// @brief  Base class for ctype.
            8  +   struct ctype_base
            9  +   {
           10  +-    // Non-standard typedefs.
           11  +-    typedef const unsigned char*	__to_type;
           12  + 
           13  +     // NB: Offsets into ctype<char>::_M_table force a particular size
     5     14        // on the mask type. Because of this, we don't use an enum.
     6         -     typedef unsigned char      	mask;
           15  +-    typedef unsigned char      	mask;
           16  + 
           17  + #ifndef _CTYPE_U
           18  +-    static const mask upper    	= _U;
           19  +-    static const mask lower 	= _L;
           20  +-    static const mask alpha 	= _U | _L;
           21  +-    static const mask digit 	= _N;
           22  +-    static const mask xdigit 	= _N | _X;
           23  +-    static const mask space 	= _S;
           24  +-    static const mask print 	= _P | _U | _L | _N | _B;
           25  +-    static const mask graph 	= _P | _U | _L | _N;
           26  +-    static const mask cntrl 	= _C;
           27  +-    static const mask punct 	= _P;
           28  +-    static const mask alnum 	= _U | _L | _N;
           29  ++    // Non-standard typedefs.
           30  ++    typedef const unsigned char*	__to_type;
           31  ++
           32  ++    typedef unsigned char	mask;
           33  ++
           34  ++    static const mask upper	= _U;
           35  ++    static const mask lower	= _L;
           36  ++    static const mask alpha	= _U | _L;
           37  ++    static const mask digit	= _N;
           38  ++    static const mask xdigit	= _N | _X;
           39  ++    static const mask space	= _S;
           40  ++    static const mask print	= _P | _U | _L | _N | _B;
           41  ++    static const mask graph	= _P | _U | _L | _N;
           42  ++    static const mask cntrl	= _C;
           43  ++    static const mask punct	= _P;
           44  ++    static const mask alnum	= _U | _L | _N;
           45  + #else
           46  +-    static const mask upper    	= _CTYPE_U;
           47  +-    static const mask lower 	= _CTYPE_L;
           48  +-    static const mask alpha 	= _CTYPE_U | _CTYPE_L;
           49  +-    static const mask digit 	= _CTYPE_N;
           50  +-    static const mask xdigit 	= _CTYPE_N | _CTYPE_X;
           51  +-    static const mask space 	= _CTYPE_S;
           52  +-    static const mask print 	= _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_N | _CTYPE_B;
           53  +-    static const mask graph 	= _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_N;
           54  +-    static const mask cntrl 	= _CTYPE_C;
           55  +-    static const mask punct 	= _CTYPE_P;
           56  +-    static const mask alnum 	= _CTYPE_U | _CTYPE_L | _CTYPE_N;
           57  ++    typedef const unsigned short*	__to_type;
           58  ++
           59  ++    typedef unsigned short	mask;
           60  ++
           61  ++    static const mask upper	= _CTYPE_U;
           62  ++    static const mask lower	= _CTYPE_L;
           63  ++    static const mask alpha	= _CTYPE_A;
           64  ++    static const mask digit	= _CTYPE_D;
           65  ++    static const mask xdigit	= _CTYPE_X;
           66  ++    static const mask space	= _CTYPE_S;
           67  ++    static const mask print	= _CTYPE_R;
           68  ++    static const mask graph	= _CTYPE_G;
           69  ++    static const mask cntrl	= _CTYPE_C;
           70  ++    static const mask punct	= _CTYPE_P;
           71  ++    static const mask alnum	= _CTYPE_A | _CTYPE_D;
           72  + #endif
           73  + #if __cplusplus >= 201103L
           74  +-    static const mask blank 	= space;
           75  ++    static const mask blank	= space;
           76  + #endif
           77  +   };
           78  + 
           79  +diff -uNr gcc-9.1.0.orig/libstdc++-v3/config/os/bsd/netbsd/ctype_configure_char.cc gcc-9.1.0-netbsdctypes/libstdc++-v3/config/os/bsd/netbsd/ctype_configure_char.cc
           80  +--- gcc-9.1.0.orig/libstdc++-v3/config/os/bsd/netbsd/ctype_configure_char.cc	2019-01-01 06:31:55.000000000 -0600
           81  ++++ gcc-9.1.0-netbsdctypes/libstdc++-v3/config/os/bsd/netbsd/ctype_configure_char.cc	2019-05-09 14:50:54.012379165 -0500
           82  +@@ -38,11 +38,9 @@
           83  + 
           84  + // Information as gleaned from /usr/include/ctype.h
           85  + 
           86  +-  extern "C" const u_int8_t _C_ctype_[];
           87  +-
           88  +   const ctype_base::mask*
           89  +   ctype<char>::classic_table() throw()
           90  +-  { return _C_ctype_ + 1; }
           91  ++  { return _C_ctype_tab_ + 1; }
           92  + 
           93  +   ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
           94  + 		     size_t __refs)
           95  +@@ -69,14 +67,14 @@
           96  + 
           97  +   char
           98  +   ctype<char>::do_toupper(char __c) const
           99  +-  { return ::toupper((int) __c); }
          100  ++  { return ::toupper((int)(unsigned char) __c); }
          101  + 
          102  +   const char*
          103  +   ctype<char>::do_toupper(char* __low, const char* __high) const
          104  +   {
          105  +     while (__low < __high)
          106  +       {
          107  +-	*__low = ::toupper((int) *__low);
          108  ++	*__low = ::toupper((int)(unsigned char) *__low);
          109  + 	++__low;
          110  +       }
          111  +     return __high;
          112  +@@ -84,14 +82,14 @@
          113  + 
          114  +   char
          115  +   ctype<char>::do_tolower(char __c) const
          116  +-  { return ::tolower((int) __c); }
          117  ++  { return ::tolower((int)(unsigned char) __c); }
     7    118    
     8         --#ifndef _CTYPE_U
     9         -+#ifndef _CTYPE_N
    10         -     static const mask upper    	= _U;
    11         -     static const mask lower 	= _L;
    12         -     static const mask alpha 	= _U | _L;
          119  +   const char*
          120  +   ctype<char>::do_tolower(char* __low, const char* __high) const
          121  +   {
          122  +     while (__low < __high)
          123  +       {
          124  +-	*__low = ::tolower((int) *__low);
          125  ++	*__low = ::tolower((int)(unsigned char) *__low);
          126  + 	++__low;
          127  +       }
          128  +     return __high;
          129  +diff -uNr gcc-9.1.0.orig/libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h gcc-9.1.0-netbsdctypes/libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h
          130  +--- gcc-9.1.0.orig/libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h	2019-01-01 06:31:55.000000000 -0600
          131  ++++ gcc-9.1.0-netbsdctypes/libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h	2019-05-09 14:50:54.029379165 -0500
          132  +@@ -48,7 +48,7 @@
          133  +   is(const char* __low, const char* __high, mask* __vec) const
          134  +   {
          135  +     while (__low < __high)
          136  +-      *__vec++ = _M_table[*__low++];
          137  ++      *__vec++ = _M_table[(unsigned char)*__low++];
          138  +     return __high;
          139  +   }
          140  +