Re: macro
On Mar 1, 11:42 am, asmcad <asm...@gmail.com> wrote:
-so it's just about not break the old code.
ok.thank you Bo Persson.
You missed his point. It's to support different versions for
different systems, using the same source code.
Given the actual names in the original example, I would guess
that the library in question is delivered as a dynamically
loaded object (.so under Unix, .dll under Windows), and that the
macros expand to something which corresponds to a compiler
extension under Windows, and to nothing under Unix. Something
like the macros you'll see around the __attribute__ declarations
for code which is to be compiled by both g++ and other
compilers. (E.g.
#define NORETURN __attribute__((noreturn))
for g++, and
#define NORETURN
for other compilers.)
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34