diff options
author | David Lutterkort <lutter@redhat.com> | 2009-03-03 02:51:11 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-03-03 02:51:11 +0100 |
commit | 87bbc7a54407183623f0bcee3b5cb35c34b95e93 (patch) | |
tree | d0dafefc63ae02bbefdda3fbdfa280d36f798868 /lib/safe-alloc.h | |
parent | f824e4c73011002d79e2faa7e8e3b0cbf1fd96b6 (diff) | |
download | gnulib-87bbc7a54407183623f0bcee3b5cb35c34b95e93.tar.gz |
Fix compilation error on non-glibc systems.
Diffstat (limited to 'lib/safe-alloc.h')
-rw-r--r-- | lib/safe-alloc.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/safe-alloc.h b/lib/safe-alloc.h index 3fa3f2eed8..f07ee916c7 100644 --- 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__)) |