Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: How to read a data file whose size is unknown in C? Date: Sun, 16 Aug 2015 17:28:19 -0700 Organization: None to speak of Lines: 33 Message-ID: References: <7b7a215a-b72a-48ba-bbdc-ddc22ad8c5b7@googlegroups.com> <87io8iyx8u.fsf@bsb.me.uk> <4h8ssat0t2qlto9fbfahpbo64puhe6ta6c@4ax.com> <8737zlzquo.fsf@bsb.me.uk> <2c60ta99ncfbfjanktjqcucl2utogtt09n@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="3385"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18NkBS/k3LZogFw4hoqRmwt" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:6NLyoRhHYA2/0FoR5pct+xcwh2k= sha1:yHtKb0bTLCZtM77Asp8gUDLoq0k= Xref: csiph.com comp.lang.c:67551 Robert Wessel writes: [...] > Actually MS is very clear that fileno(), without the underscore, is > depreciated: Deprecated. > https://msdn.microsoft.com/en-us/library/ms235401(v=vs.140).aspx Which says: This POSIX function is deprecated. Use the ISO C++ conformant _fileno instead. fileno() is declared in , but is not specified by ISO C (or C++), so a conforming implementation cannot define it there. But POSIX defines a mechanism (defining one of several macros, such as _POSIX_C_SOURCE) that lets fileno() be declared in without violating any ISO C rules. Microsoft apparently has decided that using reserved names for POSIX-like functions is a better approach -- which strikes me as quite arrogant. (The "P" in POSIX standard for "Portable".) Personally I would have preferred it if *all* POSIX-specific functions were declared in POSIX-specific headers, but POSIX had to deal with a great deal of existing practice. -- 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"