grep-commit
[Top][All Lists]
Advanced

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

grep branch, master, updated. v2.5.4-192-g07505db


From: Eric Blake
Subject: grep branch, master, updated. v2.5.4-192-g07505db
Date: Sat, 20 Mar 2010 16:09:32 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  07505db6b97bc6e8a50210ad5bf483894fc75c16 (commit)
      from  159c02545be1bd4342d27c7ea5b9d06459d3c8aa (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=07505db6b97bc6e8a50210ad5bf483894fc75c16


commit 07505db6b97bc6e8a50210ad5bf483894fc75c16
Author: Eric Blake <address@hidden>
Date:   Fri Mar 19 10:34:25 2010 -0600

    build: allow compilation on cygwin
    
    Gnulib is incompatible with -Wunused-macros.  Addtionally,
    cygwin 1.7.1 coupled with --enable-gcc-warnings tripped on:
    
    grep.c: In function 'print_line_middle':
    grep.c:805: error: array subscript has type 'char' [-Wchar-subscripts]
    grep.c: In function 'main':
    grep.c:1833: error: 'optarg' redeclared without dllimport attribute: 
previous dllimport ignored [-Wattributes]
    grep.c:1834: error: 'optind' redeclared without dllimport attribute after 
being referenced with dll linkage
    
    * configure.ac (GNULIB_WARN_FLAGS): Disable -Wunused-macros.
    * src/grep.c (print_line_middle): Use correct type to tolower.
    (main): Drop useless redeclarations.
    * .gitignore: Ignore more built files.
    
    Signed-off-by: Eric Blake <address@hidden>

diff --git a/.gitignore b/.gitignore
index 32f9208..435321a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,10 @@
+!/gnulib-tests/Makefile.am
 !/lib/Makefile.am
 !/lib/savedir.c
 !/lib/savedir.h
 !/m4/djgpp.m4
 *.a
+*.exe
 *.o
 *~
 .deps
@@ -19,6 +21,7 @@
 /config.status
 /configure
 /configure.ac
+/gnulib-tests/*
 /lib/*
 /lib/charset.alias
 /lib/configmake.h
diff --git a/configure.ac b/configure.ac
index 50fcf5c..85f1563 100644
--- a/configure.ac
+++ b/configure.ac
@@ -130,7 +130,7 @@ if test "$gl_gcc_warnings" = yes; then
   # Remove the following and save the result in GNULIB_WARN_CFLAGS.
   nw=
   #nw="$nw -Wuninitialized"
-  #nw="$nw -Wunused-macros"
+  nw="$nw -Wunused-macros"
   #nw="$nw -Wmissing-prototypes"
   nw="$nw -Wold-style-definition"
   gl_MANYWARN_COMPLEMENT([GNULIB_WARN_CFLAGS], [$WARN_CFLAGS], [$nw])
diff --git a/src/grep.c b/src/grep.c
index 8193bc5..f4cd875 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -802,7 +802,7 @@ print_line_middle (const char *beg, const char *lim,
       /* This can't possibly be correct with UTF-8,
         but it's equivalent to what was there so far.  */
       while (--i >= 0)
-       buf[i] = tolower(beg[i]);
+       buf[i] = tolower((unsigned char) beg[i]);
     }
   else
     {
@@ -1830,8 +1830,6 @@ main (int argc, char **argv)
   int opt, cc, status;
   int default_context;
   FILE *fp;
-  extern char *optarg;
-  extern int optind;
 
   initialize_main (&argc, &argv);
   set_program_name (argv[0]);

-----------------------------------------------------------------------

Summary of changes:
 .gitignore   |    3 +++
 configure.ac |    2 +-
 src/grep.c   |    4 +---
 3 files changed, 5 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
grep




reply via email to

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