Merge 'remotes/trunk'
[0ad.git] / libraries / osx / patches / 03-undo-libtasn1-cisdigit.patch
blob948b12f461e747ed742e0e1735b3555a445cbc6c
1 --- a/lib/minitasn1/decoding.c
2 +++ b/lib/minitasn1/decoding.c
3 @@ -32,7 +32,6 @@
4 #include <element.h>
5 #include <limits.h>
6 #include <intprops.h>
7 -#include "c-ctype.h"
9 #ifdef DEBUG
10 # define warn() fprintf(stderr, "%s: %d\n", __func__, __LINE__)
11 @@ -355,7 +355,7 @@
12 p = &der[len_len];
13 for (i = 0; i < (unsigned) (str_len - 1); i++)
15 - if (c_isdigit (p[i]) == 0)
16 + if (isdigit (p[i]) == 0)
18 if (type == ASN1_ETYPE_GENERALIZED_TIME)
20 --- a/lib/minitasn1/element.c
21 +++ b/lib/minitasn1/element.c
22 @@ -30,7 +30,6 @@
23 #include "parser_aux.h"
24 #include <gstr.h>
25 #include "structure.h"
26 -#include "c-ctype.h"
27 #include "element.h"
29 void
30 @@ -380,7 +379,7 @@
31 case ASN1_ETYPE_ENUMERATED:
32 if (len == 0)
34 - if ((c_isdigit (value[0])) || (value[0] == '-'))
35 + if ((isdigit (value[0])) || (value[0] == '-'))
37 value_temp = malloc (SIZEOF_UNSIGNED_LONG_INT);
38 if (value_temp == NULL)
39 @@ -453,7 +452,7 @@
40 p = node->down;
41 while (type_field (p->type) != ASN1_ETYPE_DEFAULT)
42 p = p->right;
43 - if ((c_isdigit (p->value[0])) || (p->value[0] == '-'))
44 + if ((isdigit (p->value[0])) || (p->value[0] == '-'))
46 default_temp = malloc (SIZEOF_UNSIGNED_LONG_INT);
47 if (default_temp == NULL)
48 @@ -519,7 +518,7 @@
49 break;
50 case ASN1_ETYPE_OBJECT_ID:
51 for (i = 0; i < _asn1_strlen (value); i++)
52 - if ((!c_isdigit (value[i])) && (value[i] != '.') && (value[i] != '+'))
53 + if ((!isdigit (value[i])) && (value[i] != '.') && (value[i] != '+'))
54 return ASN1_VALUE_NOT_VALID;
55 if (node->type & CONST_DEFAULT)
57 @@ -540,7 +539,7 @@
58 if (len < 11)
59 return ASN1_VALUE_NOT_VALID;
60 for (k = 0; k < 10; k++)
61 - if (!c_isdigit (value[k]))
62 + if (!isdigit (value[k]))
63 return ASN1_VALUE_NOT_VALID;
64 switch (len)
66 @@ -549,7 +548,7 @@
67 return ASN1_VALUE_NOT_VALID;
68 break;
69 case 13:
70 - if ((!c_isdigit (value[10])) || (!c_isdigit (value[11])) ||
71 + if ((!isdigit (value[10])) || (!isdigit (value[11])) ||
72 (value[12] != 'Z'))
73 return ASN1_VALUE_NOT_VALID;
74 break;
75 @@ -557,16 +556,16 @@
76 if ((value[10] != '+') && (value[10] != '-'))
77 return ASN1_VALUE_NOT_VALID;
78 for (k = 11; k < 15; k++)
79 - if (!c_isdigit (value[k]))
80 + if (!isdigit (value[k]))
81 return ASN1_VALUE_NOT_VALID;
82 break;
83 case 17:
84 - if ((!c_isdigit (value[10])) || (!c_isdigit (value[11])))
85 + if ((!isdigit (value[10])) || (!isdigit (value[11])))
86 return ASN1_VALUE_NOT_VALID;
87 if ((value[12] != '+') && (value[12] != '-'))
88 return ASN1_VALUE_NOT_VALID;
89 for (k = 13; k < 17; k++)
90 - if (!c_isdigit (value[k]))
91 + if (!isdigit (value[k]))
92 return ASN1_VALUE_NOT_VALID;
93 break;
94 default:
95 @@ -890,7 +889,7 @@
96 p = node->down;
97 while (type_field (p->type) != ASN1_ETYPE_DEFAULT)
98 p = p->right;
99 - if ((c_isdigit (p->value[0])) || (p->value[0] == '-')
100 + if ((isdigit (p->value[0])) || (p->value[0] == '-')
101 || (p->value[0] == '+'))
103 result = _asn1_convert_integer
105 --- a/lib/minitasn1/int.h
106 +++ b/lib/minitasn1/int.h
107 @@ -29,6 +29,7 @@
108 # include <string.h>
109 # include <stdlib.h>
110 # include <stdio.h>
111 +# include <ctype.h>
112 # include <stdint.h>
114 # ifdef HAVE_SYS_TYPES_H
115 --- a/lib/minitasn1/parser_aux.c
116 +++ b/lib/minitasn1/parser_aux.c
117 @@ -26,7 +26,6 @@
118 #include "gstr.h"
119 #include "structure.h"
120 #include "element.h"
121 -#include "c-ctype.h"
123 char _asn1_identifierMissing[ASN1_MAX_NAME_SIZE + 1]; /* identifier name not found */
125 @@ -755,7 +754,7 @@
126 p2 = p->down;
127 if (p2 && (type_field (p2->type) == ASN1_ETYPE_CONSTANT))
129 - if (p2->value && !c_isdigit (p2->value[0]))
130 + if (p2->value && !isdigit (p2->value[0]))
132 _asn1_str_cpy (name2, sizeof (name2), name_root);
133 _asn1_str_cat (name2, sizeof (name2), ".");
134 @@ -1067,7 +1066,7 @@
135 p2 = p->down;
136 if (p2 && (type_field (p2->type) == ASN1_ETYPE_CONSTANT))
138 - if (p2->value && !c_isdigit (p2->value[0]))
139 + if (p2->value && !isdigit (p2->value[0]))
141 _asn1_str_cpy (name2, sizeof (name2), node->name);
142 _asn1_str_cat (name2, sizeof (name2), ".");