aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2011-01-06 17:17:32 -0700
committerEric Blake <eblake@redhat.com>2011-01-14 15:39:05 -0700
commit63dbc84a88bf581cdc3dc86a273794b5af60dd22 (patch)
tree76b7d6891eac90427cad9644d3a87d27350346d9
parentdatatypes: avoid redundant __FUNCTION__ (diff)
downloadlibvirt-63dbc84a88bf581cdc3dc86a273794b5af60dd22.tar.gz
libvirt-63dbc84a88bf581cdc3dc86a273794b5af60dd22.tar.bz2
libvirt-63dbc84a88bf581cdc3dc86a273794b5af60dd22.zip
maint: improve sc_prohibit_strncmp syntax check
* .gnulib: Update, for sc_prohibit_strcmp fix. * cfg.mk: Adjust copyright; the only FSF portions come from when this file was copied from coreutils. (sc_prohibit_strncmp): Copy bug-fixes from sc_prohibit_strcmp. * .x-sc_prohibit_strcmp: Delete, now that rule is smarter. * .x-sc_prohibit_strncmp: Likewise. * Makefile.am (syntax_check_exceptions): Track deletion.
m---------.gnulib0
-rw-r--r--.x-sc_prohibit_strcmp1
-rw-r--r--.x-sc_prohibit_strncmp1
-rw-r--r--Makefile.am2
-rw-r--r--cfg.mk7
5 files changed, 4 insertions, 7 deletions
diff --git a/.gnulib b/.gnulib
-Subproject 4f2c339efdaf1fcca9eed7b0700083b5e24942d
+Subproject 9779055889c2715b593930e39ead552759b5ddc
diff --git a/.x-sc_prohibit_strcmp b/.x-sc_prohibit_strcmp
deleted file mode 100644
index b7c456e8f..000000000
--- a/.x-sc_prohibit_strcmp
+++ /dev/null
@@ -1 +0,0 @@
-^gnulib/
diff --git a/.x-sc_prohibit_strncmp b/.x-sc_prohibit_strncmp
deleted file mode 100644
index 8be205529..000000000
--- a/.x-sc_prohibit_strncmp
+++ /dev/null
@@ -1 +0,0 @@
-^src/internal\.h$
diff --git a/Makefile.am b/Makefile.am
index c525e65bd..36463f547 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -33,8 +33,6 @@ syntax_check_exceptions = \
.x-sc_prohibit_nonreentrant \
.x-sc_prohibit_readlink \
.x-sc_prohibit_sprintf \
- .x-sc_prohibit_strcmp \
- .x-sc_prohibit_strncmp \
.x-sc_prohibit_strncpy \
.x-sc_prohibit_test_minus_ao \
.x-sc_prohibit_VIR_ERR_NO_MEMORY \
diff --git a/cfg.mk b/cfg.mk
index d4c791a0d..d4c593fe3 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -1,5 +1,6 @@
# Customize Makefile.maint. -*- makefile -*-
-# Copyright (C) 2003-2010 Free Software Foundation, Inc.
+# Copyright (C) 2008-2011 Red Hat, Inc.
+# Copyright (C) 2003-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -250,9 +251,9 @@ sc_prohibit_close:
# Similar to the gnulib maint.mk rule for sc_prohibit_strcmp
# Use STREQLEN or STRPREFIX rather than comparing strncmp == 0, or != 0.
sc_prohibit_strncmp:
- @grep -nE '! *str''ncmp *\(|\<str''ncmp *\([^)]+\) *==' \
+ @grep -nE '! *str''ncmp *\(|\<str''ncmp *\(.+\) *[!=]=' \
$$($(VC_LIST_EXCEPT)) \
- | grep -vE ':# *define STREQ\(' && \
+ | grep -vE ':# *define STR(N?EQLEN|PREFIX)\(' && \
{ echo '$(ME): use STREQLEN or STRPREFIX instead of str''ncmp' \
1>&2; exit 1; } || :