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,871 of 107,822   
   Lew Pitcher to Paul Edwards   
   Re: O_TEXT for PDOS/386   
   20 Feb 24 19:34:14   
   
   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 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?   
      
   [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?   
      
   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);   
      
   HTH   
   --   
   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