bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exception to space-tab rule


From: Jim Meyering
Subject: Re: Exception to space-tab rule
Date: Mon, 14 Mar 2011 15:23:11 +0100

Reuben Thomas wrote:
> make syntax-check is complaining about space-tabs (sc_space_tab) in a
> sort of file where this is perfectly permissable: a .diff file. Why do
> I have a diff file in version control? Because I'm patching gnulib.
>
> Of course, I can add this to VC_LIST_ALWAYS_EXCLUDE_REGEX, but maybe
> .diff files should be excluded from this check anyway?

They're expected only in .diff files for which
the original has context lines that start with a TAB.
For that reason (in gnulib, that is only a very small fraction
of all files), I think it's slightly better to let those who
need it add a line like this to a file named .x-sc_space_tab

^gl/lib/.*\.c\.diff$

However, I find that adding a whole new .x-sc_* file
just to exempt an exceptional source file from one of the
many syntax checks is a disproportionate burden.
It has always bothered me to do that.

So finally, here's a proposed maint.mk patch to implement a better way,
followed by the change induced in coreutils where I remove its 24
.x-sc_* files, replacing them with just 30 lines at the end of cfg.mk:

Notes on the naming of these new exception-specifying variables:
  - the resulting variable names are rather long.  I erred on the side
  of being too descriptive.  They're going to be used at most once, then
  probably forgotten forever.

  - I don't like the fact that they have a common *suffix* rather
  than a common prefix.  That's just what I did in the first cut.
  They do have a common sc_ suffix, so maybe that's ok,
  but the long common part, -exclude_file_name_regexp is at the end,
  and that makes the list in cfg.mk harder to read, so I'm leaning
  towards reversing, i.e., changing this
    sc_space_tab-exclude_file_name_regexp = \
  to this
    _exclude_file_name_regexp--sc_space_tab = \
  Note the leading underscore and two hyphens.  The former to make
  it less likely to collied with application names, and the latter
  to make it clearer where the long common prefix ends and the
  variable suffix starts.

Plus I'll have to split the long line 10 lines down:

diff --git a/top/maint.mk b/top/maint.mk
index 303e9c1..0720dc7 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -57,11 +57,12 @@ endif
 # In order to be able to consistently filter "."-relative names,
 # (i.e., with no $(srcdir) prefix), this definition is careful to
 # remove any $(srcdir) prefix, and to restore what it removes.
+_sc_excl = $(if $(address@hidden),$(address@hidden),^$$)
 VC_LIST_EXCEPT = \
   $(VC_LIST) | sed 's|^$(_dot_escaped_srcdir)/||' \
        | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \
          else grep -Ev -e "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi \
-       | grep -Ev -e '$(VC_LIST_ALWAYS_EXCLUDE_REGEX)' \
+       | grep -Ev -e '($(VC_LIST_ALWAYS_EXCLUDE_REGEX)|$(_sc_excl))' \
        $(_prepend_srcdir_prefix)

 ifeq ($(origin prev_version_file), undefined)
@@ -196,6 +197,12 @@ syntax-check: $(local-check)
 #  halt
 #
 #     Message to display before to halting execution.
+#
+# Finally, you may exempt files based on an ERE matching file names.
+# For example, to exempt from the sc_space_tab check all files with the
+# .diff suffix from the set this Make variable:
+#
+# sc_space_tab-exclude_file_name_regexp = \.diff$

 # By default, _sc_search_regexp does not ignore case.
 export ignore_case =
@@ -233,7 +240,10 @@ define _sc_search_regexp
                                                                        \
    : Filter by file name;                                              \
    if test -n "$$in_files"; then                                       \
-     files=$$(find $(srcdir) | grep -E "$$in_files");                  \
+     _gl_exclude_re='$(address@hidden)';                       \
+     test -z "$$_gl_exclude_re" && _gl_exclude_re='^$$';               \
+     files=$$(find $(srcdir) | grep -E "$$in_files"                    \
+              | grep -Ev "$$_gl_exclude_re");                          \
    else                                                                        
\
      files=$$($(VC_LIST_EXCEPT));                                      \
      if test -n "$$in_vc_files"; then                                  \


>From 04cf87961db3aedf5966f3547ec19d532b131877 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Mon, 14 Mar 2011 14:26:38 +0100
Subject: [PATCH] maint: stop using .x-sc_* files to list syntax-check
 exemptions

