diff options
author | Jim Meyering <meyering@redhat.com> | 2009-09-24 10:59:01 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-09-24 11:00:44 +0200 |
commit | 6a14f1c2502f58ff7bed8cb451f95a83f5ee920a (patch) | |
tree | 975cb6488e6413dab5aece9fcf1aee5a595381ac /src/generator.ml | |
parent | 0ca36888c6975ffa7e03df11bf8ded42156939c7 (diff) | |
download | libguestfs-6a14f1c2502f58ff7bed8cb451f95a83f5ee920a.tar.gz libguestfs-6a14f1c2502f58ff7bed8cb451f95a83f5ee920a.tar.xz libguestfs-6a14f1c2502f58ff7bed8cb451f95a83f5ee920a.zip |
avoid use of all ctype macros
* cfg.mk (disable_temporarily): Don't disable sc_avoid_ctype_macros.
* fish/tilde.c: Remove unnecessary inclusion of ctype.h.
* bootstrap: Add gnulib's c-ctype module to the list.
* daemon/m4/gnulib-cache.m4: Likewise.
* daemon/ext2.c: Include "c-ctype.h", not <ctype.h>.
Use c_isspace, etc, rather than isspace.
* daemon/guestfsd.c: Likewise.
* daemon/lvm.c: Likewise.
* daemon/proto.c: Likewise.
* fish/fish.c: Likewise.
* fish/tilde.c: Likewise.
* src/generator.ml: Likewise.
* src/guestfs.c: Likewise.
* examples/to-xml.c: Likewise.
* examples/Makefile.am (to_xml_CPPFLAGS): Add -I$(top_srcdir)/gnulib/lib
so inclusion of "c-ctype.h" works.
(to_xml_CPPFLAGS): Rename from to_xml_CFLAGS.
Diffstat (limited to 'src/generator.ml')
-rwxr-xr-x | src/generator.ml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/generator.ml b/src/generator.ml index 6f77e4ba..4f03c062 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -4956,11 +4956,11 @@ and generate_daemon_actions () = pr "#include <stdlib.h>\n"; pr "#include <string.h>\n"; pr "#include <inttypes.h>\n"; - pr "#include <ctype.h>\n"; pr "#include <rpc/types.h>\n"; pr "#include <rpc/xdr.h>\n"; pr "\n"; pr "#include \"daemon.h\"\n"; + pr "#include \"c-ctype.h\"\n"; pr "#include \"../src/guestfs_protocol.h\"\n"; pr "#include \"actions.h\"\n"; pr "\n"; @@ -5186,7 +5186,7 @@ and generate_daemon_actions () = pr " fprintf (stderr, \"%%s: failed: passed a NULL string\\n\", __func__);\n"; pr " return -1;\n"; pr " }\n"; - pr " if (!*str || isspace (*str)) {\n"; + pr " if (!*str || c_isspace (*str)) {\n"; pr " fprintf (stderr, \"%%s: failed: passed a empty string or one beginning with whitespace\\n\", __func__);\n"; pr " return -1;\n"; pr " }\n"; @@ -5288,7 +5288,7 @@ and generate_daemon_actions () = pr " pend++;\n"; pr " }\n"; pr "\n"; - pr " while (*p && isspace (*p)) /* Skip any leading whitespace. */\n"; + pr " while (*p && c_isspace (*p)) /* Skip any leading whitespace. */\n"; pr " p++;\n"; pr "\n"; pr " if (!*p) { /* Empty line? Skip it. */\n"; @@ -6073,9 +6073,9 @@ and generate_fish_cmds () = pr "#include <stdlib.h>\n"; pr "#include <string.h>\n"; pr "#include <inttypes.h>\n"; - pr "#include <ctype.h>\n"; pr "\n"; pr "#include <guestfs.h>\n"; + pr "#include \"c-ctype.h\"\n"; pr "#include \"fish.h\"\n"; pr "\n"; @@ -6193,7 +6193,7 @@ and generate_fish_cmds () = | name, FBuffer -> pr " printf (\"%%s%s: \", indent);\n" name; pr " for (i = 0; i < %s->%s_len; ++i)\n" typ name; - pr " if (isprint (%s->%s[i]))\n" typ name; + pr " if (c_isprint (%s->%s[i]))\n" typ name; pr " printf (\"%%s%%c\", indent, %s->%s[i]);\n" typ name; pr " else\n"; pr " printf (\"%%s\\\\x%%02x\", indent, %s->%s[i]);\n" typ name; |