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,879 of 107,822    |
|    J.O. Aho to Paul Edwards    |
|    Re: O_TEXT for PDOS/386    |
|    21 Feb 24 13:52:40    |
   
   From: user@example.net   
      
   On 21/02/2024 12.57, Paul Edwards wrote:   
   > On 21/02/24 15:06, J.O. Aho wrote:   
   >   
   >>>>> 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.   
   >>   
   >> Think you need to look into the windows source code, as open() already   
   >> exists in windows   
   >   
   > There is no such syscall. kernel32 exports CreateFile.   
      
   _sopen_s() (secure version of _open()) and _O_TEXT/_O_BINARY do exists   
   and I think this is what Cygwin wraps to open() and O_TEXT/O_BINARY.   
      
      
   > Because PDOS/386 is sort of a DOS/Windows clone,   
   > all files are expected to use CRLF as line terminators.   
   > That's the user requirements, basically.   
      
   Why don't you ask Microsoft to make ms-windows POSIX compatible, then   
   this issue would disappear at once ;)   
      
      
   > So I'm trying to get my Linux ELF binaries (ones that   
   > I build myself) to fit into that existing user   
   > requirement.   
      
   That's why other projects has solved it as define O_TEXT/O_BINARY to 0x0   
   if they are missing when they want to support multiple OS:es. They don't   
   expect that all OS has AmigaOS dos library implemented to open files   
   IDOS->Open("c:dir", MODE_OLDFILE)   
      
   --   
    //Aho   
      
   --- 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