Instead, use the brand new mechanism with which you merely use a
variable (derived from the rule name) defined in cfg.mk to an ERE
matching the exempted file names.
* Makefile.am (syntax_check_exceptions): Remove variable.
(EXTRA_DIST): Remove use of the variable.
* cfg.mk (sc_x_sc_dist_check): Remove rule, no longer useful.
(sc_space_tab-exclude_file_name_regexp): Define variable.
(sc_bindtextdomain-exclude_file_name_regexp): Likewise.
(sc_unmarked_diagnostics-exclude_file_name_regexp): Likewise.
(sc_error_message_uppercase-exclude_file_name_regexp): Likewise.
(sc_trailing_blank-exclude_file_name_regexp): Likewise.
(sc_system_h_headers-exclude_file_name_regexp): Likewise.
(sc_require_config_h_first-exclude_file_name_regexp): Likewise.
(sc_require_config_h-exclude_file_name_regexp): Likewise.
(sc_po_check-exclude_file_name_regexp): Likewise.
(sc_prohibit_always-defined_macros-exclude_file_name_regexp): Likewise.
(sc_prohibit_empty_lines_at_EOF-exclude_file_name_regexp): Likewise.
(sc_program_name-exclude_file_name_regexp): Likewise.
(sc_file_system-exclude_file_name_regexp): Likewise.
(sc_prohibit_always_true_header_tests-exclude_file_name_regexp):
Likewise.
(sc_prohibit_fail_0-exclude_file_name_regexp): Likewise.
(sc_prohibit_atoi_atof-exclude_file_name_regexp): Likewise.
(sc_prohibit_tab_based_indentation-exclude_file_name_regexp): Likewise.
(sc_prohibit_stat_st_blocks-exclude_file_name_regexp): Likewise.
* configure.ac [whether localtime caches TZ]: Use return 0/1, not
exit (0/1) to avoid triggering a sc_prohibit_magic_number_exit failure.
* .x-sc_GPL_version: Remove file.
* .x-sc_bindtextdomain: Likewise.
* .x-sc_error_message_uppercase: Likewise.
* .x-sc_file_system: Likewise.
* .x-sc_obsolete_symbols: Likewise.
* .x-sc_po_check: Likewise.
* .x-sc_program_name: Likewise.
* .x-sc_prohibit_always-defined_macros: Likewise.
* .x-sc_prohibit_always_true_header_tests: Likewise.
* .x-sc_prohibit_atoi_atof: Likewise.
* .x-sc_prohibit_empty_lines_at_EOF: Likewise.
* .x-sc_prohibit_fail_0: Likewise.
* .x-sc_prohibit_magic_number_exit: Likewise.
* .x-sc_prohibit_stat_st_blocks: Likewise.
* .x-sc_prohibit_strcmp: Likewise.
* .x-sc_prohibit_tab_based_indentation: Likewise.
* .x-sc_require_config_h: Likewise.
* .x-sc_require_config_h_first: Likewise.
* .x-sc_space_tab (config): Likewise.
* .x-sc_sun_os_names: Likewise.
* .x-sc_system_h_headers: Likewise.
* .x-sc_trailing_blank: Likewise.
* .x-sc_unmarked_diagnostics: Likewise.
* .x-sc_useless_cpp_parens: Likewise.
---
 .x-sc_GPL_version                       |    1 -
 .x-sc_bindtextdomain                    |    7 -----
 .x-sc_error_message_uppercase           |    1 -
 .x-sc_file_system                       |    5 ---
 .x-sc_obsolete_symbols                  |    1 -
 .x-sc_po_check                          |    1 -
 .x-sc_program_name                      |    3 --
 .x-sc_prohibit_always-defined_macros    |    1 -
 .x-sc_prohibit_always_true_header_tests |    2 -
 .x-sc_prohibit_atoi_atof                |    1 -
 .x-sc_prohibit_empty_lines_at_EOF       |    1 -
 .x-sc_prohibit_fail_0                   |    4 ---
 .x-sc_prohibit_magic_number_exit        |    2 -
 .x-sc_prohibit_stat_st_blocks           |    4 ---
 .x-sc_prohibit_strcmp                   |    1 -
 .x-sc_prohibit_tab_based_indentation    |    7 -----
 .x-sc_require_config_h                  |    9 ------
 .x-sc_require_config_h_first            |    9 ------
 .x-sc_space_tab                         |   12 --------
 .x-sc_sun_os_names                      |    2 -
 .x-sc_system_h_headers                  |    3 --
 .x-sc_trailing_blank                    |    1 -
 .x-sc_unmarked_diagnostics              |    2 -
 .x-sc_useless_cpp_parens                |   13 ---------
 Makefile.am                             |   27 ------------------
 cfg.mk                                  |   45 ++++++++++++++++++++++---------
 configure.ac                            |   10 +++---
 27 files changed, 37 insertions(+), 138 deletions(-)
 delete mode 100644 .x-sc_GPL_version
 delete mode 100644 .x-sc_bindtextdomain
 delete mode 100644 .x-sc_error_message_uppercase
 delete mode 100644 .x-sc_file_system
 delete mode 100644 .x-sc_obsolete_symbols
 delete mode 100644 .x-sc_po_check
 delete mode 100644 .x-sc_program_name
 delete mode 100644 .x-sc_prohibit_always-defined_macros
 delete mode 100644 .x-sc_prohibit_always_true_header_tests
 delete mode 100644 .x-sc_prohibit_atoi_atof
 delete mode 100644 .x-sc_prohibit_empty_lines_at_EOF
 delete mode 100644 .x-sc_prohibit_fail_0
 delete mode 100644 .x-sc_prohibit_magic_number_exit
 delete mode 100644 .x-sc_prohibit_stat_st_blocks
 delete mode 100644 .x-sc_prohibit_strcmp
 delete mode 100644 .x-sc_prohibit_tab_based_indentation
 delete mode 100644 .x-sc_require_config_h
 delete mode 100644 .x-sc_require_config_h_first
 delete mode 100644 .x-sc_space_tab
 delete mode 100644 .x-sc_sun_os_names
 delete mode 100644 .x-sc_system_h_headers
 delete mode 100644 .x-sc_trailing_blank
 delete mode 100644 .x-sc_unmarked_diagnostics
 delete mode 100644 .x-sc_useless_cpp_parens

