diff options
Diffstat (limited to 'lib/dirent.in.h')
-rw-r--r-- | lib/dirent.in.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/dirent.in.h b/lib/dirent.in.h index ff27059fb..888241597 100644 --- a/lib/dirent.in.h +++ b/lib/dirent.in.h @@ -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 |