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,873 of 107,822    |
|    Paul Edwards to Lew Pitcher    |
|    Re: O_TEXT for PDOS/386    |
|    21 Feb 24 05:40:33    |
   
   From: mutazilah@gmail.com   
      
   On 21/02/24 03:34, Lew Pitcher wrote:   
   > 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 am   
   >> still missing the same thing that Cygwin was   
   >> missing, and added O_TEXT to solve.   
   >   
   > And, what would that be? What does the Cygwin   
   > O_TEXT flag on open(2) do?   
      
   It will add CRs to such files on a write().   
      
   > [snip]   
   >> And it is not important to maintain the same value   
   >> as Cygwin, because Cygwin creates PE executables,   
   >> while mine is for ELF executables.   
   >   
   > Are you just trying to keep your Linux source   
   > source-compatible with your (Cygwin-based) Windows   
   > source? Or are you actually looking for the functionality   
   > behind the O_TEXT flag?   
      
   The latter. Functionality on PDOS/386, not Linux.   
      
   And not Linux source. Linux binaries.   
      
   > If you just want to keep source compatibility, I don't see   
   > any problem with using a system-specific predefined macro   
   > to implement some conditional compilation. Something like   
   >   
   > #ifndef O_TEXT   
   > #define O_TEXT 0   
   > #endif   
   >   
   > open("/etc/passwd",O_RDONLY | O_TEXT);   
      
   Not what I'm after.   
      
   BFN. Paul.   
      
   --- 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