diff --git a/.x-sc_GPL_version b/.x-sc_GPL_version
deleted file mode 100644
index d496afa..0000000
--- a/.x-sc_GPL_version
+++ /dev/null
@@ -1 +0,0 @@
-^build-aux/check\.mk$
diff --git a/.x-sc_bindtextdomain b/.x-sc_bindtextdomain
deleted file mode 100644
index 2a568be..0000000
--- a/.x-sc_bindtextdomain
+++ /dev/null
@@ -1,7 +0,0 @@
-^gl/lib/randint\.c$
-^gl/tests/test-di-set\.c$
-^gl/tests/test-fadvise\.c$
-^gl/tests/test-ino-map\.c$
-^gl/tests/test-mbsalign\.c$
-^gl/tests/test-rand-isaac\.c$
-^lib/euidaccess-stat\.c$
diff --git a/.x-sc_error_message_uppercase b/.x-sc_error_message_uppercase
deleted file mode 100644
index 2452230..0000000
--- a/.x-sc_error_message_uppercase
+++ /dev/null
@@ -1 +0,0 @@
-build-aux/cvsu
diff --git a/.x-sc_file_system b/.x-sc_file_system
deleted file mode 100644
index e997182..0000000
--- a/.x-sc_file_system
+++ /dev/null
@@ -1,5 +0,0 @@
-ChangeLog
-NEWS
-src/df.c
-src/stat.c
-tests/misc/df-P
diff --git a/.x-sc_obsolete_symbols b/.x-sc_obsolete_symbols
deleted file mode 100644
index 56631ab..0000000
--- a/.x-sc_obsolete_symbols
+++ /dev/null
@@ -1 +0,0 @@
-ChangeLog
diff --git a/.x-sc_po_check b/.x-sc_po_check
deleted file mode 100644
index ffa8d97..0000000
--- a/.x-sc_po_check
+++ /dev/null
@@ -1 +0,0 @@
-^gl/
diff --git a/.x-sc_program_name b/.x-sc_program_name
deleted file mode 100644
index 86cc5c1..0000000
--- a/.x-sc_program_name
+++ /dev/null
@@ -1,3 +0,0 @@
-gl/lib/randint.c
-lib/euidaccess-stat.c
-gl/tests/.*\.c
diff --git a/.x-sc_prohibit_always-defined_macros 
b/.x-sc_prohibit_always-defined_macros
deleted file mode 100644
index 8c96958..0000000
--- a/.x-sc_prohibit_always-defined_macros
+++ /dev/null
@@ -1 +0,0 @@
-src/seq.c
diff --git a/.x-sc_prohibit_always_true_header_tests 
b/.x-sc_prohibit_always_true_header_tests
deleted file mode 100644
index 732d9ec..0000000
--- a/.x-sc_prohibit_always_true_header_tests
+++ /dev/null
@@ -1,2 +0,0 @@
-^m4/stat-prog\.m4$
-ChangeLog
diff --git a/.x-sc_prohibit_atoi_atof b/.x-sc_prohibit_atoi_atof
deleted file mode 100644
index f66450e..0000000
--- a/.x-sc_prohibit_atoi_atof
+++ /dev/null
@@ -1 +0,0 @@
-^lib/euidaccess-stat\.c$
diff --git a/.x-sc_prohibit_empty_lines_at_EOF 
b/.x-sc_prohibit_empty_lines_at_EOF
deleted file mode 100644
index 92571d6..0000000
--- a/.x-sc_prohibit_empty_lines_at_EOF
+++ /dev/null
@@ -1 +0,0 @@
-^tests/pr/
diff --git a/.x-sc_prohibit_fail_0 b/.x-sc_prohibit_fail_0
deleted file mode 100644
index 7055351..0000000
--- a/.x-sc_prohibit_fail_0
+++ /dev/null
@@ -1,4 +0,0 @@
-\.mk$
-/Makefile\.am$
-^tests/init\.sh$
-^tests/test-lib\.sh$
diff --git a/.x-sc_prohibit_magic_number_exit b/.x-sc_prohibit_magic_number_exit
deleted file mode 100644
index ffeb5ac..0000000
--- a/.x-sc_prohibit_magic_number_exit
+++ /dev/null
@@ -1,2 +0,0 @@
-configure.ac
-ChangeLog*
diff --git a/.x-sc_prohibit_stat_st_blocks b/.x-sc_prohibit_stat_st_blocks
deleted file mode 100644
index eb590cd..0000000
--- a/.x-sc_prohibit_stat_st_blocks
+++ /dev/null
@@ -1,4 +0,0 @@
-src/system.h
-tests/du/2g
-old/fileutils/ChangeLog-1997
-ChangeLog-2005
diff --git a/.x-sc_prohibit_strcmp b/.x-sc_prohibit_strcmp
deleted file mode 100644
index 56631ab..0000000
--- a/.x-sc_prohibit_strcmp
+++ /dev/null
@@ -1 +0,0 @@
-ChangeLog
diff --git a/.x-sc_prohibit_tab_based_indentation 
b/.x-sc_prohibit_tab_based_indentation
deleted file mode 100644
index 388f94a..0000000
--- a/.x-sc_prohibit_tab_based_indentation
+++ /dev/null
@@ -1,7 +0,0 @@
-^GNUMakefile$
-Makefile\.am$
-\.mk$
-^tests/pr/
-ChangeLog.*
-^man/help2man$
-^gl/lib/.*\.c\.diff$
diff --git a/.x-sc_require_config_h b/.x-sc_require_config_h
deleted file mode 100644
index 727bb8e..0000000
--- a/.x-sc_require_config_h
+++ /dev/null
@@ -1,9 +0,0 @@
-^lib/buffer-lcm\.c$
-^src/false\.c$
-^src/lbracket\.c$
-^src/ls-dir\.c$
-^src/ls-ls\.c$
-^src/ls-vdir\.c$
-^src/tac-pipe\.c$
-^src/uname-arch\.c$
-^src/uname-uname\.c$
diff --git a/.x-sc_require_config_h_first b/.x-sc_require_config_h_first
deleted file mode 100644
index 727bb8e..0000000
--- a/.x-sc_require_config_h_first
+++ /dev/null
@@ -1,9 +0,0 @@
-^lib/buffer-lcm\.c$
-^src/false\.c$
-^src/lbracket\.c$
-^src/ls-dir\.c$
-^src/ls-ls\.c$
-^src/ls-vdir\.c$
-^src/tac-pipe\.c$
-^src/uname-arch\.c$
-^src/uname-uname\.c$
diff --git a/.x-sc_space_tab b/.x-sc_space_tab
deleted file mode 100644
index 2ef3428..0000000
--- a/.x-sc_space_tab
+++ /dev/null
@@ -1,12 +0,0 @@
-config(ure|\.(guess|sub))
-tests/pr
-lib/regex.c
-config-log
-tests/misc/nl
-po/de.po
-m4/lib-ld.m4
-m4/lib-prefix.m4
-m4/po.m4
-aclocal.m4
-src/c99-to-c89.diff
-^gl/lib/.*\.c\.diff$
diff --git a/.x-sc_sun_os_names b/.x-sc_sun_os_names
deleted file mode 100644
index 3ffc52c..0000000
--- a/.x-sc_sun_os_names
+++ /dev/null
@@ -1,2 +0,0 @@
-config-log
-build-aux/config.guess
diff --git a/.x-sc_system_h_headers b/.x-sc_system_h_headers
deleted file mode 100644
index 14e020f..0000000
--- a/.x-sc_system_h_headers
+++ /dev/null
@@ -1,3 +0,0 @@
-^src/libstdbuf\.c$
-^src/system\.h$
-^src/copy\.h$
diff --git a/.x-sc_trailing_blank b/.x-sc_trailing_blank
deleted file mode 100644
index 92571d6..0000000
--- a/.x-sc_trailing_blank
+++ /dev/null
@@ -1 +0,0 @@
-^tests/pr/
diff --git a/.x-sc_unmarked_diagnostics b/.x-sc_unmarked_diagnostics
deleted file mode 100644
index aac8984..0000000
--- a/.x-sc_unmarked_diagnostics
+++ /dev/null
@@ -1,2 +0,0 @@
-^lib/xstrtol\.h$
-^build-aux/cvsu$
diff --git a/.x-sc_useless_cpp_parens b/.x-sc_useless_cpp_parens
deleted file mode 100644
index 01eb4b4..0000000
--- a/.x-sc_useless_cpp_parens
+++ /dev/null
@@ -1,13 +0,0 @@
-^build-aux/config.guess
-^configure
-^lib/alloca.c
-^lib/fts.c
-^lib/getdate.c
-^lib/getloadavg.c
-^lib/gettext.h
-^lib/getusershell.c
-^lib/mbswidth.c
-^lib/strtod.c
-^lib/xstrtol.c
-^m4/
-^tests/misc/pwd-unreadable-parent
diff --git a/Makefile.am b/Makefile.am
index 18f09b7..9322658 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -39,35 +39,8 @@ changelog_etc =                              \
   old/textutils/NEWS                   \
   po/ChangeLog-2007

