bug-gnu-utils
[Top][All Lists]
Advanced

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

My patch for grep 2.5


From: Pavel Jan Lastovicka
Subject: My patch for grep 2.5
Date: Tue, 14 Oct 2003 09:12:18 +0200

Hello,

I am sending patches I had to make in order that grep 2.5 compiled and
ran correctly on my system. I'm not including patch for the documentation
because the most recent texinfo for my system is 3.11.
If anybody is interested, he can ask for explanation.

Pavel Lastovicka


*** grep-2.5/lib/getopt.c       Sun Mar  4 06:33:12 2001
--- new/lib/getopt.c    Sat Aug  2 23:26:04 2003
***************
*** 78,82 ****
  /* This is for other GNU distributions with internationalized messages.
     When compiling libc, the _ macro is predefined.  */
! # ifdef HAVE_LIBINTL_H
  #  include <libintl.h>
  #  define _(msgid)    gettext (msgid)
--- 78,82 ----
  /* This is for other GNU distributions with internationalized messages.
     When compiling libc, the _ macro is predefined.  */
! # ifdef ENABLE_NLS
  #  include <libintl.h>
  #  define _(msgid)    gettext (msgid)
***************
*** 108,112 ****
     each non-option ARGV-element is returned here.  */
  
! char *optarg;
  
  /* Index in ARGV of the next element to be scanned.
--- 108,112 ----
     each non-option ARGV-element is returned here.  */
  
! char *optarg = NULL;
  
  /* Index in ARGV of the next element to be scanned.
diff -2cbr grep-2.5/lib/Makefile.in new/lib/Makefile.in
*** grep-2.5/lib/Makefile.in    Wed Mar 13 16:23:50 2002
--- new/lib/Makefile.in Thu Jul 31 09:17:32 2003
***************
*** 242,246 ****
  @AMDEP_TRUE@  depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' 
@AMDEPBACKSLASH@
  @AMDEP_TRUE@  $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
!       $(COMPILE) -c `cygpath -w $<`
  CCDEPMODE = @CCDEPMODE@
  alloca_.c: alloca.c $(ANSI2KNR)
--- 242,246 ----
  @AMDEP_TRUE@  depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' 
@AMDEPBACKSLASH@
  @AMDEP_TRUE@  $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
!       $(COMPILE) -c $<
  CCDEPMODE = @CCDEPMODE@
  alloca_.c: alloca.c $(ANSI2KNR)
diff -2cbr grep-2.5/lib/obstack.c new/lib/obstack.c
*** grep-2.5/lib/obstack.c      Sun Mar  4 06:33:12 2001
--- new/lib/obstack.c   Fri Aug  1 10:03:52 2003
***************
*** 452,456 ****
  /* Define the error handler.  */
  #ifndef _
! # ifdef HAVE_LIBINTL_H
  #  include <libintl.h>
  #  ifndef _
--- 452,456 ----
  /* Define the error handler.  */
  #ifndef _
! # ifdef ENABLE_NLS
  #  include <libintl.h>
  #  ifndef _
diff -2cbr grep-2.5/src/dfa.c new/src/dfa.c
*** grep-2.5/src/dfa.c  Wed Sep 26 18:57:54 2001
--- new/src/dfa.c       Fri Aug  1 10:06:16 2003
***************
*** 103,107 ****
  /* glibc defines _ */
  #ifndef _
! # ifdef HAVE_LIBINTL_H
  #  include <libintl.h>
  #  ifndef _
--- 103,107 ----
  /* glibc defines _ */
  #ifndef _
! # ifdef ENABLE_NLS
  #  include <libintl.h>
  #  ifndef _
diff -2cbr grep-2.5/src/grep.c new/src/grep.c
*** grep-2.5/src/grep.c Wed Mar 13 15:49:52 2002
--- new/src/grep.c      Thu Jul 24 23:16:24 2003
***************
*** 165,169 ****
      RECURSE_DIRECTORIES,
      SKIP_DIRECTORIES
!   } directories = READ_DIRECTORIES;
  
  /* How to handle devices. */
--- 165,169 ----
      RECURSE_DIRECTORIES,
      SKIP_DIRECTORIES
!   } directories = SKIP_DIRECTORIES;
  
  /* How to handle devices. */
***************
*** 1696,1706 ****
    if ((argc - optind > 1 && !no_filenames) || with_filenames)
      out_file = 1;
- 
- #ifdef SET_BINARY
-   /* Output is set to binary mode because we shouldn't convert
-      NL to CR-LF pairs, especially when grepping binary files.  */
-   if (!isatty (1))
-     SET_BINARY (1);
- #endif
  
    if (max_count == 0)
--- 1696,1699 ----
diff -2cbr grep-2.5/src/Makefile.in new/src/Makefile.in
*** grep-2.5/src/Makefile.in    Wed Mar 13 16:23:50 2002
--- new/src/Makefile.in Thu Jul 24 23:15:12 2003
***************
*** 207,211 ****
  
  .c.obj:
!       $(COMPILE) -c `cygpath -w $<`
  dfa_.c: dfa.c $(ANSI2KNR)
        $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) 
$(CPPFLAGS) `if test -f
$(srcdir)/dfa.c; then echo $(srcdir)/dfa.c; else echo dfa.c; fi` | sed 's/^#
\([0-9]\)/#line \1/' | $(ANSI2KNR) > dfa_.c || rm -f dfa_.c
--- 207,211 ----
  
  .c.obj:
!       $(COMPILE) -c $<
  dfa_.c: dfa.c $(ANSI2KNR)
        $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) 
$(CPPFLAGS) `if test -f
$(srcdir)/dfa.c; then echo $(srcdir)/dfa.c; else echo dfa.c; fi` | sed 's/^#
\([0-9]\)/#line \1/' | $(ANSI2KNR) > dfa_.c || rm -f dfa_.c
diff -2cbr grep-2.5/tests/file.sh new/tests/file.sh
*** grep-2.5/tests/file.sh      Mon Nov 19 14:23:28 2001
--- new/tests/file.sh   Wed Aug 27 10:18:36 2003
***************
*** 48,52 ****
  fi
  
! cp /dev/null patfile
  
  # null pattern : no match
--- 48,52 ----
  fi
  
! cat < /dev/null > patfile
  
  # null pattern : no match
diff -2cbr grep-2.5/tests/khadafy.sh new/tests/khadafy.sh
*** grep-2.5/tests/khadafy.sh   Mon Nov 19 14:23:28 2001
--- new/tests/khadafy.sh        Wed Aug 27 10:17:00 2003
***************
*** 10,14 ****
  
  ${GREP} -E -f $srcdir/khadafy.regexp $srcdir/khadafy.lines > khadafy.out
! if cmp $srcdir/khadafy.lines khadafy.out
  then
        :
--- 10,14 ----
  
  ${GREP} -E -f $srcdir/khadafy.regexp $srcdir/khadafy.lines > khadafy.out
! if diff $srcdir/khadafy.lines khadafy.out
  then
        :
Only in grep-2.5/vms: make.com





reply via email to

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