X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fdirent.in.h;h=4822d6b2c402f5b80b16414ffe276ddfb038a91e;hb=cd56634a4a8179fd5a4419fbb3e27211b042ab1c;hp=808b3608565136d3afed9dc927decc1fa6bf8156;hpb=80a029602f5b2707ca8d2487843ecb9e0df74a6a;p=gnulib.git diff --git a/lib/dirent.in.h b/lib/dirent.in.h index 808b36085..4822d6b2c 100644 --- a/lib/dirent.in.h +++ b/lib/dirent.in.h @@ -1,5 +1,5 @@ /* A GNU-like . - Copyright (C) 2006-2012 Free Software Foundation, Inc. + Copyright (C) 2006-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -55,6 +55,14 @@ typedef struct gl_directory DIR; # endif #endif +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The attribute __pure__ was added in gcc 2.96. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +#else +# define _GL_ATTRIBUTE_PURE /* empty */ +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ @@ -229,6 +237,7 @@ _GL_WARN_ON_USE (scandir, "scandir is unportable - " # if !@HAVE_ALPHASORT@ _GL_FUNCDECL_SYS (alphasort, int, (const struct dirent **, const struct dirent **) + _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2))); # endif /* Need to cast, because on glibc systems, the parameters are