-syntax_check_exceptions =              \
-  .x-sc_GPL_version                    \
-  .x-sc_bindtextdomain                 \
-  .x-sc_error_message_uppercase                \
-  .x-sc_file_system                    \
-  .x-sc_obsolete_symbols               \
-  .x-sc_po_check                       \
-  .x-sc_program_name                   \
-  .x-sc_prohibit_always-defined_macros \
-  .x-sc_prohibit_atoi_atof             \
-  .x-sc_prohibit_empty_lines_at_EOF    \
-  .x-sc_prohibit_fail_0                        \
-  .x-sc_prohibit_magic_number_exit     \
-  .x-sc_prohibit_stat_st_blocks                \
-  .x-sc_prohibit_strcmp                        \
-  .x-sc_prohibit_tab_based_indentation \
-  .x-sc_require_config_h               \
-  .x-sc_require_config_h_first         \
-  .x-sc_space_tab                      \
-  .x-sc_sun_os_names                   \
-  .x-sc_system_h_headers               \
-  .x-sc_trailing_blank                 \
-  .x-sc_prohibit_always_true_header_tests \
-  .x-sc_unmarked_diagnostics           \
-  .x-sc_useless_cpp_parens
-
 EXTRA_DIST =                           \
   $(changelog_etc)                     \
