Date: Mon, 10 Aug 1998 18:50:49 +0300 (IDT) From: Eli Zaretskii To: "R. Brenner" cc: djgpp AT delorie DOT com Subject: Re: problems with crt0_startup_flags In-Reply-To: <6qmte0$1j3$1@bw107zhb.bluewin.ch> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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; ....