This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: stat file -- cygwin vs. Windows size?


> -----Original Message-----
> From: cygwin-owner@cygwin.com 
> [mailto:cygwin-owner@cygwin.com] On Behalf Of Jason Pyeron
> Sent: Friday, June 24, 2005 2:40 PM
> To: cygwin@cygwin.com
> Subject: RE: stat file -- cygwin vs. Windows size?
> 
> 
> The binary size is accurate, text, by its nature may never be 
> correct on any operating system, since it is buffered, 
> parsed, etc by the OS in an OS dependent way.
> 

Actually I am not sure that's correct.  I am unaware of any *OS* that does
anything like that (maybe the DOS INT13 stuff did, but we're talking ancient
history there).  The ones I can think of are sane enough to treat files as
what they are, i.e. a string of bytes, at the system call level, and do no
inspection of any kind on the contents (none that you're supposed to have to
care about anyway).

The culprit in this confusion is not the OSes but the C runtimes, and the
fact that on different OSes, some text file formats are more common than
others.  The C runtime essentially assumes that all files are text files,
when of course this is not and has never been the case.  What really should
be done is the deprecation of all "texty" features of the FILE object (e.g.
stuff like fprintf()), and create a new "FILE_TEXT" object which inherits
from FILE and adds all the texty operations such as fprintf(), fscanf(),
etc, in addition to being able to handle any of the myriad text file formats
in existence.

But that would make too much sense, so I for one shall not hold my breath.

-- 
Gary R. Van Sickle


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]