Commit 853398b5 authored by Natanael Copa's avatar Natanael Copa

main/fortify-headers: upgrade to 0.4

parent c90505bd
# Contributor: Timo Teräs <timo.teras@iki.fi> # Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi> # Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=fortify-headers pkgname=fortify-headers
pkgver=0.3 pkgver=0.4
pkgrel=1 pkgrel=0
pkgdesc="standalone fortify source implementation" pkgdesc="standalone fortify source implementation"
url="http://git.2f30.org/fortify-headers/" url="http://git.2f30.org/fortify-headers/"
arch="noarch" arch="noarch"
...@@ -13,7 +13,6 @@ makedepends="$depends_dev" ...@@ -13,7 +13,6 @@ makedepends="$depends_dev"
install="" install=""
subpackages="" subpackages=""
source="http://dl.2f30.org/releases/$pkgname-$pkgver.tar.gz source="http://dl.2f30.org/releases/$pkgname-$pkgver.tar.gz
mbsnrtowcs.patch
" "
_builddir="$srcdir"/$pkgname-$pkgver _builddir="$srcdir"/$pkgname-$pkgver
...@@ -37,9 +36,6 @@ package() { ...@@ -37,9 +36,6 @@ package() {
rm -f "$pkgdir"/usr/lib/*.la rm -f "$pkgdir"/usr/lib/*.la
} }
md5sums="0adda9abc732cd278386debbffb1fbd9 fortify-headers-0.3.tar.gz md5sums="99b34bbd925cbfe383252fe107cafece fortify-headers-0.4.tar.gz"
9f3d939fb547db32c781cc0413e5d211 mbsnrtowcs.patch" sha256sums="fedfbd951bf4d4bd30d32bef20710d6124c004037df52059a274c090c1f11a0a fortify-headers-0.4.tar.gz"
sha256sums="82b9f1984b6b64b8d53e4a556d828c9f8e4feb2a8e3b444c185ed2f990265c2e fortify-headers-0.3.tar.gz sha512sums="669bf35df5278d4557caa2c8f28e33fe3e4a03c4267eed2cc8638dcb8e705d8797e487fbb524d9ff919e2752f1dc817cef9d41f14ceb46d520661e3d2301c5f2 fortify-headers-0.4.tar.gz"
1de3badec811bc6a4374c78905c182054247a3240db507f0bfe399bedc3564d2 mbsnrtowcs.patch"
sha512sums="f85a3036f5c1be41c0a565e12bcce9b8d0a539adcc8d40146600c3b1bb290669b9122b64d655f4c6cbfc4366f80834b323a09cc663f0a806123db973d1f27a88 fortify-headers-0.3.tar.gz
bafa89afbb6209b4ff77dcb140a1416d0c75246466f3ad3a481b30079ea26e74c5af82f81af256c831fc287775df7da0fbb43c955ab7e825daab527b8ce7f007 mbsnrtowcs.patch"
From 73839e34a644fc95a9bc44603025b75aee74ef5b Mon Sep 17 00:00:00 2001
From: sin <sin@2f30.org>
Date: Wed, 1 Apr 2015 12:41:08 +0100
Subject: [PATCH] Add feature-test guards for mbsnrtowcs() and wcsnrtombs()
---
include/wchar.h | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/include/wchar.h b/include/wchar.h
index aba1bd8..e2d56e8 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -11,7 +11,6 @@ extern "C" {
#endif
#undef fgetws
-#undef mbsnrtowcs
#undef mbsrtowcs
#undef mbstowcs
#undef wcrtomb
@@ -19,7 +18,6 @@ extern "C" {
#undef wcscpy
#undef wcsncat
#undef wcsncpy
-#undef wcsnrtombs
#undef wcsrtombs
#undef wcstombs
#undef wctomb
@@ -38,6 +36,9 @@ wchar_t *fgetws(wchar_t *s, int n, FILE *fp)
return __fgetws_orig(s, n, fp);
}
+#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+#undef mbsnrtowcs
__typeof__(mbsnrtowcs) __mbsnrtowcs_orig __asm__(__USER_LABEL_PREFIX__ "mbsnrtowcs");
extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__))
size_t mbsnrtowcs(wchar_t *d, const char **s, size_t n, size_t wn, mbstate_t *st)
@@ -57,6 +58,7 @@ size_t mbsnrtowcs(wchar_t *d, const char **s, size_t n, size_t wn, mbstate_t *st
}
return r;
}
+#endif
__typeof__(mbsrtowcs) __mbsrtowcs_orig __asm__(__USER_LABEL_PREFIX__ "mbsrtowcs");
extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__))
@@ -145,6 +147,9 @@ wchar_t *wcsncpy(wchar_t *d, const wchar_t *s, size_t n)
return __wcsncpy_orig(d, s, n);
}
+#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+#undef wcsnrtombs
__typeof__(wcsnrtombs) __wcsnrtombs_orig __asm__(__USER_LABEL_PREFIX__ "wcsnrtombs");
extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__))
size_t wcsnrtombs(char *d, const wchar_t **s, size_t wn, size_t n, mbstate_t *st)
@@ -164,6 +169,7 @@ size_t wcsnrtombs(char *d, const wchar_t **s, size_t wn, size_t n, mbstate_t *st
}
return r;
}
+#endif
__typeof__(wcsrtombs) __wcsrtombs_orig __asm__(__USER_LABEL_PREFIX__ "wcsrtombs");
extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__))
--
2.3.3
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment