]> xenbits.xensource.com Git - libvirt.git/commitdiff
syntax-check: Sync with gnulib
authorAndrea Bolognani <abologna@redhat.com>
Fri, 16 Feb 2024 14:09:45 +0000 (15:09 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 19 Feb 2024 09:29:28 +0000 (10:29 +0100)
The most notable change is the new 'sc_unportable_grep_q' rule.

While importing it from gnulib, the rule has been tweaked
slightly by adding superflous quotes so that syntax-check.mk
itself doesn't trip it. This is similar to the tricks employed
for the 'sc_prohibit_close' and 'sc_copyright_usage' rules,
among many others.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
build-aux/syntax-check.mk

index eaeb6d4f23fdf0277a1f1d387cb0cf0bbc123c4d..359dcbc5fb85e4987070b75d0b7fd411635b076b 100644 (file)
@@ -1,13 +1,12 @@
 #
-# Rules for running syntax-check, derived from gnulib's
-# maint.mk
+# Rules for running syntax-check, derived from gnulib's top/maint.mk
 #
 # Specifically, all shared code should match gnulib commit
 #
-#   dd2503c8e73621e919e8e214a29c495ac89d8a92 (2022-05-21)
+#   d5191e456737661d4a0df5287f6c2064ab74dbbe (2024-02-15)
 #
 # Copyright (C) 2008-2019 Red Hat, Inc.
-# Copyright (C) 2001-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001-2024 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
@@ -1083,7 +1082,8 @@ sc_prohibit_stdio--_without_use:
        @h='stdio--.h' re='\<((f(re)?|p)open|tmpfile) *\(' \
          $(_sc_header_without_use)
 
-_stddef_syms_re = NULL|offsetof|ptrdiff_t|size_t|wchar_t
+_stddef_syms_re = \
+  NULL|max_align_t|nullptr_t|offsetof|ptrdiff_t|size_t|unreachable|wchar_t
 # Prohibit the inclusion of stddef.h without an actual use.
 sc_prohibit_stddef_without_use:
        @h='stddef.h' \
@@ -1310,6 +1310,10 @@ sc_prohibit_path_max_allocation:
        halt='Avoid stack allocations of size PATH_MAX' \
          $(_sc_search_regexp)
 
+sc_unportable_grep_q:
+       @prohibit='grep ''-q' halt="unportable 'grep ""-q', use >/dev/null instead" \
+         $(_sc_search_regexp)
+
 ifneq ($(_gl-Makefile),)
 syntax-check: sc_spacing-check \
        sc_prohibit-duplicate-header sc_mock-noinline sc_group-qemu-caps \