summaryrefslogtreecommitdiff
path: root/package/m4
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2018-02-25 10:09:53 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2018-02-26 20:17:27 +0000
commit3b7272d7dd160830323aaf1cac5f15506258ba04 (patch)
treea2db619e43eab4a109ada70182122c43bab64b4b /package/m4
parent809fd79b9ad5e849d13034ab48b7501e68e9cda0 (diff)
m4: update to 1.4.18, fix Mac High Sierra issue
Diffstat (limited to 'package/m4')
-rw-r--r--package/m4/Makefile4
-rw-r--r--package/m4/patches/patch-lib_vasnprintf_c28
2 files changed, 30 insertions, 2 deletions
diff --git a/package/m4/Makefile b/package/m4/Makefile
index 58e7c4f9e..a6af849a3 100644
--- a/package/m4/Makefile
+++ b/package/m4/Makefile
@@ -4,9 +4,9 @@
include ${ADK_TOPDIR}/rules.mk
PKG_NAME:= m4
-PKG_VERSION:= 1.4.17
+PKG_VERSION:= 1.4.18
PKG_RELEASE:= 1
-PKG_HASH:= f0543c3beb51fa6b3337d8025331591e0e18d8ec2886ed391f1aade43477d508
+PKG_HASH:= f2c1e86ca0a404ff281631bdc8377638992744b175afb806e25871a24a934e07
PKG_DESCR:= macro processor
PKG_SECTION:= dev/tools
PKG_BUILDDEP:= m4-host
diff --git a/package/m4/patches/patch-lib_vasnprintf_c b/package/m4/patches/patch-lib_vasnprintf_c
new file mode 100644
index 000000000..07b989cc6
--- /dev/null
+++ b/package/m4/patches/patch-lib_vasnprintf_c
@@ -0,0 +1,28 @@
+--- m4-1.4.18.orig/lib/vasnprintf.c 2016-12-31 14:54:42.000000000 +0100
++++ m4-1.4.18/lib/vasnprintf.c 2018-02-24 20:59:00.000000000 +0100
+@@ -4858,7 +4858,10 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *
+ #endif
+ *fbp = dp->conversion;
+ #if USE_SNPRINTF
+-# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
++# if ! (((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) \
++ && !defined __UCLIBC__) \
++ || (defined __APPLE__ && defined __MACH__) \
++ || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+ fbp[1] = '%';
+ fbp[2] = 'n';
+ fbp[3] = '\0';
+@@ -4872,6 +4875,13 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *
+ in format strings in writable memory may crash the program
+ (if compiled with _FORTIFY_SOURCE=2), so we should avoid it
+ in this situation. */
++ /* On Mac OS X 10.3 or newer, we know that snprintf's return
++ value conforms to ISO C 99: the tests gl_SNPRINTF_RETVAL_C99
++ and gl_SNPRINTF_TRUNCATION_C99 pass.
++ Therefore we can avoid using %n in this situation.
++ On Mac OS X 10.13 or newer, the use of %n in format strings
++ in writable memory by default crashes the program, so we
++ should avoid it in this situation. */
+ /* On native Windows systems (such as mingw), we can avoid using
+ %n because:
+ - Although the gl_SNPRINTF_TRUNCATION_C99 test fails,