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: Fri, 17 Mar 2017 09:45:39 -0700 Organization: None to speak of Lines: 37 Message-ID: References: <20d9275b-7502-4ad0-b343-5cecf8c6ea90@googlegroups.com> <970495bc-6e8b-4af4-9626-b89a4ea5b96c@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="a62e3c498ac96524fc545ef94a9038ec"; logging-data="3924"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19L1cYD4o0wm+GMM+A2WNLh" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:SbAbQzYOq1e1QizcqXMsl8lrBVk= sha1:tMZvm2/TaFeJEnlt49pBO1GgWHA= Xref: csiph.com comp.lang.c:106360 Keith Thompson writes: > mertesthomas@gmail.com writes: > [...] >> AFAIK the standard writers introduced fseeko and ftello, which works >> with offsets of type off_t. Off_t does not depend on the size of long >> and can be 32-bit or 64-bit. > > fseeko() and ftello() are defined by POSIX, not by the ISO C standard. > > Elsethread I suggested that a future ISO C standard should change > fseek() and ftell() to use a type other than long. It looks like > fseeko() and ftello() are pretty much what I had in mind. > > Ideally, I'd like to see fseek() and ftell() modified to match fseeko() > and ftello(). Changing the definition of an existing function could be > difficult, and implementations would undoubtedly have to support both > forms. > > My second choice would be to adopt fseeko() and ftello() from POSIX > while leaving fseek() and ftell() as they are. On further thought, changing the declarations of fseek() and ftell() would cause problems mixing code that uses the old and new versions. There are probably ways to deal with that with clever linking, but I now suggest that fseek() and ftell() should be left as they are (and perhaps deprecated?), and fseeko(), ftello(), and off_t should be adopted by a new C standard. (Since lcc-win uses non-standard declarations for fseek() and ftell() I wonder if that causes problems linking code compiled by lcc-win with code compiled by other compilers. Is that supported?) -- 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"