-  $(syntax_check_exceptions)           \
   .mailmap                             \
   .prev-version                                \
   .version                             \
diff --git a/cfg.mk b/cfg.mk
index c897dc4..3e96aff 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -93,19 +93,6 @@ sc_root_tests:
               exit 1; } || :;                                          \
        fi

-# Ensure that the syntax_check_exceptions file list in Makefile.am
-# stays in sync with corresponding files in the repository.
-sce = syntax_check_exceptions
-sc_x_sc_dist_check:
-       @test "$$( ($(VC_LIST) | sed -n '/\.x-sc_/p'                    \
-                    | sed 's|^$(_dot_escaped_srcdir)/||';              \
-                  sed -n '/^$(sce) =[   ]*\\$$/,/[^\]$$/p'             \
-                    $(srcdir)/Makefile.am                              \
-                      | sed 's/^  *//;/^$(sce) =/d'                    \
-                      | tr -s '\012\\' '  ' | fmt -1                   \
-                  ) | sort | uniq -u)"                                 \
-         && { echo 'Makefile.am: $(sce) mismatch' >&2; exit 1; } || :;
-
 # Create a list of regular expressions matching the names
 # of files included from system.h.  Exclude a couple.
 .re-list:
@@ -337,3 +324,35 @@ include $(srcdir)/dist-check.mk
 update-copyright-env = \
   UPDATE_COPYRIGHT_USE_INTERVALS=1 \
   UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79
