Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: More problems with lcc-win Date: Wed, 15 Mar 2017 10:11:45 -0700 Organization: None to speak of Lines: 24 Message-ID: References: <20d9275b-7502-4ad0-b343-5cecf8c6ea90@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="1d05d6df43238c69e85c0f471787c307"; logging-data="15294"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/RWAil0WNUmvcIyKA9fymK" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:B3m1l8zSzIoq0eu8YsHZtmW/cQk= sha1:IYZrYHmdssleYyhOVknQBOTEcjs= Xref: csiph.com comp.lang.c:106149 scott@slp53.sl.home (Scott Lurndal) writes: > Keith Thompson writes: >>IMHO C99 *should* have defined a new typedef for the signed integer type >>used by fseek() and ftell(). (Using size_t might have been another >>alternative, and it would work for 64-bit Windows, but files can be >>bigger than any supported objects, so size_t isn't really the right >>type.) > > off_t is the abstract type for file offsets in POSIX, enabling > LFS determined whether a 32-bit or 64-bit off_t was used. It's not an abstract type. POSIX requires it to be a signed integer type, and lseek() returns (off_t)-1 on error. > http://www.unix.org/version2/whatsnew/lfs20mar.html#3.3 I suppose a future C standard could adopt type off_t from POSIX and use it for fseek() and ftell(). (POSIX uses it for lseek().) -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"