add wchar_t support to gcc 4.2 because some upcoming ports are going to need
it. this is not much different from the in-tree gcc way of doing it. tested with openoffice and with some other uncommited stuff. bump needed PKGNAMEs
This commit is contained in:
parent
0407e44b6b
commit
62b3092c0e
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.33 2009/06/04 18:24:20 kurt Exp $
|
||||
# $OpenBSD: Makefile,v 1.34 2009/06/07 01:22:05 robert Exp $
|
||||
|
||||
ONLY_FOR_ARCHS = alpha i386 m68k sparc sparc64 powerpc vax amd64
|
||||
#BROKEN=adjust for types changes
|
||||
@ -10,8 +10,8 @@ BOOTSTRAP_GEN = 2
|
||||
ADASTRAP = adastrap-i386-$V-${BOOTSTRAP_GEN}.tgz
|
||||
|
||||
PKGNAME-main = gcc-${FULL_PKGVERSION}p1
|
||||
PKGNAME-c++ = g++-${FULL_PKGVERSION}p2
|
||||
PKGNAME-estdc = libstdc++-${FULL_PKGVERSION}p2
|
||||
PKGNAME-c++ = g++-${FULL_PKGVERSION}p3
|
||||
PKGNAME-estdc = libstdc++-${FULL_PKGVERSION}p3
|
||||
PKGNAME-g77 = g77-${FULL_PKGVERSION}p0
|
||||
PKGNAME-f95 = g95-${FULL_PKGVERSION}p1
|
||||
PKGNAME-java = gcj-${FULL_PKGVERSION}p0
|
||||
@ -141,6 +141,7 @@ CONFIGURE_ARGS += \
|
||||
--with-gnu-ld \
|
||||
--with-gnu-as \
|
||||
--enable-threads=posix \
|
||||
--enable-wchar_t \
|
||||
--enable-languages=${LANGS}
|
||||
|
||||
# This is needed, as internal cpp is no longer compatible with the
|
||||
|
86
lang/gcc/4.2/patches/patch-libstdc++-v3_acinclude_m4
Normal file
86
lang/gcc/4.2/patches/patch-libstdc++-v3_acinclude_m4
Normal file
@ -0,0 +1,86 @@
|
||||
$OpenBSD: patch-libstdc++-v3_acinclude_m4,v 1.1 2009/06/07 01:22:05 robert Exp $
|
||||
--- libstdc++-v3/acinclude.m4.orig Fri Jun 29 01:02:05 2007
|
||||
+++ libstdc++-v3/acinclude.m4 Fri Jun 5 00:48:50 2009
|
||||
@@ -1858,82 +1858,6 @@ AC_DEFUN([GLIBCXX_ENABLE_WCHAR_T], [
|
||||
# Test it always, for use in GLIBCXX_ENABLE_C99, together with
|
||||
# ac_has_wchar_h.
|
||||
AC_CHECK_HEADERS(wctype.h, ac_has_wctype_h=yes, ac_has_wctype_h=no)
|
||||
-
|
||||
- if test x"$enable_wchar_t" = x"yes"; then
|
||||
-
|
||||
- AC_LANG_SAVE
|
||||
- AC_LANG_CPLUSPLUS
|
||||
-
|
||||
- if test x"$ac_has_wchar_h" = xyes &&
|
||||
- test x"$ac_has_wctype_h" = xyes; then
|
||||
- AC_TRY_COMPILE([#include <wchar.h>
|
||||
- #include <stddef.h>
|
||||
- wint_t i;
|
||||
- long l = WEOF;
|
||||
- long j = WCHAR_MIN;
|
||||
- long k = WCHAR_MAX;
|
||||
- namespace test
|
||||
- {
|
||||
- using ::btowc;
|
||||
- using ::fgetwc;
|
||||
- using ::fgetws;
|
||||
- using ::fputwc;
|
||||
- using ::fputws;
|
||||
- using ::fwide;
|
||||
- using ::fwprintf;
|
||||
- using ::fwscanf;
|
||||
- using ::getwc;
|
||||
- using ::getwchar;
|
||||
- using ::mbrlen;
|
||||
- using ::mbrtowc;
|
||||
- using ::mbsinit;
|
||||
- using ::mbsrtowcs;
|
||||
- using ::putwc;
|
||||
- using ::putwchar;
|
||||
- using ::swprintf;
|
||||
- using ::swscanf;
|
||||
- using ::ungetwc;
|
||||
- using ::vfwprintf;
|
||||
- using ::vswprintf;
|
||||
- using ::vwprintf;
|
||||
- using ::wcrtomb;
|
||||
- using ::wcscat;
|
||||
- using ::wcschr;
|
||||
- using ::wcscmp;
|
||||
- using ::wcscoll;
|
||||
- using ::wcscpy;
|
||||
- using ::wcscspn;
|
||||
- using ::wcsftime;
|
||||
- using ::wcslen;
|
||||
- using ::wcsncat;
|
||||
- using ::wcsncmp;
|
||||
- using ::wcsncpy;
|
||||
- using ::wcspbrk;
|
||||
- using ::wcsrchr;
|
||||
- using ::wcsrtombs;
|
||||
- using ::wcsspn;
|
||||
- using ::wcsstr;
|
||||
- using ::wcstod;
|
||||
- using ::wcstok;
|
||||
- using ::wcstol;
|
||||
- using ::wcstoul;
|
||||
- using ::wcsxfrm;
|
||||
- using ::wctob;
|
||||
- using ::wmemchr;
|
||||
- using ::wmemcmp;
|
||||
- using ::wmemcpy;
|
||||
- using ::wmemmove;
|
||||
- using ::wmemset;
|
||||
- using ::wprintf;
|
||||
- using ::wscanf;
|
||||
- }
|
||||
- ],[],[], [enable_wchar_t=no])
|
||||
- else
|
||||
- enable_wchar_t=no
|
||||
- fi
|
||||
-
|
||||
- AC_LANG_RESTORE
|
||||
- fi
|
||||
|
||||
if test x"$enable_wchar_t" = x"yes"; then
|
||||
AC_DEFINE(_GLIBCXX_USE_WCHAR_T, 1,
|
@ -0,0 +1,20 @@
|
||||
$OpenBSD: patch-libstdc++-v3_config_locale_generic_time_members_cc,v 1.1 2009/06/07 01:22:05 robert Exp $
|
||||
--- libstdc++-v3/config/locale/generic/time_members.cc.orig Fri Jun 5 05:43:54 2009
|
||||
+++ libstdc++-v3/config/locale/generic/time_members.cc Fri Jun 5 05:44:13 2009
|
||||
@@ -128,12 +128,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
{
|
||||
char* __old = strdup(setlocale(LC_ALL, NULL));
|
||||
setlocale(LC_ALL, _M_name_timepunct);
|
||||
+#if !defined(__OpenBSD__)
|
||||
const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
|
||||
+#endif
|
||||
setlocale(LC_ALL, __old);
|
||||
free(__old);
|
||||
+#if !defined(__OpenBSD__)
|
||||
// Make sure __s is null terminated.
|
||||
if (__len == 0)
|
||||
__s[0] = L'\0';
|
||||
+#endif
|
||||
}
|
||||
|
||||
template<>
|
@ -0,0 +1,46 @@
|
||||
$OpenBSD: patch-libstdc++-v3_include_c_compatibility_wchar_h,v 1.1 2009/06/07 01:22:05 robert Exp $
|
||||
--- libstdc++-v3/include/c_compatibility/wchar.h.orig Fri Jun 5 00:05:31 2009
|
||||
+++ libstdc++-v3/include/c_compatibility/wchar.h Fri Jun 5 00:06:50 2009
|
||||
@@ -45,24 +45,32 @@ using std::fgetws;
|
||||
using std::fputwc;
|
||||
using std::fputws;
|
||||
using std::fwide;
|
||||
+#if !defined(__OpenBSD__)
|
||||
using std::fwprintf;
|
||||
using std::fwscanf;
|
||||
using std::swprintf;
|
||||
using std::swscanf;
|
||||
using std::vfwprintf;
|
||||
+#endif
|
||||
#if _GLIBCXX_HAVE_VFWSCANF
|
||||
using std::vfwscanf;
|
||||
#endif
|
||||
+#if !defined(__OpenBSD__)
|
||||
using std::vswprintf;
|
||||
+#endif
|
||||
#if _GLIBCXX_HAVE_VSWSCANF
|
||||
using std::vswscanf;
|
||||
#endif
|
||||
+#if !defined(__OpenBSD__)
|
||||
using std::vwprintf;
|
||||
+#endif
|
||||
#if _GLIBCXX_HAVE_VWSCANF
|
||||
using std::vwscanf;
|
||||
#endif
|
||||
+#if !defined(__OpenBSD__)
|
||||
using std::wprintf;
|
||||
using std::wscanf;
|
||||
+#endif
|
||||
using std::getwc;
|
||||
using std::getwchar;
|
||||
using std::mbsinit;
|
||||
@@ -101,7 +109,9 @@ using std::wmemcmp;
|
||||
using std::wmemcpy;
|
||||
using std::wmemmove;
|
||||
using std::wmemset;
|
||||
+#if !defined(__OpenBSD__)
|
||||
using std::wcsftime;
|
||||
+#endif
|
||||
|
||||
#if _GLIBCXX_USE_C99
|
||||
using std::wcstold;
|
@ -0,0 +1,62 @@
|
||||
$OpenBSD: patch-libstdc++-v3_include_c_std_std_cwchar_h,v 1.1 2009/06/07 01:22:05 robert Exp $
|
||||
--- libstdc++-v3/include/c_std/std_cwchar.h.orig Fri Jun 5 00:00:55 2009
|
||||
+++ libstdc++-v3/include/c_std/std_cwchar.h Fri Jun 5 00:05:00 2009
|
||||
@@ -151,8 +151,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
using ::fputwc;
|
||||
using ::fputws;
|
||||
using ::fwide;
|
||||
+#if !defined(__OpenBSD__)
|
||||
using ::fwprintf;
|
||||
using ::fwscanf;
|
||||
+#endif
|
||||
using ::getwc;
|
||||
using ::getwchar;
|
||||
using ::mbrlen;
|
||||
@@ -161,18 +163,26 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
using ::mbsrtowcs;
|
||||
using ::putwc;
|
||||
using ::putwchar;
|
||||
+#if !defined(__OpenBSD__)
|
||||
using ::swprintf;
|
||||
using ::swscanf;
|
||||
+#endif
|
||||
using ::ungetwc;
|
||||
+#if !defined(__OpenBSD__)
|
||||
using ::vfwprintf;
|
||||
+#endif
|
||||
#if _GLIBCXX_HAVE_VFWSCANF
|
||||
using ::vfwscanf;
|
||||
#endif
|
||||
+#if !defined(__OpenBSD__)
|
||||
using ::vswprintf;
|
||||
+#endif
|
||||
#if _GLIBCXX_HAVE_VSWSCANF
|
||||
using ::vswscanf;
|
||||
#endif
|
||||
+#if !defined(__OpenBSD__)
|
||||
using ::vwprintf;
|
||||
+#endif
|
||||
#if _GLIBCXX_HAVE_VWSCANF
|
||||
using ::vwscanf;
|
||||
#endif
|
||||
@@ -182,7 +192,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
using ::wcscoll;
|
||||
using ::wcscpy;
|
||||
using ::wcscspn;
|
||||
+#if !defined(__OpenBSD__)
|
||||
using ::wcsftime;
|
||||
+#endif
|
||||
using ::wcslen;
|
||||
using ::wcsncat;
|
||||
using ::wcsncmp;
|
||||
@@ -202,8 +214,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
using ::wmemcpy;
|
||||
using ::wmemmove;
|
||||
using ::wmemset;
|
||||
+#if !defined(__OpenBSD__)
|
||||
using ::wprintf;
|
||||
using ::wscanf;
|
||||
+#endif
|
||||
|
||||
using ::wcschr;
|
||||
|
@ -0,0 +1,19 @@
|
||||
$OpenBSD: patch-libstdc++-v3_include_c_std_std_cwctype_h,v 1.1 2009/06/07 01:22:05 robert Exp $
|
||||
--- libstdc++-v3/include/c_std/std_cwctype.h.orig Fri Jun 5 00:07:56 2009
|
||||
+++ libstdc++-v3/include/c_std/std_cwctype.h Fri Jun 5 00:09:22 2009
|
||||
@@ -81,6 +81,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
|
||||
using ::wint_t; // cwchar
|
||||
|
||||
+#if !defined(__OpenBSD__)
|
||||
using ::wctype_t;
|
||||
using ::wctrans_t;
|
||||
|
||||
@@ -104,6 +105,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
using ::towupper;
|
||||
using ::wctrans;
|
||||
using ::wctype;
|
||||
+#endif
|
||||
|
||||
_GLIBCXX_END_NAMESPACE
|
||||
|
12
lang/gcc/4.2/patches/patch-libstdc++-v3_include_tr1_cwctype
Normal file
12
lang/gcc/4.2/patches/patch-libstdc++-v3_include_tr1_cwctype
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-libstdc++-v3_include_tr1_cwctype,v 1.1 2009/06/07 01:22:05 robert Exp $
|
||||
--- libstdc++-v3/include/tr1/cwctype.orig Fri Jun 5 02:00:32 2009
|
||||
+++ libstdc++-v3/include/tr1/cwctype Fri Jun 5 02:01:17 2009
|
||||
@@ -45,7 +45,7 @@ namespace std
|
||||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE(tr1)
|
||||
|
||||
-#if _GLIBCXX_HAVE_ISWBLANK
|
||||
+#if defined(_GLIBCXX_HAVE_ISWBLANK) && !defined(__OpenBSD__)
|
||||
using std::iswblank;
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user