From owner-svn-ports-all@freebsd.org Thu Feb 18 03:39:36 2021 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99A5954B1D3; Thu, 18 Feb 2021 03:39:36 +0000 (UTC) (envelope-from mi@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dh0nh3yhVz4mkx; Thu, 18 Feb 2021 03:39:36 +0000 (UTC) (envelope-from mi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 76A6310E70; Thu, 18 Feb 2021 03:39:36 +0000 (UTC) (envelope-from mi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 11I3daTL062486; Thu, 18 Feb 2021 03:39:36 GMT (envelope-from mi@FreeBSD.org) Received: (from mi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 11I3daiF062484; Thu, 18 Feb 2021 03:39:36 GMT (envelope-from mi@FreeBSD.org) Message-Id: <202102180339.11I3daiF062484@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mi set sender to mi@FreeBSD.org using -f From: Mikhail Teterin Date: Thu, 18 Feb 2021 03:39:36 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r565873 - in head/lang/siod: . files X-SVN-Group: ports-head X-SVN-Commit-Author: mi X-SVN-Commit-Paths: in head/lang/siod: . files X-SVN-Commit-Revision: 565873 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 03:39:36 -0000 Author: mi Date: Thu Feb 18 03:39:35 2021 New Revision: 565873 URL: https://svnweb.freebsd.org/changeset/ports/565873 Log: Allow the argument given to lstatfs() to be a file -- in which case, we'll call fstatfs(2) instead of statfs(2). That is, for most people these too lines will print the same things: (print (statfs '/var)) (print (statfs (fopen '/var/log/messages))) Add siod.scm to the list of those with MS-DOS line-endings. There are no packages for 3.6.2, so not updating PORTREVISION yet... Sponsored by: United Marsupials Modified: head/lang/siod/Makefile head/lang/siod/files/patch-statfs Modified: head/lang/siod/Makefile ============================================================================== --- head/lang/siod/Makefile Thu Feb 18 03:32:16 2021 (r565872) +++ head/lang/siod/Makefile Thu Feb 18 03:39:35 2021 (r565873) @@ -17,7 +17,7 @@ USES= uidfix tar:tgz dos2unix USE_LDCONFIG= ${PREFIX}/lib ${PREFIX}/lib/siod -DOS2UNIX_FILES= sql_oracle.c ss.c +DOS2UNIX_FILES= sql_oracle.c ss.c siod.scm OPTIONS_DEFINE= SQL_SYBASE GD NDBM REGEX SS STATFS DOCS OPTIONS_DEFINE_i386=SQL_ORACLE # oracle-client port only available for i386 OPTIONS_DEFAULT=NDBM REGEX SS Modified: head/lang/siod/files/patch-statfs ============================================================================== --- head/lang/siod/files/patch-statfs Thu Feb 18 03:32:16 2021 (r565872) +++ head/lang/siod/files/patch-statfs Thu Feb 18 03:39:35 2021 (r565873) @@ -1,5 +1,5 @@ ---- statfs.c 2014-03-25 04:10:42.000000000 -0400 -+++ statfs.c 2021-02-17 16:39:52.652229000 -0500 +--- siod-2014/statfs.c 2014-03-25 04:10:42.000000000 -0400 ++++ work/siod-3.6.2/statfs.c 2021-02-17 22:30:00.996673000 -0500 @@ -4,9 +4,15 @@ #include @@ -16,7 +16,7 @@ +#ifndef BSD #define MNT_NUMTYPES 128 /* -@@ -14,16 +20,83 @@ +@@ -14,16 +20,87 @@ */ extern char *mnt_names[]; +#endif @@ -82,8 +82,12 @@ struct statfs s; iflag = no_interrupt(1); - if (statfs(get_c_string(path),&s,sizeof(s))) -+ if (statfs(get_c_string(path), &s -+#ifndef BSD ++ if (TYPE(path) == tc_c_file) { ++ int fd = fileno(path->storage_as.c_file.f); ++ if (fstatfs(fd, &s)) ++ return(err("fstatfs", llast_c_errmsg(-1))); ++ } else if (statfs(get_c_string(path), &s ++#if !defined(BSD) && !defined(linux) + ,sizeof(s) +#endif + )) @@ -104,7 +108,7 @@ + : flocons(s.f_type), "bsize",flocons(s.f_bsize), "blocks",flocons(s.f_blocks), -@@ -34,8 +107,18 @@ +@@ -34,8 +111,18 @@ "mntonname",strcons(-1,s.f_mntonname), "mntfromname",strcons(-1,s.f_mntfromname), +#ifdef BSD @@ -124,28 +128,28 @@ +static LISP decode_fstab(const struct fstab *p) {if (p) return(symalist("spec",strcons(-1,p->fs_spec), -@@ -50,5 +133,5 @@ +@@ -50,5 +137,5 @@ return(NIL);} -LISP lgetfsent(void) +static LISP lgetfsent(void) {long iflag; LISP result; -@@ -58,5 +141,5 @@ +@@ -58,5 +145,5 @@ return(result);} -LISP lsetfsent(void) +static LISP lsetfsent(void) {long iflag; LISP result; -@@ -66,5 +149,5 @@ +@@ -66,5 +153,5 @@ return(result);} -LISP lendfsent(void) +static LISP lendfsent(void) {long iflag; iflag = no_interrupt(1); -@@ -73,4 +156,6 @@ +@@ -73,4 +160,6 @@ return(NIL);} +void init_statfs(void); /* The sole symbol exported from a SIOD-module */