pkgsrc-Changes archive

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

CVS commit: pkgsrc/pkgtools/mktools



Module Name:    pkgsrc
Committed By:   wiz
Date:           Tue Feb 18 15:20:24 UTC 2025

Modified Files:
        pkgsrc/pkgtools/mktools: Makefile
        pkgsrc/pkgtools/mktools/files: mk-buildlink-symlinks.c

Log Message:
mktools: Update to 20250213.

Switch to fgets() to improve C99 compatibility.  Fixes build on macOS
10.4 and probably others.

>From Jonathan Perkin <jperkin%smartos.org@localhost>
via drecklypkg commit 2a95b74bfd5150c253383e019051f524c5c825e3


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/pkgtools/mktools/Makefile
cvs rdiff -u -r1.2 -r1.3 \
    pkgsrc/pkgtools/mktools/files/mk-buildlink-symlinks.c

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

Modified files:

Index: pkgsrc/pkgtools/mktools/Makefile
diff -u pkgsrc/pkgtools/mktools/Makefile:1.4 pkgsrc/pkgtools/mktools/Makefile:1.5
--- pkgsrc/pkgtools/mktools/Makefile:1.4        Mon Jan 13 11:24:47 2025
+++ pkgsrc/pkgtools/mktools/Makefile    Tue Feb 18 15:20:24 2025
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.4 2025/01/13 11:24:47 jperkin Exp $
+# $NetBSD: Makefile,v 1.5 2025/02/18 15:20:24 wiz Exp $
 
-PKGNAME=               mktools-20220614
+PKGNAME=               mktools-20250213
 CATEGORIES=            pkgtools sysutils
 
 MAINTAINER=            pkgsrc-users%pkgsrc.org@localhost

Index: pkgsrc/pkgtools/mktools/files/mk-buildlink-symlinks.c
diff -u pkgsrc/pkgtools/mktools/files/mk-buildlink-symlinks.c:1.2 pkgsrc/pkgtools/mktools/files/mk-buildlink-symlinks.c:1.3
--- pkgsrc/pkgtools/mktools/files/mk-buildlink-symlinks.c:1.2   Tue Jun 14 08:45:33 2022
+++ pkgsrc/pkgtools/mktools/files/mk-buildlink-symlinks.c       Tue Feb 18 15:20:24 2025
@@ -1,4 +1,4 @@
-/* $NetBSD: mk-buildlink-symlinks.c,v 1.2 2022/06/14 08:45:33 jperkin Exp $ */
+/* $NetBSD: mk-buildlink-symlinks.c,v 1.3 2025/02/18 15:20:24 wiz Exp $ */
 
 /*
  * Copyright (c) 2022 Jonathan Perkin <jonathan%perkin.org.uk@localhost>
@@ -33,14 +33,11 @@ extern int mkpath(char *, mode_t, mode_t
 int
 main(int argc, char *argv[])
 {
-       char *line, *path1, *path2, *pdir;
-       size_t len;
-       ssize_t llen;
-
-       for (len = 0, line = NULL; (llen = getline(&line, &len, stdin)) > 0;
-           free(line), line = NULL, len = 0) {
-               if (line[llen - 1] == '\n')
-                       line[llen - 1] = '\0';
+       char buf[4096], *eol, *line, *path1, *path2, *pdir;
+
+       while ((line = fgets(buf, sizeof(buf), stdin)) != NULL) {
+               if ((eol = strrchr(line, '\n')) != NULL)
+                       *eol = '\0';
 
                if ((path1 = strstr(line, LINK_SEP)) == NULL)
                        errx(1, "Could not find separator");



Home | Main Index | Thread Index | Old Index