source:
patches/grep-2.6.3-fixes-1.patch@
957d7a0
Last change on this file since 957d7a0 was 4cc665a, checked in by , 14 years ago | |
---|---|
|
|
File size: 9.1 KB |
-
grep-2.6.3
Submitted By: Joe Ciccone Date: 2010-08-03 Initial Package Version: 2.6.3 Upstream Status: Unknown Origin: http://ftp.de.debian.org/debian/pool/main/g/grep/grep_2.6.3-3.debian.tar.bz2 Description: Various fixes from debian for Grep diff -Naur grep-2.6.3.orig/NEWS grep-2.6.3/NEWS
old new 1 1 GNU grep NEWS -*- outline -*- 2 2 3 --mmap was meant to be ignored in 2.6.x, but it was instead 4 removed by mistake. [bug introduced in 2.6] 5 3 6 * Noteworthy changes in release 2.6.3 (2010-04-02) [stable] 4 7 5 8 ** Bug fixes -
configure
diff -Naur grep-2.6.3.orig/configure grep-2.6.3/configure
old new 24372 24372 if test "$ac_res" != no; then : 24373 24373 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 24374 24374 test "$ac_cv_search_pcre_compile" = "none required" || 24375 LIB _PCRE=$ac_cv_search_pcre_compile24375 LIB="-ldl $LIBS" 24376 24376 fi 24377 24377 24378 24378 for ac_func in pcre_compile 24379 24379 do : 24380 24380 ac_fn_c_check_func "$LINENO" "pcre_compile" "ac_cv_func_pcre_compile" 24381 24381 if test "x$ac_cv_func_pcre_compile" = x""yes; then : 24382 CPPFLAGS="$CPPFLAGS -DHAVE_DYNAMIC_LIBPCRE" 24382 24383 cat >>confdefs.h <<_ACEOF 24383 24384 #define HAVE_PCRE_COMPILE 1 24384 24385 _ACEOF -
doc/grep.in.1
diff -Naur grep-2.6.3.orig/doc/grep.in.1 grep-2.6.3/doc/grep.in.1
old new 25 25 .hy 0 26 26 . 27 27 .SH NAME 28 grep, egrep, fgrep \- print lines matching a pattern28 grep, egrep, fgrep, rgrep \- print lines matching a pattern 29 29 . 30 30 .SH SYNOPSIS 31 31 .B grep … … 56 56 .B grep 57 57 prints the matching lines. 58 58 .PP 59 In addition, two variant programs 60 .B egrep 61 and 59 In addition, three variant programs 60 .B egrep, 62 61 .B fgrep 62 and 63 .B rgrep 63 64 are available. 64 65 .B egrep 65 66 is the same as … … 67 68 .B fgrep 68 69 is the same as 69 70 .BR "grep\ \-F" . 71 .B rgrep 72 is the same as 73 .BR "grep\ \-r" . 70 74 Direct invocation as either 71 75 .B egrep 72 76 or … … 825 829 is not special if it would be the start of an invalid interval 826 830 specification. 827 831 For example, the command 828 .B "grep\ \-E\ '{1'"832 .B "grep\ \-E\ \(aq{1\(aq" 829 833 searches for the two-character string 830 834 .B {1 831 835 instead of reporting a syntax error in the regular expression. … … 865 869 For example, if 866 870 .B GREP_OPTIONS 867 871 is 868 .BR " '\-\^\-binary-files=without-match \-\^\-directories=skip'" ,872 .BR "\(aq\-\^\-binary-files=without-match \-\^\-directories=skip\(aq" , 869 873 .B grep 870 874 behaves as if the two options 871 875 .B \-\^\-binary\-files=without-match … … 1160 1164 is not set. 1161 1165 . 1162 1166 .SH "EXIT STATUS" 1163 Normally, the exit status is 0 if selected lines are found and 1 otherwise. 1164 But the exit status is 2 if an error occurred, unless the 1165 .B \-q 1166 or 1167 .B \-\^\-quiet 1168 or 1169 .B \-\^\-silent 1170 option is used and a selected line is found. 1171 Note, however, that \s-1POSIX\s0 only mandates, for programs such as 1172 .BR grep , 1173 .BR cmp , 1174 and 1175 .BR diff , 1176 that the exit status in case of error be greater than 1; 1177 it is therefore advisable, for the sake of portability, 1178 to use logic that tests for this general condition 1179 instead of strict equality with\ 2. 1167 The exit status is 0 if selected lines are found, and 1 if not found. 1168 If an error occurred the exit status is 2. (Note: POSIX error 1169 handling code should check for '2' or greater.) 1180 1170 . 1181 1171 .SH COPYRIGHT 1182 1172 Copyright 1998-2000, 2002, 2005-2010 Free Software Foundation, Inc. -
grep-2.6.3
diff -Naur grep-2.6.3.orig/po/ca.po grep-2.6.3/po/ca.po
old new 278 278 #: src/main.c:1165 279 279 #, c-format 280 280 msgid "Binary file %s matches\n" 281 msgstr "Co ncidència en el fitxer binari %s\n"281 msgstr "Coincidència en el fitxer binari %s\n" 282 282 283 283 #: src/main.c:1179 284 284 msgid "(standard input)" -
src/kwset.c
diff -Naur grep-2.6.3.orig/src/kwset.c grep-2.6.3/src/kwset.c
old new 40 40 #ifdef GREP 41 41 # include "xalloc.h" 42 42 # undef malloc 43 # define malloc (s) xmalloc(s)43 # define malloc xmalloc 44 44 #endif 45 45 46 46 #define NCHAR (UCHAR_MAX + 1) -
src/main.c
diff -Naur grep-2.6.3.orig/src/main.c grep-2.6.3/src/main.c
old new 266 266 static char const short_options[] = 267 267 "0123456789A:B:C:D:EFGHIPTUVX:abcd:e:f:hiKLlm:noqRrsuvwxyZz"; 268 268 269 /* Default for `file_list' if no files are given on the command line. */ 270 static char *stdin_argv[] = 271 { 272 "-", NULL 273 }; 274 269 275 /* Non-boolean long options that have no corresponding short equivalents. */ 270 276 enum 271 277 { … … 511 517 for byte sentinels fore and aft. */ 512 518 newalloc = newsize + pagesize + 1; 513 519 514 newbuf = bufalloc < newalloc ? xmalloc (bufalloc = newalloc) : buffer; 520 newbuf = bufalloc < newalloc ? malloc (bufalloc = newalloc) : buffer; 521 if (newbuf == NULL) 522 { 523 int saved_errno = errno; 524 free (buffer); 525 bufalloc = ALIGN_TO (INITIAL_BUFSIZE, pagesize) + pagesize + 1; 526 buffer = xmalloc (bufalloc); 527 errno = saved_errno; 528 return 0; 529 } 515 530 readbuf = ALIGN_TO (newbuf + 1 + save, pagesize); 516 531 bufbeg = readbuf - save; 517 532 memmove (bufbeg, buffer + saved_offset, save); … … 1739 1754 int opt, cc, status; 1740 1755 int default_context; 1741 1756 FILE *fp; 1757 char **file_list; 1742 1758 1743 1759 initialize_main (&argc, &argv); 1744 1760 set_program_name (argv[0]); … … 2061 2077 label = optarg; 2062 2078 break; 2063 2079 2080 case MMAP_OPTION: 2064 2081 case 0: 2065 2082 /* long options */ 2066 2083 break; … … 2154 2171 if (max_count == 0) 2155 2172 exit (EXIT_FAILURE); 2156 2173 2157 if (optind < argc) 2174 file_list = (optind == argc ? stdin_argv : &argv[optind]); 2175 2176 status = 1; 2177 while (1) 2158 2178 { 2159 status = 1; 2160 do 2161 { 2162 char *file = argv[optind]; 2163 if ((included_patterns || excluded_patterns) 2164 && !isdir (file)) 2165 { 2166 if (included_patterns && 2167 ! excluded_file_name (included_patterns, file)) 2168 continue; 2169 if (excluded_patterns && 2170 excluded_file_name (excluded_patterns, file)) 2171 continue; 2172 } 2173 status &= grepfile (strcmp (file, "-") == 0 ? (char *) NULL : file, 2174 &stats_base); 2175 } 2176 while ( ++optind < argc); 2179 char *file = *file_list++; 2180 2181 if (file == NULL) 2182 break; 2183 2184 if ((included_patterns || excluded_patterns) 2185 && !isdir (file)) 2186 { 2187 if (included_patterns && 2188 ! excluded_file_name (included_patterns, file)) 2189 continue; 2190 if (excluded_patterns && 2191 excluded_file_name (excluded_patterns, file)) 2192 continue; 2193 } 2194 status &= grepfile (strcmp (file, "-") == 0 2195 ? (char *) NULL : file, &stats_base); 2177 2196 } 2178 else2179 status = grepfile ((char *) NULL, &stats_base);2180 2197 2181 2198 /* We register via atexit() to test stdout. */ 2182 2199 exit (errseen ? EXIT_TROUBLE : status); -
src/pcresearch.c
diff -Naur grep-2.6.3.orig/src/pcresearch.c grep-2.6.3/src/pcresearch.c
old new 22 22 #include "search.h" 23 23 #if HAVE_PCRE_H 24 24 # include <pcre.h> 25 # ifdef HAVE_DYNAMIC_LIBPCRE 26 # include <dlfcn.h> 27 # endif 25 28 #elif HAVE_PCRE_PCRE_H 26 29 # include <pcre/pcre.h> 30 # ifdef HAVE_DYNAMIC_LIBPCRE 31 # include <dlfcn.h> 32 # endif 27 33 #endif 28 34 29 35 #if HAVE_LIBPCRE … … 34 40 static pcre_extra *extra; 35 41 #endif 36 42 43 #ifdef HAVE_DYNAMIC_LIBPCRE 44 45 # define pcre_compile dl_pcre_compile 46 # define pcre_study dl_pcre_study 47 # define pcre_exec dl_pcre_exec 48 # define pcre_maketables dl_pcre_maketables 49 50 static pcre *(*pcre_compile)(const char *pattern, int options, 51 const char **errptr, int *erroffset, 52 const unsigned char *tableptr); 53 static pcre_extra *(*pcre_study)(const pcre *code, int options, 54 const char **errptr); 55 static int (*pcre_exec)(const pcre *code, const pcre_extra *extra, 56 const char *subject, int length, int startoffset, 57 int options, int *ovector, int ovecsize); 58 static const unsigned char *(*pcre_maketables)(void); 59 60 static int 61 map_pcre(void) 62 { 63 void *library; 64 65 if (pcre_maketables) 66 return 1; 67 68 if (!(library = dlopen("libpcre.so.3", RTLD_NOW))) 69 return 0; 70 71 if (!(pcre_compile = dlsym(library, "pcre_compile"))) 72 return 0; 73 if (!(pcre_study = dlsym(library, "pcre_study"))) 74 return 0; 75 if (!(pcre_exec = dlsym(library, "pcre_exec"))) 76 return 0; 77 if (!(pcre_maketables = dlsym(library, "pcre_maketables"))) 78 return 0; 79 80 return 1; 81 } 82 83 #else 84 #define map_pcre() (1) 85 #endif /* HAVE_DYNAMIC_LIBPCRE */ 86 37 87 void 38 88 Pcompile (char const *pattern, size_t size) 39 89 { … … 51 101 char const *p; 52 102 char const *pnul; 53 103 104 if (!map_pcre ()) 105 error (EXIT_TROUBLE, 0, "%s", 106 _("The -P option is not supported: libpcre.so.3 is not available")); 107 54 108 /* FIXME: Remove these restrictions. */ 55 109 if (memchr(pattern, '\n', size)) 56 110 error (EXIT_TROUBLE, 0, _("the -P option only supports a single pattern"));
Note:
See TracBrowser
for help on using the repository browser.