delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/10/13:59:53

Message-Id: <199808101759.SAA18428@sable.ox.ac.uk>
Comments: Authenticated sender is <mert0407 AT sable DOT ox DOT ac DOT uk>
From: George Foot <george DOT foot AT merton DOT oxford DOT ac DOT uk>
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Date: Mon, 10 Aug 1998 18:58:08 +0000
MIME-Version: 1.0
Subject: Re: problems with crt0_startup_flags
Reply-to: george DOT foot AT merton DOT oxford DOT ac DOT uk
CC: djgpp AT delorie DOT com

On 10 Aug 98 at 18:50, Eli Zaretskii wrote:

> Assuming the flags required by MIDAS do NOT contradict yours, you can 
> call the library function `__djgpp_nearptr_enable' (e.g. at the beginning 
> of `main') instead of setting the _CRT0_FLAG_NEARPTR flag.  As for the
> _CRT0_FLAG_NONMOVE_SBRK flag, you can set it at run time, inside `main', 
> like this:
> 
> int main ()
> {
>   ....
>   _crt0_startup_flags |= _CRT0_FLAG_NONMOVE_SBRK;
>   ....

But that won't do anything, because the nonmove sbrk flag is zero. 
I think you need to turn off the Unixy sbrk, then turn on non-move
sbrk; this will work whichever of the flags is zero or nonzero:

    _crt0_startup_flags &= ~_CRT0_FLAG_UNIX_SBRK;
    _crt0_startup_flags |= _CRT0_FLAG_NONMOVE_SBRK;

-- 
george DOT foot AT merton DOT oxford DOT ac DOT uk

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019