Module Name:    src
Committed By:   christos
Date:           Mon Oct 26 21:14:18 UTC 2009

Modified Files:
        src/usr.bin/m4/lib: ohash_do.c ohash_enum.c strtonum.c

Log Message:
fix compilation.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/usr.bin/m4/lib/ohash_do.c \
    src/usr.bin/m4/lib/ohash_enum.c src/usr.bin/m4/lib/strtonum.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/m4/lib/ohash_do.c
diff -u src/usr.bin/m4/lib/ohash_do.c:1.1.1.1 src/usr.bin/m4/lib/ohash_do.c:1.2
--- src/usr.bin/m4/lib/ohash_do.c:1.1.1.1	Mon Oct 26 17:08:59 2009
+++ src/usr.bin/m4/lib/ohash_do.c	Mon Oct 26 17:14:18 2009
@@ -68,7 +68,7 @@
 void *
 ohash_remove(struct ohash *h, unsigned int i)
 {
-	void 		*result = (void *)h->t[i].p;
+	void 		*result = __UNCONST(h->t[i].p);
 
 	if (result == NULL || result == DELETED)
 		return NULL;
@@ -89,7 +89,7 @@
 	if (h->t[i].p == DELETED)
 		return NULL;
 	else
-		return (void *)h->t[i].p;
+		return __UNCONST(h->t[i].p);
 }
 
 void *
Index: src/usr.bin/m4/lib/ohash_enum.c
diff -u src/usr.bin/m4/lib/ohash_enum.c:1.1.1.1 src/usr.bin/m4/lib/ohash_enum.c:1.2
--- src/usr.bin/m4/lib/ohash_enum.c:1.1.1.1	Mon Oct 26 17:08:59 2009
+++ src/usr.bin/m4/lib/ohash_enum.c	Mon Oct 26 17:14:18 2009
@@ -31,6 +31,6 @@
 {
 	for (; *pos < h->size; (*pos)++) 
 		if (h->t[*pos].p != DELETED && h->t[*pos].p != NULL) 
-			return (void *)h->t[(*pos)++].p;
+			return __UNCONST(h->t[(*pos)++].p);
 	return NULL;
 }
Index: src/usr.bin/m4/lib/strtonum.c
diff -u src/usr.bin/m4/lib/strtonum.c:1.1.1.1 src/usr.bin/m4/lib/strtonum.c:1.2
--- src/usr.bin/m4/lib/strtonum.c:1.1.1.1	Mon Oct 26 17:08:59 2009
+++ src/usr.bin/m4/lib/strtonum.c	Mon Oct 26 17:14:18 2009
@@ -16,7 +16,11 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
-
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: strtonum.c,v 1.2 2009/10/26 21:14:18 christos Exp $");
 #include <errno.h>
 #include <limits.h>
 #include <stdlib.h>
@@ -27,6 +31,9 @@
 
 long long
 strtonum(const char *numstr, long long minval, long long maxval,
+    const char **errstrp);
+long long
+strtonum(const char *numstr, long long minval, long long maxval,
     const char **errstrp)
 {
 	long long ll = 0;

Reply via email to