Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make(1): use proper types in API of cached_stat...



details:   https://anonhg.NetBSD.org/src/rev/2352b1bdef01
branches:  trunk
changeset: 1013635:2352b1bdef01
user:      rillig <rillig%NetBSD.org@localhost>
date:      Wed Sep 02 03:28:12 2020 +0000

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

diffstat:

 usr.bin/make/dir.c  |  10 +++++-----
 usr.bin/make/make.h |   7 ++++---
 2 files changed, 9 insertions(+), 8 deletions(-)

diffs (70 lines):

diff -r 27b72843712b -r 2352b1bdef01 usr.bin/make/dir.c
--- a/usr.bin/make/dir.c        Wed Sep 02 03:15:21 2020 +0000
+++ b/usr.bin/make/dir.c        Wed Sep 02 03:28:12 2020 +0000
@@ -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 @@
 }
 
 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);
 }
diff -r 27b72843712b -r 2352b1bdef01 usr.bin/make/make.h
--- a/usr.bin/make/make.h       Wed Sep 02 03:15:21 2020 +0000
+++ b/usr.bin/make/make.h       Wed Sep 02 03:28:12 2020 +0000
@@ -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 @@
 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__



Home | Main Index | Thread Index | Old Index