diff options
author | Bruno Haible <bruno@clisp.org> | 2011-11-12 10:05:52 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-11-12 10:07:16 +0100 |
commit | 171c09d9ea74dc1ba1699ec6f13c75fc3bc81d64 (patch) | |
tree | 6ef77489650bd083f5b576528d80d1c1ac4cdaa9 | |
parent | 7cd23606c5d678378c84a2e6bc9915486679f9cf (diff) | |
download | grep-171c09d9ea74dc1ba1699ec6f13c75fc3bc81d64.tar.gz |
build: fix compilation error on MSVC 9 to due Pexecute() declaration
* src/pcresearch.c (WITHOUT_PCRE_NORETURN): Remove macro.
(Pexecute): Replace abort() call with code that does not trigger GCC
warnings.
-rw-r--r-- | src/pcresearch.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/pcresearch.c b/src/pcresearch.c index 5ccc6269..7b865f54 100644 --- a/src/pcresearch.c +++ b/src/pcresearch.c @@ -101,19 +101,14 @@ Pcompile (char const *pattern, size_t size) #endif } -/* Pexecute is a no-return function when building --without-pcre. */ -#if !HAVE_LIBPCRE -# define WITHOUT_PCRE_NORETURN _Noreturn -#else -# define WITHOUT_PCRE_NORETURN /* empty */ -#endif - -size_t WITHOUT_PCRE_NORETURN +size_t Pexecute (char const *buf, size_t size, size_t *match_size, char const *start_ptr) { #if !HAVE_LIBPCRE - abort (); + /* We can't get here, because Pcompile would have been called earlier. */ + error (EXIT_TROUBLE, 0, _("internal error")); + return -1; #else /* This array must have at least two elements; everything after that is just for performance improvement in pcre_exec. */ |