Mail Archives: djgpp/2003/08/31/09:47:34
Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de> wrote:
: Martin Str|mberg <ams AT speedy DOT ludd DOT luth DOT se> wrote:
:> source then? E. g. DEBUG in my example.
:> :> 1. What should I do to make this work nicely with prototypes and
:> :> structs in header files?
:> : Enclose the C-only parts in some #ifdef, e.g. #ifdef __GNUC__ or
:> : whatever.
:> Which define makes a good C<->assembly discriminator? __GNUC__?
: I should think so. 'gcc -v' on both a .c and a .S file should
: enlighten this further.
Thanks. This is what I did.
Case 1, some code for DJGPP libc. A sed script that extracted the
relevant #defines into a local header file (thank you, Richard Dawe)
and use the created header file in the .S files.
Case 2, my own pet project. Surround the structs with #ifdef __GNUC__
and #endif (there's only one 32bit header file with this and it's
automatically generated as a glue file between 16bit djasm code
and 32bit code).
: That expectation would be quite wrong, though. The choice of flags
: depends on the source language (via the file extension), not the
: program being called to translate them.
Ok. Thanks!
Right,
MartinS
- Raw text -