Mercurial > hg > octave-lyh > gnulib-hg
changeset 11253:c90f22b1783e
Fix compilation error on non-glibc systems.
author | David Lutterkort <lutter@redhat.com> |
---|---|
date | Tue, 03 Mar 2009 02:51:11 +0100 |
parents | ec97818cc932 |
children | 28202c1cd52d |
files | ChangeLog lib/safe-alloc.h |
diffstat | 2 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-03-02 David Lutterkort <lutter@redhat.com> + + * lib/safe-alloc.h (__GNUC_PREREQ): New macro. + Reported by Tom G. Christensen <tgc@jupiterrise.com>. + 2009-03-02 Bruno Haible <bruno@clisp.org> * doc/gnulib.texi (Exported Symbols of Shared Libraries): New section.
--- a/lib/safe-alloc.h +++ b/lib/safe-alloc.h @@ -26,6 +26,15 @@ # include <stdlib.h> +#ifndef __GNUC_PREREQ +# if defined __GNUC__ && defined __GNUC_MINOR__ +# define __GNUC_PREREQ(maj, min) \ + ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) +# else +# define __GNUC_PREREQ(maj, min) 0 +# endif +#endif + # ifndef ATTRIBUTE_RETURN_CHECK # if __GNUC_PREREQ (3, 4) # define ATTRIBUTE_RETURN_CHECK __attribute__((__warn_unused_result__))