changeset 107:33954a07d013

__unused -> UNUSED
author David A. Holland
date Tue, 11 Jun 2013 12:15:47 -0400
parents ecec7c16e3ba
children 0921c47b4f22
files CHANGES eval.c files.c macro.c place.c utils.h
diffstat 6 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES	Tue Jun 11 11:35:27 2013 -0400
+++ b/CHANGES	Tue Jun 11 12:15:47 2013 -0400
@@ -5,6 +5,8 @@
    - don't use getprogname() in the name of portability
    - add tests arising from December 2010 tech-toolchain thread (one
      from der Mouse, one of mine)
+   - clean out usage of sys/cdefs.h macros and don't use the implementation
+     namespace
 
 release 0.1 (20130610)
    - first release, works with at least some imake templates
--- a/eval.c	Tue Jun 11 11:35:27 2013 -0400
+++ b/eval.c	Tue Jun 11 12:15:47 2013 -0400
@@ -132,7 +132,7 @@
 	enum tokens tok;
 	int val;
 };
-DECLARRAY(token, static __unused);
+DECLARRAY(token, static UNUSED);
 DEFARRAY(token, static);
 
 static struct tokenarray tokens;
--- a/files.c	Tue Jun 11 11:35:27 2013 -0400
+++ b/files.c	Tue Jun 11 12:15:47 2013 -0400
@@ -46,7 +46,7 @@
 	bool issystem;
 };
 
-DECLARRAY(incdir, static __unused);
+DECLARRAY(incdir, static UNUSED);
 DEFARRAY(incdir, static);
 
 static struct incdirarray quotepath, bracketpath;
--- a/macro.c	Tue Jun 11 11:35:27 2013 -0400
+++ b/macro.c	Tue Jun 11 12:15:47 2013 -0400
@@ -44,7 +44,7 @@
 		unsigned param;
 	};
 };
-DECLARRAY(expansionitem, static __unused);
+DECLARRAY(expansionitem, static UNUSED);
 DEFARRAY(expansionitem, static);
 
 struct macro {
@@ -57,9 +57,9 @@
 	struct expansionitemarray expansion;
 	bool inuse;
 };
-DECLARRAY(macro, static __unused);
+DECLARRAY(macro, static UNUSED);
 DEFARRAY(macro, static);
-DECLARRAY(macroarray, static __unused);
+DECLARRAY(macroarray, static UNUSED);
 DEFARRAY(macroarray, static);
 
 static struct macroarrayarray macros;
--- a/place.c	Tue Jun 11 11:35:27 2013 -0400
+++ b/place.c	Tue Jun 11 12:15:47 2013 -0400
@@ -42,7 +42,7 @@
 	int depth;
 	bool fromsystemdir;
 };
-DECLARRAY(placefile, static __unused);
+DECLARRAY(placefile, static UNUSED);
 DEFARRAY(placefile, static);
 
 static struct placefilearray placefiles;
--- a/utils.h	Tue Jun 11 11:35:27 2013 -0400
+++ b/utils.h	Tue Jun 11 12:15:47 2013 -0400
@@ -35,9 +35,11 @@
 #if defined(__CLANG__) || defined(__GNUC__)
 #define PF(a, b) __attribute__((__format__(__printf__, a, b)))
 #define DEAD __attribute__((__noreturn__))
+#define UNUSED __attribute__((__unused__))
 #else
 #define PF(a, b)
 #define DEAD
+#define UNUSED
 #endif
 
 #define HOWMANY(arr) (sizeof(arr)/sizeof((arr)[0]))