asn1: Fix OS X build

We can't use VIS_DQ on when the OS has a vis implementation but lacks
VIS_DQ.
This commit is contained in:
Nicolas Williams
2021-03-27 22:46:28 -05:00
parent eb2bd63207
commit 614b3a5914
3 changed files with 6 additions and 6 deletions

View File

@@ -99,7 +99,7 @@ print_heim_any(const heim_any *data)
int r = -1; int r = -1;
if (s) if (s)
r = rk_strasvis(&s2, s, VIS_CSTYLE|VIS_TAB|VIS_NL|VIS_DQ, ""); r = rk_strasvis(&s2, s, VIS_CSTYLE|VIS_TAB|VIS_NL, "\"");
free(s); free(s);
s = NULL; s = NULL;
if (r > -1) if (r > -1)
@@ -148,7 +148,7 @@ print_HEIM_ANY(const heim_any *data)
int r = -1; int r = -1;
if (s) if (s)
r = rk_strasvis(&s2, s, VIS_CSTYLE|VIS_TAB|VIS_NL|VIS_DQ, ""); r = rk_strasvis(&s2, s, VIS_CSTYLE|VIS_TAB|VIS_NL, "\"");
free(s); free(s);
s = NULL; s = NULL;
if (r > -1) if (r > -1)
@@ -197,7 +197,7 @@ print_heim_any_set(const heim_any_set *data)
int r = -1; int r = -1;
if (s) if (s)
r = rk_strasvis(&s2, s, VIS_CSTYLE|VIS_TAB|VIS_NL|VIS_DQ, ""); r = rk_strasvis(&s2, s, VIS_CSTYLE|VIS_TAB|VIS_NL, "\"");
free(s); free(s);
s = NULL; s = NULL;
if (r > -1) if (r > -1)
@@ -252,7 +252,7 @@ print_HEIM_ANY_SET(const heim_any_set *data)
int r = -1; int r = -1;
if (s) if (s)
r = rk_strasvis(&s2, s, VIS_CSTYLE|VIS_TAB|VIS_NL|VIS_DQ, ""); r = rk_strasvis(&s2, s, VIS_CSTYLE|VIS_TAB|VIS_NL, "\"");
free(s); free(s);
s = NULL; s = NULL;
if (r > -1) if (r > -1)

View File

@@ -592,7 +592,7 @@ defval(struct templatehead *temp, Member *m)
char *quoted; char *quoted;
if (rk_strasvis(&quoted, m->defval->u.stringvalue, if (rk_strasvis(&quoted, m->defval->u.stringvalue,
VIS_CSTYLE | VIS_DQ | VIS_NL, "") < 0) VIS_CSTYLE | VIS_NL, "\"") < 0)
err(1, "Could not quote a string"); err(1, "Could not quote a string");
add_line(temp, "{ A1_OP_DEFVAL|A1_DV_UTF8STRING, ~0, (void *)\"%s\" }", add_line(temp, "{ A1_OP_DEFVAL|A1_DV_UTF8STRING, ~0, (void *)\"%s\" }",
quoted); quoted);

View File

@@ -2625,7 +2625,7 @@ _asn1_print(const struct asn1_template *t,
char *s2 = NULL; char *s2 = NULL;
if (s) if (s)
(void) rk_strasvis(&s2, s, VIS_CSTYLE|VIS_TAB|VIS_NL|VIS_DQ, ""); (void) rk_strasvis(&s2, s, VIS_CSTYLE|VIS_TAB|VIS_NL, "\"");
free(s); free(s);
s = s2; s = s2;
if (s) if (s)