aboutsummaryrefslogtreecommitdiffstats
path: root/testing/onboard/glibc-musl-error.patch
blob: 46aba646b2510559345ca4d7afe74229c3d4c85c (plain)
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
diff --git a/Onboard/pypredict/lm/lm.cpp b/Onboard/pypredict/lm/lm.cpp
index 2e64296..081b3fb 100644
--- a/Onboard/pypredict/lm/lm.cpp
+++ b/Onboard/pypredict/lm/lm.cpp
@@ -19,7 +19,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include <error.h>
+
 #include <algorithm>
 #include <cmath>
 #include <string>
@@ -37,7 +37,7 @@ StrConv::StrConv()
     if (cd_mb_wc == (iconv_t) -1)
     {
         if (errno == EINVAL)
-            error (0, 0, "conversion from UTF-8 to wchar_t not available");
+            fprintf (stderr, "conversion from UTF-8 to wchar_t not available");
         else
             perror ("iconv_open mb2wc");
     }
@@ -45,7 +45,7 @@ StrConv::StrConv()
     if (cd_wc_mb == (iconv_t) -1)
     {
         if (errno == EINVAL)
-            error (0, 0, "conversion from wchar_t to UTF-8 not available");
+            fprintf (stderr, "conversion from wchar_t to UTF-8 not available");
         else
             perror ("iconv_open wc2mb");
     }
diff --git a/Onboard/pypredict/lm/lm_dynamic.cpp b/Onboard/pypredict/lm/lm_dynamic.cpp
index 7c62824..da8cfd0 100644
--- a/Onboard/pypredict/lm/lm_dynamic.cpp
+++ b/Onboard/pypredict/lm/lm_dynamic.cpp
@@ -17,7 +17,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <error.h>
+
 
 #include "lm_dynamic.h"
 
@@ -91,7 +91,7 @@ LMError DynamicModelBase::load_arpac(const char* filename)
                     int ngrams_read = get_num_ngrams(current_level-1);
                     if (ngrams_read != ngrams_expected)
                     {
-                        error (0, 0, "unexpected n-gram count for level %d: "
+                        fprintf (stderr, "unexpected n-gram count for level %d: "
                                      "expected %d n-grams, but read %d",
                               current_level,
                               ngrams_expected, ngrams_read);
@@ -105,7 +105,7 @@ LMError DynamicModelBase::load_arpac(const char* filename)
                     if (ntoks < current_level+1)
                     {
                         err_code = ERR_NUMTOKENS; // too few tokens for cur. level
-                        error (0, 0, "too few tokens for n-gram level %d: "
+                        fprintf (stderr, "too few tokens for n-gram level %d: "
                               "line %d, tokens found %d/%d",
                               current_level,
                               line_number, ntoks, current_level+1);