behoffski wrote: > I can suggest two ways of dealing with this: Either respect any previous > definition:
That's what Emacs does, so I changed 'grep' to do that, as follows. Thanks for reporting the bug. >From 15e16023b8318b6eece1325eb2ea9d3fcfbc77ad Mon Sep 17 00:00:00 2001 From: Paul Eggert <[email protected]> Date: Sun, 20 Oct 2013 15:05:14 -0700 Subject: [PATCH] build: port to platforms that predefine _FORTIFY_SOURCE Problem reported by Brenton Hoff (Bug#15663). * configure.ac (_FORTIFY_SOURCE): Don't define if already defined. This is what Emacs does. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 5c93d04..6ce7237 100644 --- a/configure.ac +++ b/configure.ac @@ -159,7 +159,7 @@ if test "$gl_gcc_warnings" = yes; then AH_VERBATIM([FORTIFY_SOURCE], [/* Enable compile-time and run-time bounds-checking, and some warnings, without upsetting glibc 2.15+. */ - #if defined __OPTIMIZE__ && __OPTIMIZE__ + #if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__ # define _FORTIFY_SOURCE 2 #endif ]) -- 1.8.3.1
