[libvirt] [PATCH 2/7] maint: improve sc_prohibit_strncmp syntax check

Eric Blake eblake at redhat.com
Fri Jan 14 20:48:02 UTC 2011


* .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.
---

The current list of gnulib differences:

* .gnulib 4f2c339...9779055 (40):
  > filemode: Make function declarations usable in C++ mode.
  > save-cwd: no longer include "xgetcwd.h"
  > ftoastr: split into 3 modules ftoastr, dtoastr, ldtoastr
  > save-cwd: remove #if-!HAVE_FCHDIR'd code; use the fchdir module
  > openat, save-cwd: avoid xmalloc
  > openat: Increase OPENAT_BUFFER_SIZE from 512 to at least 1024
  > doc: Update users.txt.
  > missing @item
  > document configmake in the manual instead of the source
  > Update to Unicode 6.0.0.
  > Update to Unicode 5.2.0.
  > New Unicode character properties, from Unicode 5.2.0.
  > New module 'unictype/property-changes-when-casemapped'.
  > New module 'unictype/property-changes-when-casefolded'.
  > New module 'unictype/property-changes-when-titlecased'.
  > New module 'unictype/property-changes-when-uppercased'.
  > New module 'unictype/property-changes-when-lowercased'.
  > New module 'unictype/property-case-ignorable'.
  > New module 'unictype/property-cased'.
  > Update to Unicode 5.2.0.
  > useless-if-before-free: fix typo in --help and make the internal,
  > uniwidth/width: Fix width of U+1D173..U+1D17A.
  > uninorm tests: Preserve copyright of Unicode data file.
  > gen-uni-tables: Oops, fix last commit.
  > gen-uni-tables: Prepare for Unicode 5.2.0.
  > unilbrk: Clarify gen-uni-tables.c code.
  > strtod: Restore errno when successfully parsing Infinity or NaN.
  > remove test: Avoid failure on HP-UX 11.
  > mkdir, mkdirat tests: Avoid failure on HP-UX 11.11.
  > ignore-value: clarify some comments
  > ignore-value: support aggregate types
  > maint.mk: improve sc_prohibit_strcmp regex
  > maint: fix ChangeLog order
  > signal: work around Haiku issue with SIGBUS
  > maint.mk: add pre-release check to ensure submodule commits are public
  > ignore-value: make ignore_value more generic; deprecate ignore_ptr
  > doc: regenerate INSTALL
  > Merge remote branch 'origin/coreutils-8.9'
  > Merge branch 'coreutils-8.9'
  > avoid an unnecessary sub-shell


 .gnulib                |    2 +-
 .x-sc_prohibit_strcmp  |    1 -
 .x-sc_prohibit_strncmp |    1 -
 Makefile.am            |    2 --
 cfg.mk                 |    7 ++++---
 5 files changed, 5 insertions(+), 8 deletions(-)
 delete mode 100644 .x-sc_prohibit_strcmp
 delete mode 100644 .x-sc_prohibit_strncmp

diff --git a/.gnulib b/.gnulib
index 4f2c339..9779055 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit 4f2c339efdaf1fcca9eed7b0700083b5e24942d4
+Subproject commit 9779055889c2715b593930e39ead552759b5ddc2
diff --git a/.x-sc_prohibit_strcmp b/.x-sc_prohibit_strcmp
deleted file mode 100644
index b7c456e..0000000
--- 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 8be2055..0000000
--- a/.x-sc_prohibit_strncmp
+++ /dev/null
@@ -1 +0,0 @@
-^src/internal\.h$
diff --git a/Makefile.am b/Makefile.am
index c525e65..36463f5 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 d4c791a..d4c593f 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; } || :

-- 
1.7.3.4




More information about the libvir-list mailing list