Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Christian Weisgerber Newsgroups: gnu.bash.bug Subject: Re: examples/loadables/finfo.c type problems Date: Sun, 9 Sep 2018 21:54:11 +0200 Lines: 15 Approved: bug-bash@gnu.org Message-ID: References: <20180907212804.GC60818@lorvorc.mips.inka.de> <91961426-1804-5ea3-521d-f2253e5c9eb7@case.edu> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: usenet.stanford.edu 1536523045 10940 208.118.235.17 (9 Sep 2018 19:57:25 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash@gnu.org To: Chet Ramey Envelope-to: bug-bash@gnu.org Content-Disposition: inline In-Reply-To: <91961426-1804-5ea3-521d-f2253e5c9eb7@case.edu> User-Agent: Mutt/1.10.1 (2018-07-13) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 193.197.184.2 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:14565 Chet Ramey: > > printf("%ld\n", (long) st->st_size); > > > > which potentially truncate values. > > Pretty much all the systems bash runs on these days have 64-bit longs. > How big a file do you have? But the fix is the same as above. 32-bit platforms (IA-32, ARMv7) are still around. And BSD has had 64-bit off_t on 32-bit architectures for about a quarter century. -- Christian "naddy" Weisgerber naddy@mips.inka.de