MingW32...
Tim Angus
tim at ngus.net
Fri Sep 23 13:17:16 EDT 2005
On Thu, 22 Sep 2005 14:51:53 +0100 Tim wrote:
> Hmm, good idea. I dicked about with __attribute__s a little when I was
> trying to figure out what was preventing it from compiling/running,
> but it didn't occur to me to use them this way.
So I hacked about with this for a while, but couldn't get it to work. If
you feel like having a go, feel free :). Instead I have this slightly
cleaner than before approach:
#ifdef __MINGW32__ // _ is prepended to compiled symbols
#define CMANG(sym) "_"#sym
#else
#define CMANG(sym) #sym
#endif
...
void AsmCall( void ) {
asm( CMANG(doAsmCall) ": \n\t" \
" movl (%%edi),%%eax \n\t" \
" subl $4,%%edi \n\t" \
> > There are a couple of these around the codebase:
> >
> > #if !( (defined __linux__ || __FreeBSD__ || __MINGW32__) && (defined
> > __i386__) && (!defined C_ONLY)) //
> >
> > Can we replace all this nonsense with either a check for __GNUC__?
> > This is only going to get uglier with each new platform, and be
> > error prone for the ones that are missed.
>
> That seems sensible.
Done, mostly.
More information about the quake3
mailing list