]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Use gnulib's c-ctype.h, not <ctype.h>.
authorJim Meyering <meyering@redhat.com>
Fri, 9 May 2008 13:50:14 +0000 (13:50 +0000)
committerJim Meyering <meyering@redhat.com>
Fri, 9 May 2008 13:50:14 +0000 (13:50 +0000)
commit25534052bc202c122cb67ff608097447f70fce39
treee497427b576fbeea2e8bedf5f8e21016cae2ad9a
parent82892f131b83746e6359845d2de39369728f8c25
Use gnulib's c-ctype.h, not <ctype.h>.

# Convert uses of isspace to c_isspace, isdigit to c_isdigit, etc.
re=$(man isspace|grep is.....,.is|sed 's/ -.*//' \
  |tr -s ', \n' \||sed 's/^|//;s/|$//')
git grep -l -E "$re"|grep -Ev 'Chan|gnulib' \
  |xargs perl -pi -e 's/\b('"$re"')\b/c_$1/g'
# Remove all uses of to_uchar
git grep -l to_uchar|xargs perl -pi -e 's/to_uchar\((.*?)\)/$1/g'
* src/util.h (to_uchar): Remove definition.
(TOLOWER): Remove definition.
(__virMacAddrCompare): Use c_tolower, not TOLOWER.
Globally:
  Where needed, change <ctype.h> to <c-ctype.h>.
  Remove unnecessary inclusion of <ctype.h>.
Ensure the global changes are never needed again:
* Makefile.maint (sc_avoid_ctype_macros): Prohibit use of ctype
macros.   Recommend c-ctype.h instead.
(sc_prohibit_c_ctype_without_use): New rule.
(sc_prohibit_ctype_h): New rule.  Disallow use of <ctype.h>.
13 files changed:
ChangeLog
Makefile.maint
qemud/remote.c
src/buf.c
src/nodeinfo.c
src/openvz_driver.c
src/qemu_driver.c
src/sexpr.c
src/stats_linux.c
src/util.c
src/util.h
src/virsh.c
src/xend_internal.c