aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/uclibc++/patches/002-undef-functions.patch
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2019-10-07 15:59:52 -0700
committerHauke Mehrtens <hauke@hauke-m.de>2019-10-19 14:30:00 +0200
commit5ad47b1ed8f36693c3ef960806ca4e834106f966 (patch)
treef97ea57ffca8c3fa4e66a0205d770fa56ea2fe26 /package/libs/uclibc++/patches/002-undef-functions.patch
parent82a3beac9df79d181d8be77e152ab2f111746615 (diff)
downloadupstream-5ad47b1ed8f36693c3ef960806ca4e834106f966.tar.gz
upstream-5ad47b1ed8f36693c3ef960806ca4e834106f966.tar.bz2
upstream-5ad47b1ed8f36693c3ef960806ca4e834106f966.zip
uClibc++: Fix three bugs
The first allows usage of several functions in the std namespace, which broke compilation of gddrescue specifically with uClibc-ng and uClibc++. The second allows usage of long long with normal C++11, which is part of the standard. Before, std=gnu++11 needed to be passsed to work around it. As a result of the second patch, the pedantic patch can safely be removed. Both patches are upstream backports. Added -std=c++11 to CFLAGS to guarentee proper inclusion of long long. Added another patch that fixes a typo with the long long support. Sent to upstream. Fixed up license information according to SPDX. Small cleanups for consistency. Signed-off-by: Rosen Penev <rosenp@gmail.com> (cherry picked from commit 6ab386c9bc23420816fbcefc84b62cf5438b2c66)
Diffstat (limited to 'package/libs/uclibc++/patches/002-undef-functions.patch')
-rw-r--r--package/libs/uclibc++/patches/002-undef-functions.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/package/libs/uclibc++/patches/002-undef-functions.patch b/package/libs/uclibc++/patches/002-undef-functions.patch
new file mode 100644
index 0000000000..47fa1580f2
--- /dev/null
+++ b/package/libs/uclibc++/patches/002-undef-functions.patch
@@ -0,0 +1,35 @@
+From 8245f62c1e7aba150f666b3c3a1dda646dee6d4b Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Fri, 27 Sep 2019 13:12:44 -0700
+Subject: [PATCH] cstdio: Add undef for four functions
+
+When compiling with uClibc-ng, these functions get defined as macros and
+become unavailable for std.
+
+Fixes programs that use the std versions of these functions.
+
+This matches libstdcpp behavior.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ include/cstdio | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/include/cstdio
++++ b/include/cstdio
+@@ -21,6 +21,15 @@
+ #ifndef __HEADER_CSTDIO
+ #define __HEADER_CSTDIO 1
+
++#undef clearerr
++#undef feof
++#undef ferror
++#undef fgetc
++#undef fputc
++#undef getc
++#undef getchar
++#undef putc
++#undef putchar
+
+ namespace std{
+ using ::FILE;