1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
|
Description: <short summary of the patch>
TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.
.
safeclib (3.5.2-1) unstable; urgency=medium
.
* New upstream release (v29102019 3.5.2, not to be confused with
v17102019 3.5.2).
Author: Adam Borowski <kilobyte@angband.pl>
---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:
Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2019-11-03
--- safeclib-3.5.orig/tests/test_towfc_s.c
+++ safeclib-3.5/tests/test_towfc_s.c
@@ -13,7 +13,7 @@
#include <stdlib.h>
#include <unistd.h>
-#define CFOLD "CaseFolding.txt"
+#define CFOLD "/usr/share/unicode/CaseFolding.txt"
#if SIZEOF_WCHAR_T > 2
#define MAX_LEN 4
@@ -65,15 +65,9 @@ int test_towfc_s(void) {
f = fopen(CFOLD, "r");
if (!f) {
- printf("downloading %s ...", CFOLD);
- fflush(stdout);
- system("wget ftp://ftp.unicode.org/Public/UNIDATA/CaseFolding.txt")
- ? printf(" done\n")
- : printf(" failed\n");
- f = fopen(CFOLD, "r");
- }
- if (!f)
+ printf("not downloading %s ...", CFOLD);
return 1;
+ }
while (!feof(f)) {
int l;
char *p = fgets(s, sizeof(s), f);
@@ -95,6 +89,11 @@ int test_towfc_s(void) {
c = sscanf(code, "%X", &wc);
if (c) {
+ // These have changed in Unicode 13.
+ // Let's ignore them until glibc is updated.
+ if (wc==0xA7C7 || wc==0xA7C9 || wc==0xA7F5)
+ continue;
+
uint32_t m0;
int n, len;
uint32_t cp;
--- safeclib-3.5.orig/tests/test_towlower.c
+++ safeclib-3.5/tests/test_towlower.c
@@ -16,7 +16,7 @@
EXTERN uint32_t _towcase(uint32_t wc, int lower);
int test_towlower(void);
-#define CFOLD "CaseFolding.txt"
+#define CFOLD "/usr/share/unicode/CaseFolding.txt"
int ignore_f = 1;
@@ -36,13 +36,8 @@ int test_towlower(void) {
f = fopen(CFOLD, "r");
if (!f) {
- printf("downloading %s ...", CFOLD);
- fflush(stdout);
- system("wget ftp://ftp.unicode.org/Public/UNIDATA/CaseFolding.txt")
- ? printf(" done\n")
- : printf(" failed\n");
- printf(" done\n");
- f = fopen(CFOLD, "r");
+ printf("not downloading %s ...", CFOLD);
+ return 1;
}
while (!feof(f)) {
int l;
--- safeclib-3.5.orig/tests/test_towupper.c
+++ safeclib-3.5/tests/test_towupper.c
@@ -25,8 +25,8 @@ int check_casefolding(uint32_t lwr, uint
int check(uint32_t wc, const char *status, const char *name);
int test_towupper(void);
-#define GENCAT "DerivedGeneralCategory.txt"
-#define CFOLD "CaseFolding.txt"
+#define GENCAT "/usr/share/unicode/extracted/DerivedGeneralCategory.txt"
+#define CFOLD "/usr/share/unicode/CaseFolding.txt"
#ifndef PERL
/* Must have the same Unicode version 9.0, at least 5.26.
Better 5.27.3 with Unicode 10. */
@@ -148,26 +148,14 @@ int test_towupper(void) {
pl = fopen(TESTPL, "w");
f = fopen(GENCAT, "r");
if (!f) {
- printf("downloading %s ...", GENCAT);
- fflush(stdout);
- if (system("wget "
- "ftp://ftp.unicode.org/Public/UNIDATA/extracted/"
- "DerivedGeneralCategory.txt"))
- printf(" done\n");
- else
- printf(" failed\n");
- f = fopen(GENCAT, "r");
+ printf("not downloading %s ...", GENCAT);
+ return 1;
}
cf = fopen(CFOLD, "r");
if (!cf) {
- printf("downloading %s ...", CFOLD);
- fflush(stdout);
- if (system("wget ftp://ftp.unicode.org/Public/UNIDATA/CaseFolding.txt"))
- printf(" done\n");
- else
- printf(" failed\n");
- cf = fopen(CFOLD, "r");
+ printf("not downloading %s ...", CFOLD);
+ return 1;
}
while (!feof(f)) {
--- safeclib-3.5.orig/tests/test_strcmp_s.c
+++ safeclib-3.5/tests/test_strcmp_s.c
@@ -18,7 +18,7 @@
if (ind != std_ind) { \
printf("%s %u ind=%d relaxed strcmp()=%d rc=%d \n", __FUNCTION__, \
__LINE__, ind, std_ind, rc); \
- if (sgn(ind) != std_ind) { \
+ if (sgn(ind) != sgn(std_ind)) { \
printf("%s %u sgn(ind)=%d std_ind=%d rc=%d \n", __FUNCTION__, \
__LINE__, sgn(ind), std_ind, rc); \
errs++; \
|