summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-02-26 06:54:48 -0700
committerEric Blake <ebb9@byu.net>2009-02-26 07:00:30 -0700
commit9a2a8f0b3e01be360e8e928a7b583e05d22b89ff (patch)
tree090d487fb5d5758cfc1b95e607b1c16dfa8df654
parent3f1579c470bdee6469d9fa6e2465529ab95360bf (diff)
downloadcoreutils-9a2a8f0b3e01be360e8e928a7b583e05d22b89ff.tar.xz
argv-iter: avoid variadic macro
* gl/lib/argv-iter.h (_ATTRIBUTE_NONNULL_): Don't assume C99 variadic macros are portable yet; needed for at least IRIX/MIPSpro. * THANKS: Update. Reported by Stuart Shelton.
-rw-r--r--THANKS1
-rw-r--r--gl/lib/argv-iter.h8
2 files changed, 5 insertions, 4 deletions
diff --git a/THANKS b/THANKS
index 5c25321d7..81911da07 100644
--- a/THANKS
+++ b/THANKS
@@ -513,6 +513,7 @@ Steven G. Johnson stevenj@alum.mit.edu
Steven Mocking ufo@quicknet.nl
Steven P Watson steven@magelico.net
Stuart Kemp skemp@peter.bmc.com
+Stuart Shelton stuart@shelton.me
Sven Joachim svenjoac@gmx.de
Szakacsits Szabolcs szaka@sienet.hu
Tadayoshi Funaba tadf@kt.rim.or.jp
diff --git a/gl/lib/argv-iter.h b/gl/lib/argv-iter.h
index 06a397c9e..537fb1ea2 100644
--- a/gl/lib/argv-iter.h
+++ b/gl/lib/argv-iter.h
@@ -1,5 +1,5 @@
/* Iterate over arguments from argv or --files0-from=FILE
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2009 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
@@ -22,9 +22,9 @@ enum argv_iter_err;
#undef _ATTRIBUTE_NONNULL_
#if __GNUC__ == 3 && __GNUC_MINOR__ >= 3 || 3 < __GNUC__
-# define _ATTRIBUTE_NONNULL_(m,...) __attribute__ ((__nonnull__ (m)))
+# define _ATTRIBUTE_NONNULL_(m) __attribute__ ((__nonnull__ (m)))
#else
-# define _ATTRIBUTE_NONNULL_(m,...)
+# define _ATTRIBUTE_NONNULL_(m)
#endif
enum argv_iter_err
@@ -40,7 +40,7 @@ struct argv_iterator *argv_iter_init_argv (char **argv)
struct argv_iterator *argv_iter_init_stream (FILE *fp)
_ATTRIBUTE_NONNULL_ (1);
char *argv_iter (struct argv_iterator *, enum argv_iter_err *)
- _ATTRIBUTE_NONNULL_ (1, 2);
+ _ATTRIBUTE_NONNULL_ (1) _ATTRIBUTE_NONNULL_ (2);
size_t argv_iter_n_args (struct argv_iterator const *)
_ATTRIBUTE_NONNULL_ (1);
void argv_iter_free (struct argv_iterator *)