home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.linux      Getting to be as bloated as Windows!      107,822 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 105,866 of 107,822   
   Lew Pitcher to Paul Edwards   
   Re: O_TEXT for PDOS/386   
   20 Feb 24 14:14:53   
   
   From: lew.pitcher@digitalfreehold.ca   
      
   On Tue, 20 Feb 2024 14:51:15 +0800, Paul Edwards wrote:   
      
   > Hi.   
   >   
   > Cygwin has an O_TEXT on the open() call to let   
   > "the OS layer" (can be quibbled) that the file   
   > is being opened in text mode. And as such, it   
   > gives that layer an opportunity to insert CRs.   
   [snip]   
   > I'd like to add an O_TEXT flag to Linux.[snip]   
   > Any suggestions?   
      
   Yes, one. Dont.   
      
   Microsoft Windows (on top of which Cygwin must run) makes a low-level   
   distinction between "binary" files and "text" files. I believe it is   
   because Windows guarantees (or must guarantee) certain data   
   transformations on text that do not apply to other forms of data.   
   (I.e. translating  sequences into C newline characters, etc)   
      
   HOWEVER, Linux (or, /any/ Unix) makes NO distinction between text   
   and binary data, neither in the standard I/O library, nor in the OS   
   itself.   
      
   You are effectively asking that Linux /NOW/ make such a distinction,   
   even if only to ignore the O_TEXT flag that you ask for.   
      
   It ain't gonna fly. Such a flag would invalidate /decades/ worth of   
   Unix/Linux code, and /not/ provide any functionality either to   
   the OS layer, the stdio library layer, or the application code layer.   
      
   So, dont even try to "add an O_TEXT flag" to Linux. Just dont.   
   --   
   Lew Pitcher   
   "In Skills We Trust"   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca