2003-12-26 Martin Mares <mj@ucw.cz>
+ * pciutils.h, common.c, setpci.c: Introduced a NONRET macro encapsulating
+ the GCC specific __attribute__((noreturn)) and killed the hack with
+ redefining __attribute__ on non-GCC compilers.
+
* Makefile: Added missing dependencies. Parallel builds work now.
Problem reported by Andreas Haumer <andreas@xss.co.at>, but I chose
a different fix.
/*
* Linux PCI Utilities -- Common Functions
*
- * Copyright (c) 1997--1999 Martin Mares <mj@ucw.cz>
+ * Copyright (c) 1997--2003 Martin Mares <mj@ucw.cz>
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
#include "pciutils.h"
-void __attribute__((noreturn))
+void NONRET
die(char *msg, ...)
{
va_list args;
/*
* Linux PCI Utilities -- Declarations
*
- * Copyright (c) 1997--1999 Martin Mares <mj@ucw.cz>
+ * Copyright (c) 1997--2003 Martin Mares <mj@ucw.cz>
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
#define PCIUTILS_VERSION PCILIB_VERSION
#if !defined(__GNUC__)
-#define __attribute__(x)
+#define NONRET
#define inline
+#else
+#define NONRET __attribute__((noreturn))
#endif
-void __attribute__((noreturn)) die(char *msg, ...);
+void die(char *msg, ...) NONRET;
void *xmalloc(unsigned int howmuch);
int parse_generic_option(int i, struct pci_access *pacc, char *optarg);
{ 0x00, 0, NULL }
};
-static void usage(void) __attribute__((noreturn));
-
-static void
+static void NONRET
usage(void)
{
fprintf(stderr,