Module Name:    othersrc
Committed By:   agc
Date:           Mon Aug  3 00:43:12 UTC 2020

Modified Files:
        othersrc/external/historical/eawk/dist: ext.c
        othersrc/external/historical/eawk/lib: Makefile

Log Message:
Make this compile with gcc 8.4.0


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 othersrc/external/historical/eawk/dist/ext.c
cvs rdiff -u -r1.2 -r1.3 othersrc/external/historical/eawk/lib/Makefile

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

Modified files:

Index: othersrc/external/historical/eawk/dist/ext.c
diff -u othersrc/external/historical/eawk/dist/ext.c:1.1 othersrc/external/historical/eawk/dist/ext.c:1.2
--- othersrc/external/historical/eawk/dist/ext.c:1.1	Fri May 31 05:56:36 2013
+++ othersrc/external/historical/eawk/dist/ext.c	Mon Aug  3 00:43:12 2020
@@ -100,7 +100,8 @@ eawk_use_module(eawk_t *eawk, const char
 	void		*init;
 	void		*lib;
 	char		 path[MAXPATHLEN];
-	char		 buf[64];
+	char		 buf[MAXPATHLEN * 2];
+	char		 funcname[64];
 	int		(*func)(eawk_t *);
 
 	if (eawk_find_lib(eawk, module) < 0) {
@@ -110,9 +111,9 @@ eawk_use_module(eawk_t *eawk, const char
 			fprintf(stderr, "%s\n", buf);
 			return 0;
 		}
-		snprintf(buf, sizeof(buf), "eawk_use_%s", module);
-		if ((init = dlsym(lib, buf)) == NULL) {
-			snprintf(buf, sizeof(buf), "lib \"%s\" func %s not found", path, buf);
+		snprintf(funcname, sizeof(funcname), "eawk_use_%s", module);
+		if ((init = dlsym(lib, funcname)) == NULL) {
+			snprintf(buf, sizeof(buf), "lib \"%s\" func %s not found", path, funcname);
 			fprintf(stderr, "%s\n", buf);
 			return 0;
 		}

Index: othersrc/external/historical/eawk/lib/Makefile
diff -u othersrc/external/historical/eawk/lib/Makefile:1.2 othersrc/external/historical/eawk/lib/Makefile:1.3
--- othersrc/external/historical/eawk/lib/Makefile:1.2	Wed Jan 17 01:38:37 2018
+++ othersrc/external/historical/eawk/lib/Makefile	Mon Aug  3 00:43:12 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2018/01/17 01:38:37 agc Exp $
+#	$NetBSD: Makefile,v 1.3 2020/08/03 00:43:12 agc Exp $
 
 .include <bsd.own.mk>
 
@@ -11,6 +11,7 @@ CPPFLAGS+=	-I. -I${DIST} -DHAS_ISBLANK
 YFLAGS+= -p eawk_ -d 
 CPPFLAGS.run.c+= -Wno-format-nonliteral
 CPPFLAGS.tran.c+= -Wno-format-nonliteral
+CPPFLAGS.lex.c+= -Wno-multistatement-macros
 #CPPFLAGS+= -DYYPARSE_PARAM_TYPE='void *'
 #CPPFLAGS+= -DYYPARSE_PARAM=awkp
 #CPPFLAGS+= -DYYLEX_PARAM=awkp

Reply via email to