changeset 191:c8d4ab9aeff0

don't use "remove" as a local variable; fails on gcc4.1 (because of remove() in stdio.h)
author David A. Holland
date Fri, 12 Jun 2015 20:06:55 -0400
parents 6947cd2cde79
children 255db24bc29b
files CHANGES macro.c
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES	Fri Jun 12 20:06:09 2015 -0400
+++ b/CHANGES	Fri Jun 12 20:06:55 2015 -0400
@@ -1,3 +1,7 @@
+pending
+   - Don't use "remove" as a local variable as gcc 4.1 gets upset
+     about it vs. remove(3) in stdio.h.
+
 release 0.5 (20150612)
    - Don't report unclosed comments as "No newline at end of file".
    - Don't rely on <stdbool.h> existing, as (predictably) it doesn't
--- a/macro.c	Fri Jun 12 20:06:09 2015 -0400
+++ b/macro.c	Fri Jun 12 20:06:55 2015 -0400
@@ -340,7 +340,7 @@
 
 static
 struct macro *
-macrotable_findlen(const char *name, size_t len, bool remove)
+macrotable_findlen(const char *name, size_t len, bool remove_it)
 {
 	unsigned hash;
 	struct macroarray *bucket;
@@ -361,7 +361,7 @@
 		}
 		mlen = strlen(m->name);
 		if (len == mlen && !memcmp(name, m->name, len)) {
-			if (remove) {
+			if (remove_it) {
 				if (i < num-1) {
 					m2 = macroarray_get(bucket, num-1);
 					macroarray_set(bucket, i, m2);
@@ -377,9 +377,9 @@
 
 static
 struct macro *
-macrotable_find(const char *name, bool remove)
+macrotable_find(const char *name, bool remove_it)
 {
-	return macrotable_findlen(name, strlen(name), remove);
+	return macrotable_findlen(name, strlen(name), remove_it);
 }
 
 static