diff options
author | Mike Frysinger <vapier@gentoo.org> | 2014-08-12 08:37:25 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2014-08-12 08:38:28 -0400 |
commit | a2c4d71c2e84419a49db503ed59de4d3d1dca7dd (patch) | |
tree | 68cf0d2c10eae032d52bad7e6489fe04e22d6952 /tools | |
parent | 809584283a3ce5b0250656faefb23a821782adbe (diff) | |
download | acl-a2c4d71c2e84419a49db503ed59de4d3d1dca7dd.tar.gz |
add __acl_ prefixes to internal symbols
When static linking libacl, people sometimes run into symbol collisions
because their own code defines symbols like "quote". So for acl internal
symbols, use an __acl_ prefix.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/getfacl.c | 4 | ||||
-rw-r--r-- | tools/parse.c | 14 | ||||
-rw-r--r-- | tools/setfacl.c | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/tools/getfacl.c b/tools/getfacl.c index 22cc1c7..679affa 100644 --- a/tools/getfacl.c +++ b/tools/getfacl.c @@ -89,7 +89,7 @@ int opt_numeric; /* don't convert id's to symbolic names */ static const char *xquote(const char *str, const char *quote_chars) { - const char *q = quote(str, quote_chars); + const char *q = __acl_quote(str, quote_chars); if (q == NULL) { fprintf(stderr, "%s: %s\n", progname, strerror(errno)); exit(1); @@ -717,7 +717,7 @@ int main(int argc, char *argv[]) do { if (optind == argc || strcmp(argv[optind], "-") == 0) { - while ((line = next_line(stdin)) != NULL) { + while ((line = __acl_next_line(stdin)) != NULL) { if (*line == '\0') continue; diff --git a/tools/parse.c b/tools/parse.c index df69c26..823bfeb 100644 --- a/tools/parse.c +++ b/tools/parse.c @@ -226,7 +226,7 @@ user_entry: str = get_token(text_p); if (str) { cmd->c_tag = ACL_USER; - error = get_uid(unquote(str), &cmd->c_id); + error = get_uid(__acl_unquote(str), &cmd->c_id); free(str); if (error) { *text_p = backup; @@ -245,7 +245,7 @@ user_entry: str = get_token(text_p); if (str) { cmd->c_tag = ACL_GROUP; - error = get_gid(unquote(str), &cmd->c_id); + error = get_gid(__acl_unquote(str), &cmd->c_id); free(str); if (error) { *text_p = backup; @@ -447,7 +447,7 @@ read_acl_comments( if (lineno) (*lineno)++; - line = next_line(file); + line = __acl_next_line(file); if (line == NULL) break; @@ -465,7 +465,7 @@ read_acl_comments( if (strncmp(cp, "file:", 5) == 0) { cp += 5; SKIP_WS(cp); - cp = unquote(cp); + cp = __acl_unquote(cp); if (path_p) { if (*path_p) @@ -482,7 +482,7 @@ read_acl_comments( if (uid_p) { if (*uid_p != ACL_UNDEFINED_ID) goto fail; - if (get_uid(unquote(cp), uid_p) != 0) + if (get_uid(__acl_unquote(cp), uid_p) != 0) continue; } } else if (strncmp(cp, "group:", 6) == 0) { @@ -492,7 +492,7 @@ read_acl_comments( if (gid_p) { if (*gid_p != ACL_UNDEFINED_ID) goto fail; - if (get_gid(unquote(cp), gid_p) != 0) + if (get_gid(__acl_unquote(cp), gid_p) != 0) continue; } } else if (strncmp(cp, "flags:", 6) == 0) { @@ -548,7 +548,7 @@ read_acl_seq( if (which) *which = -1; - while ((line = next_line(file))) { + while ((line = __acl_next_line(file))) { if (lineno) (*lineno)++; diff --git a/tools/setfacl.c b/tools/setfacl.c index b0ddedf..880bd1e 100644 --- a/tools/setfacl.c +++ b/tools/setfacl.c @@ -91,7 +91,7 @@ int promote_warning; static const char *xquote(const char *str, const char *quote_chars) { - const char *q = quote(str, quote_chars); + const char *q = __acl_quote(str, quote_chars); if (q == NULL) { fprintf(stderr, "%s: %s\n", progname, strerror(errno)); exit(1); @@ -310,7 +310,7 @@ int next_file(const char *arg, seq_t seq) args.seq = seq; if (strcmp(arg, "-") == 0) { - while ((line = next_line(stdin))) + while ((line = __acl_next_line(stdin))) errors = walk_tree(line, walk_flags, 0, do_set, &args); if (!feof(stdin)) { fprintf(stderr, _("%s: Standard input: %s\n"), |