diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-08-25 18:32:06 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-08-25 18:32:06 +0400 |
commit | 608449b06844b145b43985a284c6109528472c53 (patch) | |
tree | 8f3b7643b1747ba34f10d3a9e25d33ea03f3bdfe /libc/debian/patches/illumos-3787.patch | |
parent | 463d03db2013f633bfe2e63a9b7c54b0d5a49da9 (diff) | |
download | illumos-packaging-608449b06844b145b43985a284c6109528472c53.tar.gz |
* Added illumos-3787.patch
3787 gcc4.7 __cplusplus change incompatibility
3823 wchar.h and wctype_iso.h incompatibility
Diffstat (limited to 'libc/debian/patches/illumos-3787.patch')
-rw-r--r-- | libc/debian/patches/illumos-3787.patch | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/libc/debian/patches/illumos-3787.patch b/libc/debian/patches/illumos-3787.patch new file mode 100644 index 0000000..2bf0609 --- /dev/null +++ b/libc/debian/patches/illumos-3787.patch @@ -0,0 +1,132 @@ +From 693e4d84eb49b987c3d66cbcd4b13a5c6e9059bf Mon Sep 17 00:00:00 2001 +From: Alexander Pyhalov <apyhalov@gmail.com> +Date: Fri, 14 Jun 2013 10:16:47 +0400 +Subject: [PATCH] 3787 gcc4.7 __cplusplus change incompatibility 3823 wchar.h + and wctype_iso.h incompatibility Reviewed by: Albert Lee <trisk@nexenta.com> + Approved by: Dan McDonald <danmcd@nexenta.com> + +--- + usr/src/head/iso/stdio_iso.h | 6 ++---- + usr/src/head/iso/stdlib_iso.h | 10 ++++------ + usr/src/head/wchar.h | 25 +++++++++++++++++++++++++ + 3 files changed, 31 insertions(+), 10 deletions(-) + +diff --git a/usr/src/head/iso/stdio_iso.h b/usr/src/head/iso/stdio_iso.h +index e2272c5..f974ad5 100644 +--- a/usr/src/head/iso/stdio_iso.h ++++ b/usr/src/head/iso/stdio_iso.h +@@ -46,8 +46,6 @@ + #ifndef _ISO_STDIO_ISO_H + #define _ISO_STDIO_ISO_H + +-#pragma ident "%Z%%M% %I% %E% SMI" +- + #include <sys/feature_tests.h> + #include <sys/va_list.h> + #include <stdio_tag.h> +@@ -331,7 +329,7 @@ extern size_t fwrite(const void *_RESTRICT_KYWD, size_t, size_t, + + #if !defined(__lint) + +-#if !defined(_REENTRANT) && !defined(_LP64) && !defined(_STRICT_STDC) ++#if !defined(_REENTRANT) && !defined(_LP64) + + #ifdef __STDC__ + #if __cplusplus >= 199711L +@@ -353,7 +351,7 @@ inline int putc(int _x, FILE *_p) { + (int)(*(p)->_ptr++ = (unsigned char) (x))) + #endif /* __STDC__ */ + +-#endif /* !defined(_REENTRANT) && !defined(_LP64) && !defined(_STRICT_STDC) */ ++#endif /* !defined(_REENTRANT) && !defined(_LP64) */ + + #ifndef _REENTRANT + +diff --git a/usr/src/head/iso/stdlib_iso.h b/usr/src/head/iso/stdlib_iso.h +index 2a636c5..17577a9 100644 +--- a/usr/src/head/iso/stdlib_iso.h ++++ b/usr/src/head/iso/stdlib_iso.h +@@ -43,8 +43,6 @@ + #ifndef _ISO_STDLIB_ISO_H + #define _ISO_STDLIB_ISO_H + +-#pragma ident "%Z%%M% %I% %E% SMI" +- + #include <sys/feature_tests.h> + + #ifdef __cplusplus +@@ -128,12 +126,12 @@ + extern long int atol(const char *); + extern void *bsearch(const void *, const void *, size_t, size_t, + int (*)(const void *, const void *)); +-#if __cplusplus >= 199711L ++#if __cplusplus >= 199711L && defined(__SUNPRO_CC) + extern "C++" { + void *bsearch(const void *, const void *, size_t, size_t, + int (*)(const void *, const void *)); + } +-#endif /* __cplusplus >= 199711L */ ++#endif /* __cplusplus >= 199711L && defined(__SUNPRO_CC) */ + extern void *calloc(size_t, size_t); + extern div_t div(int, int); + extern void exit(int) +@@ -148,11 +146,11 @@ extern size_t mbstowcs(wchar_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, + size_t); + extern int mbtowc(wchar_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t); + extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); +-#if __cplusplus >= 199711L ++#if __cplusplus >= 199711L && defined(__SUNPRO_CC) + extern "C++" { + void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); + } +-#endif /* __cplusplus >= 199711L */ ++#endif /* __cplusplus >= 199711L && defined(__SUNPRO_CC) */ + extern int rand(void); + extern void *realloc(void *, size_t); + extern void srand(unsigned int); +diff --git a/usr/src/head/wchar.h b/usr/src/head/wchar.h +index 781b57a..b804698 100644 +--- a/usr/src/head/wchar.h ++++ b/usr/src/head/wchar.h +@@ -122,6 +122,9 @@ + #ifdef __STDC__ + + #if !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__) ++#if __cplusplus >= 199711L ++namespace std { ++#endif + extern int iswalpha(wint_t); + extern int iswupper(wint_t); + extern int iswlower(wint_t); +@@ -140,6 +143,28 @@ + extern int wcswidth(const wchar_t *, size_t); + extern int wcwidth(wchar_t); + extern wctype_t wctype(const char *); ++#if __cplusplus >= 199711L ++} /* namespace std */ ++ ++using std::iswalpha; ++using std::iswupper; ++using std::iswlower; ++using std::iswdigit; ++using std::iswxdigit; ++using std::iswalnum; ++using std::iswspace; ++using std::iswpunct; ++using std::iswprint; ++using std::iswgraph; ++using std::iswcntrl; ++using std::iswctype; ++using std::towlower; ++using std::towupper; ++using std::wcswcs; ++using std::wcswidth; ++using std::wcwidth; ++using std::wctype; ++#endif + #endif /* !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE)... */ + + #if defined(__EXTENSIONS__) || \ +-- +1.8.1.6 + |