minix/tools/gcc/patches/patch-aj

55 lines
1.9 KiB
Text
Raw Normal View History

$NetBSD$
--- libstdc++-v3/config/io/basic_file_stdio.cc.orig Thu Apr 9 23:23:07 2009
+++ libstdc++-v3/config/io/basic_file_stdio.cc
@@ -27,6 +27,10 @@
// ISO C++ 14882: 27.8 File-based streams
//
+#ifndef _POSIX_SOURCE
+#define _POSIX_SOURCE 1
+#endif
+
#include <bits/basic_file.h>
#include <fcntl.h>
#include <errno.h>
--- libstdc++-v3/config/os/bsd/netbsd/ctype_base.h.orig 2009-04-09 23:23:07.000000000 +0000
+++ libstdc++-v3/config/os/bsd/netbsd/ctype_base.h
@@ -30,6 +30,8 @@
// Full details can be found from the CVS files at:
// anoncvs@anoncvs.netbsd.org:/cvsroot/basesrc/include/ctype.h
// See www.netbsd.org for details of access.
+
+#include <sys/param.h>
_GLIBCXX_BEGIN_NAMESPACE(std)
@@ -42,6 +44,19 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// NB: Offsets into ctype<char>::_M_table force a particular size
// on the mask type. Because of this, we don't use an enum.
typedef unsigned char mask;
+#if __NetBSD_Version__ >= 599004100
+ static const mask upper = _CTYPE_U;
+ static const mask lower = _CTYPE_L;
+ static const mask alpha = _CTYPE_U | _CTYPE_L;
+ static const mask digit = _CTYPE_N;
+ static const mask xdigit = _CTYPE_N | _CTYPE_X;
+ static const mask space = _CTYPE_S;
+ static const mask print = _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_N | _CTYPE_B;
+ static const mask graph = _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_N;
+ static const mask cntrl = _CTYPE_C;
+ static const mask punct = _CTYPE_P;
+ static const mask alnum = _CTYPE_U | _CTYPE_L | _CTYPE_N;
+#else
static const mask upper = _U;
static const mask lower = _L;
static const mask alpha = _U | _L;
@@ -53,6 +68,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
static const mask cntrl = _C;
static const mask punct = _P;
static const mask alnum = _U | _L | _N;
+#endif
};
_GLIBCXX_END_NAMESPACE