diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-03-01 03:23:16 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-03-01 03:23:16 +0000 |
commit | 1cf3940f08272de937d9eb79f73872e1d020539c (patch) | |
tree | 340a704cba2e86a5ae68efa84bd75df7a10492dd /Build/source/libs/zziplib/TLpatches | |
parent | a4caace64d19f5159c918ba66f5556287fddf1a0 (diff) |
Use my_strnlen in all platforms without strndup, since we use strndup only in zziplib.test
git-svn-id: svn://tug.org/texlive/trunk@46771 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/zziplib/TLpatches')
-rw-r--r-- | Build/source/libs/zziplib/TLpatches/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/libs/zziplib/TLpatches/patch-04-strnlen (renamed from Build/source/libs/zziplib/TLpatches/patch-04-solaris-strnlen) | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/Build/source/libs/zziplib/TLpatches/ChangeLog b/Build/source/libs/zziplib/TLpatches/ChangeLog index f6ecab4e9fb..b763da0f436 100644 --- a/Build/source/libs/zziplib/TLpatches/ChangeLog +++ b/Build/source/libs/zziplib/TLpatches/ChangeLog @@ -1,6 +1,6 @@ -2018-02-28 Akira Kakuto <kakuto@fuk.kindai.ac.jp> +2018-03-01 Akira Kakuto <kakuto@fuk.kindai.ac.jp> - * patch-04-solaris-strnlen: Add to support old solaris. + * patch-04-strnlen: Add for platforms without strnlen. 2018-02-06 Akira Kakuto <kakuto@fuk.kindai.ac.jp> diff --git a/Build/source/libs/zziplib/TLpatches/patch-04-solaris-strnlen b/Build/source/libs/zziplib/TLpatches/patch-04-strnlen index f9fb4d43aa0..a5f8c38eb2f 100644 --- a/Build/source/libs/zziplib/TLpatches/patch-04-solaris-strnlen +++ b/Build/source/libs/zziplib/TLpatches/patch-04-strnlen @@ -1,11 +1,10 @@ diff -ur zziplib-0.13.68.orig/zzip/__string.h zziplib-0.13.68/zzip/__string.h --- zziplib-0.13.68.orig/zzip/__string.h Tue Feb 06 05:00:56 2018 -+++ zziplib-0.13.68/zzip/__string.h Wed Feb 28 08:54:17 2018 -@@ -18,6 +18,18 @@ ++++ zziplib-0.13.68/zzip/__string.h Thu Mar 01 12:13:00 2018 +@@ -18,6 +18,16 @@ #define _zzip_strndup strndup #else -+#if defined(sun) || defined(__sun) +static size_t my_strnlen(const char* str, size_t maxlen) +{ + char *p = memchr(str, 0, maxlen); @@ -15,7 +14,6 @@ diff -ur zziplib-0.13.68.orig/zzip/__string.h zziplib-0.13.68/zzip/__string.h + return (p - str); +} +#define strnlen(x,y) my_strnlen((x),(y)) -+#endif /* sun || __sun */ + /* if your system does not have strndup: */ zzip__new__ static char * |