delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/10/11:51:25

Date: Mon, 10 Aug 1998 18:50:49 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "R. Brenner" <rene DOT brenner AT NO_SPAM_PLZbluewin DOT ch>
cc: djgpp AT delorie DOT com
Subject: Re: problems with crt0_startup_flags
In-Reply-To: <6qmte0$1j3$1@bw107zhb.bluewin.ch>
Message-ID: <Pine.SUN.3.91.980810184221.4667A-100000@is>
MIME-Version: 1.0

On Mon, 10 Aug 1998, R. Brenner wrote:

> I'm using some code in my programs which need
> the following code at the beginning:
> int _crt0_startup_flags = _CRT0_FLAG_NEARPTR | _CRT0_FLAG_NONMOVE_SBRK;
> 
> As soundroutine I use the MIDAS soundsystem
> which already sets this startup flags...so I get an error
> if redefine them. So, what should I change in my code
> for using it without the crt0_startup_flags  ?

Please make a point of describing all the relevant details.  Only those 
who know MIDAS by heart will know off the top of their heads what are the 
flags used by MIDAS, and without that knowledge it is impossible to 
decide whether the crt0 flags required by MIDAS will conflict with yours 
(in which case you can never reconcile them, and will have to rewrite 
your program or abandon MIDAS).

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;
  ....

- Raw text -


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