X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fargp.h;h=42e39adf6da8a957f4bcc92c8a13d48068770140;hb=87538f0d5dfb46f213de5dfe7ea9ac07bb4c0c9e;hp=461be0a08caaf805e1aaa9ed4d4a230b36317cdf;hpb=79da92e29298a3ec3d620ca21307ea13bf826d17;p=gnulib.git diff --git a/lib/argp.h b/lib/argp.h index 461be0a08..42e39adf6 100644 --- a/lib/argp.h +++ b/lib/argp.h @@ -35,6 +35,31 @@ # define __THROW #endif +#ifndef __attribute__ +/* This feature is available in gcc versions 2.5 and later. */ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ +# define __attribute__(Spec) /* empty */ +# endif +/* The __-protected variants of `format' and `printf' attributes + are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) || __STRICT_ANSI__ +# define __format__ format +# define __printf__ printf +# endif +#endif + +/* GCC 2.95 and later have "__restrict"; C99 compilers have + "restrict", and "configure" may have defined "restrict". */ +#ifndef __restrict +# if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__)) +# if defined restrict || 199901L <= __STDC_VERSION__ +# define __restrict restrict +# else +# define __restrict +# endif +# endif +#endif + #ifndef __error_t_defined typedef int error_t; # define __error_t_defined @@ -379,11 +404,11 @@ struct argp_state extern error_t argp_parse (__const struct argp *__restrict __argp, int __argc, char **__restrict __argv, unsigned __flags, int *__restrict __arg_index, - void *__restrict __input) __THROW; + void *__restrict __input); extern error_t __argp_parse (__const struct argp *__restrict __argp, int __argc, char **__restrict __argv, unsigned __flags, int *__restrict __arg_index, - void *__restrict __input) __THROW; + void *__restrict __input); /* Global variables. */