+
+# List syntax-check exemptions.
+sc_space_tab-exclude_file_name_regexp = \
+  ^(tests/pr/|tests/misc/nl$$|gl/.*\.diff$$)
+sc_bindtextdomain-exclude_file_name_regexp = ^(gl/.*|lib/euidaccess-stat)\.c$$
+sc_unmarked_diagnostics-exclude_file_name_regexp =    ^build-aux/cvsu$$
+sc_error_message_uppercase-exclude_file_name_regexp = ^build-aux/cvsu$$
+sc_trailing_blank-exclude_file_name_regexp = ^tests/pr/
+sc_system_h_headers-exclude_file_name_regexp = \
+  ^src/((system|copy)\.h|libstdbuf\.c)$$
+
+_src = (false|lbracket|ls-(dir|ls|vdir)|tac-pipe|uname-(arch|uname))
+sc_require_config_h_first-exclude_file_name_regexp = \
+  (^lib/buffer-lcm\.c|src/$(_src)\.c)$$
+sc_require_config_h-exclude_file_name_regexp = \
+  $(sc_require_config_h_first-exclude_file_name_regexp)
+
+sc_po_check-exclude_file_name_regexp = ^gl/
+sc_prohibit_always-defined_macros-exclude_file_name_regexp = ^src/seq\.c$$
+sc_prohibit_empty_lines_at_EOF-exclude_file_name_regexp = ^tests/pr/
+sc_program_name-exclude_file_name_regexp = ^(gl/.*|lib/euidaccess-stat)\.c$$
+sc_file_system-exclude_file_name_regexp = NEWS|^(src/df\.c|tests/misc/df-P)$$
+sc_prohibit_always_true_header_tests-exclude_file_name_regexp = \
+  ^m4/stat-prog\.m4$$
+sc_prohibit_fail_0-exclude_file_name_regexp = \
+  (^tests/init\.sh|Makefile\.am|\.mk)$$
+sc_prohibit_atoi_atof-exclude_file_name_regexp = ^lib/euidaccess-stat\.c$$
+sc_prohibit_tab_based_indentation-exclude_file_name_regexp = \
+  ^tests/pr/|(^gl/lib/reg.*\.c\.diff|Makefile(\.am)?|\.mk|^man/help2man)$$
+
+sc_prohibit_stat_st_blocks-exclude_file_name_regexp = \
+  ^(src/system\.h|tests/du/2g)$$
diff --git a/configure.ac b/configure.ac
index bc9933d..116c545 100644
--- a/configure.ac
+++ b/configure.ac
@@ -162,18 +162,18 @@ int main()
   time_t now = time ((time_t *) 0);
   int hour_GMT0, hour_unset;
   if (putenv ("TZ=GMT0") != 0)
-    exit (1);
+    return 1;
   hour_GMT0 = localtime (&now)->tm_hour;
   unset_TZ ();
   hour_unset = localtime (&now)->tm_hour;
   if (putenv ("TZ=PST8") != 0)
-    exit (1);
+    return 1;
   if (localtime (&now)->tm_hour == hour_GMT0)
-    exit (1);
+    return 1;
   unset_TZ ();
   if (localtime (&now)->tm_hour != hour_unset)
-    exit (1);
-  exit (0);
+    return 1;
+  return 1;
 }]])],
 [utils_cv_localtime_cache=no],
 [utils_cv_localtime_cache=yes],
--
1.7.4.1.408.gb6b16



reply via email to

[Prev in Thread] Current Thread [Next in Thread]