Module Name:    src
Committed By:   rillig
Date:           Wed Sep  2 03:28:12 UTC 2020

Modified Files:
        src/usr.bin/make: dir.c make.h

Log Message:
make(1): use proper types in API of cached_stat and cached_lstat


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/usr.bin/make/dir.c
cvs rdiff -u -r1.134 -r1.135 src/usr.bin/make/make.h

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/make/dir.c
diff -u src/usr.bin/make/dir.c:1.131 src/usr.bin/make/dir.c:1.132
--- src/usr.bin/make/dir.c:1.131	Wed Sep  2 03:15:21 2020
+++ src/usr.bin/make/dir.c	Wed Sep  2 03:28:12 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: dir.c,v 1.131 2020/09/02 03:15:21 rillig Exp $	*/
+/*	$NetBSD: dir.c,v 1.132 2020/09/02 03:28:12 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: dir.c,v 1.131 2020/09/02 03:15:21 rillig Exp $";
+static char rcsid[] = "$NetBSD: dir.c,v 1.132 2020/09/02 03:28:12 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)dir.c	8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: dir.c,v 1.131 2020/09/02 03:15:21 rillig Exp $");
+__RCSID("$NetBSD: dir.c,v 1.132 2020/09/02 03:28:12 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -337,13 +337,13 @@ cached_stats(Hash_Table *htp, const char
 }
 
 int
-cached_stat(const char *pathname, void *st)
+cached_stat(const char *pathname, struct stat *st)
 {
     return cached_stats(&mtimes, pathname, st, 0);
 }
 
 int
-cached_lstat(const char *pathname, void *st)
+cached_lstat(const char *pathname, struct stat *st)
 {
     return cached_stats(&lmtimes, pathname, st, CST_LSTAT);
 }

Index: src/usr.bin/make/make.h
diff -u src/usr.bin/make/make.h:1.134 src/usr.bin/make/make.h:1.135
--- src/usr.bin/make/make.h:1.134	Mon Aug 31 06:21:07 2020
+++ src/usr.bin/make/make.h	Wed Sep  2 03:28:12 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: make.h,v 1.134 2020/08/31 06:21:07 rillig Exp $	*/
+/*	$NetBSD: make.h,v 1.135 2020/09/02 03:28:12 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -82,6 +82,7 @@
 
 #include <sys/types.h>
 #include <sys/param.h>
+#include <sys/stat.h>
 
 #include <assert.h>
 #include <ctype.h>
@@ -536,8 +537,8 @@ void Main_ExportMAKEFLAGS(Boolean);
 Boolean Main_SetObjdir(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2);
 int mkTempFile(const char *, char **);
 int str2Lst_Append(Lst, char *, const char *);
-int cached_lstat(const char *, void *);
-int cached_stat(const char *, void *);
+int cached_lstat(const char *, struct stat *);
+int cached_stat(const char *, struct stat *);
 void GNode_FprintDetails(FILE *, const char *, const GNode *, const char *);
 
 #ifdef __GNUC__

Reply via email to