[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Findutils-patches] [PATCH 07/19] configure.ac: Quote the first argument
From: |
James Youngman |
Subject: |
[Findutils-patches] [PATCH 07/19] configure.ac: Quote the first argument to AC_DEFINE. |
Date: |
Fri, 2 Apr 2010 23:47:07 +0100 |
Signed-off-by: James Youngman <address@hidden>
---
ChangeLog | 12 ++++++++++++
configure.ac | 16 ++++++++--------
2 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9abbc98..4163d15 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2010-04-02 James Youngman <address@hidden>
+ Move safe_atoi out into a separate module.
+ * find/parser.c: Include "safe-atoi.h". Remove the body of safe_atoi.
+ (parse_group): pass options.err_quoting_style to safe_atoi.
+ (insert_depthspec): Likewise.
+ (parse_user): Likewise.
+ * lib/safe-atoi.h: New file.
+ * lib/safe-atoi.c: New file. Add parameter for quoting style (to
+ avoid an external reference to the "options"struct).
+ * lib/Makefile.am (libfind_a_SOURCES): Add safe-atoi.c and
+ safe-atoi.h.
+
Avoid false positives for the sc_prohibit_test_minus_ao syntax check.
* doc/find.texi (Updating A Timestamp File): Work around a syntax
check designed to prevent the use of "test X -a Y".
@@ -24,6 +35,7 @@
pointer-to-int conversion.
* lib/buildcmd.c: #include <stdlib.h> for declaration of free.
+ Fix some space-followed-by-tab sequences.
* NEWS: Change space-tab sequences to just spaces.
* build-aux/check-testfiles.sh (main): Likewise
* build-aux/src-sniff.py (checkers): Likewise.
diff --git a/configure.ac b/configure.ac
index e48af13..974efc4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,7 +18,7 @@ FIND_WITH_FTS
AC_ARG_ENABLE(id-cache,
[ --enable-id-cache cache all UIDs & GIDs; avoid if using NIS or
Hesiod],
- AC_DEFINE(CACHE_IDS, 1, [Define if you want find -nouser and -nogroup to
make tables of
+ AC_DEFINE([CACHE_IDS], 1, [Define if you want find -nouser and -nogroup to
make tables of
used UIDs and GIDs at startup instead of using getpwuid or
getgrgid when needed. Speeds up -nouser and -nogroup unless you
are running NIS or Hesiod, which make password and group calls
@@ -49,8 +49,8 @@ if test x$ac_cv_debug = xno; then
AC_MSG_RESULT([no])
else
AC_MSG_RESULT([yes])
- AC_DEFINE(DEBUG, 1, [Define if you want to see find's innards])
- AC_DEFINE(DEBUG_STAT, 1, [Define if you want to see a message every time
find calls the stat() system call])
+ AC_DEFINE([DEBUG], 1, [Define if you want to see find's innards])
+ AC_DEFINE([DEBUG_STAT], 1, [Define if you want to see a message every time
find calls the stat() system call])
fi
AC_MSG_CHECKING([for leaf optimisation])
@@ -58,7 +58,7 @@ if test x$ac_cv_leaf_optimisation = xno; then
AC_MSG_RESULT([no])
else
AC_MSG_RESULT([yes])
- AC_DEFINE(LEAF_OPTIMISATION, 1, [Define if you want to use the leaf
optimisation (this can still be turned off with -noleaf)])
+ AC_DEFINE([LEAF_OPTIMISATION], 1, [Define if you want to use the leaf
optimisation (this can still be turned off with -noleaf)])
fi
AC_ARG_VAR([DEFAULT_ARG_SIZE], [Default size of arguments to child processes
@@ -112,9 +112,9 @@ AC_CHECK_FUNC(getpwnam, [],
[AC_CHECK_LIB(sun, getpwnam)])
AC_CHECK_LIB([m],[modf],[FINDLIBS="-lm $FINDLIBS"]
- AC_DEFINE_UNQUOTED(HAVE_MODF_IN_LIBM,1,[modf is defined in -lm]))
+ AC_DEFINE_UNQUOTED([HAVE_MODF_IN_LIBM],1,[modf is defined in -lm]))
AC_CHECK_LIB([m],[fabs],[FINDLIBS="-lm $FINDLIBS"]
- AC_DEFINE_UNQUOTED(HAVE_FABS_IN_LIBM,1,[fabs is defined in -lm]))
+ AC_DEFINE_UNQUOTED([HAVE_FABS_IN_LIBM],1,[fabs is defined in -lm]))
AC_SUBST([FINDLIBS])
dnl Checks for header files.
@@ -153,10 +153,10 @@ if test x$ac_cv_d_type = xno; then
AC_MSG_RESULT([no])
else
AC_MSG_RESULT([yes])
- AC_DEFINE(USE_STRUCT_DIRENT_D_TYPE, 1,
+ AC_DEFINE([USE_STRUCT_DIRENT_D_TYPE], 1,
[Defined if you specify --enable-d_type-optimisation to configure.])
AC_CHECK_MEMBERS([struct dirent.d_type],[
- AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE, 1,
+ AC_DEFINE([HAVE_STRUCT_DIRENT_D_TYPE], 1,
[Define to 1 if your 'struct dirent' has a d_type member])],
[],[
#include <sys/types.h>
--
1.7.0
- [Findutils-patches] Re: [PATCH 03/19] Fix some space-followed-by-tab sequences., (continued)
- [Findutils-patches] [PATCH 06/19] Avoid false positives for the sc_prohibit_test_minus_ao syntax check., James Youngman, 2010/04/02
- [Findutils-patches] [PATCH 04/19] Fix some compilation unused-result and missing-declaration warnings., James Youngman, 2010/04/02
- [Findutils-patches] [PATCH 08/19] Move safe_atoi out into a separate module., James Youngman, 2010/04/02
- [Findutils-patches] [PATCH 09/19] Remove some obsolete source files from POTFILES.in, James Youngman, 2010/04/02
- [Findutils-patches] [PATCH 10/19] Remove files which exist but have no translated messages., James Youngman, 2010/04/02
- [Findutils-patches] [PATCH 11/19] Avoid sscanf. Avoid false positives for sc_prohibit_atoi_atof., James Youngman, 2010/04/02
- [Findutils-patches] [PATCH 07/19] configure.ac: Quote the first argument to AC_DEFINE.,
James Youngman <=
- [Findutils-patches] [PATCH 13/19] Enable syntax checker sc_the_the, detecting doubled 'the'., James Youngman, 2010/04/02
- [Findutils-patches] [PATCH 12/19] sc_prohibit_strcmp gives false positives when neither argument is a constant, so skip that check, James Youngman, 2010/04/02
- [Findutils-patches] [PATCH 14/19] Avoid sc_prohibit_stat_st_blocks check, since it is broken., James Youngman, 2010/04/02
- [Findutils-patches] [PATCH 16/19] Use set_program_name() to remember the programs' names., James Youngman, 2010/04/02
- [Findutils-patches] [PATCH 15/19] Avoid using magic numbers as exit statuses., James Youngman, 2010/04/02
- [Findutils-patches] [PATCH 18/19] cfg.mk: simplify variables, James Youngman, 2010/04/02
- [Findutils-patches] [PATCH 17/19] Don't include quote.h/quotearg.h where it is not used., James Youngman, 2010/04/02
- [Findutils-patches] [PATCH 19/19] Check for accidental modifications to the wrong section of the NEWS file., James Youngman, 2010/04/02