(sc_obsolete_symbols): New rule.
authorJim Meyering <jim@meyering.net>
Sat, 2 Jul 2005 11:58:22 +0000 (11:58 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 2 Jul 2005 11:58:22 +0000 (11:58 +0000)
(syntax-check-rules): Add it to the list.

Makefile.maint

index b242b67..a27690d 100644 (file)
@@ -75,6 +75,7 @@ syntax-check-rules = \
   sc_dd_max_sym_length \
   sc_error_exit_success \
   sc_file_system \
+  sc_obsolete_symbols \
   sc_prohibit_atoi_atof \
   sc_prohibit_jm_in_m4 \
   sc_root_tests \
@@ -147,6 +148,13 @@ sc_file_system:
            'rewrite to use "file system"' 1>&2;                        \
            exit 1; } || :
 
+sc_obsolete_symbols:
+       @( $(CVS_LIST) ) > /dev/null 2>&1 || : &&                       \
+         grep -E '\<(HAVE_(FCNTL|UNISTD)_H)\>'                         \
+            $$($(CVS_LIST) | grep -vEf .x-$@ ) &&                      \
+         { echo '$(ME): do not use HAVE_FCNTL_H or HAVE_UNISTD_H'      \
+               1>&2; exit 1; } || :
+
 # FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ
 
 # Each nonempty line must start with a year number, or a TAB.