Usage fo macro before its definition

18 views
Skip to first unread message

Dimitry Sibiryakov

unread,
Apr 9, 2026, 4:25:41 AMApr 9
to firebir...@googlegroups.com
Hello All,

in dllinst.h there are following lines:

> #if !defined(FB_DLL_INST) && defined(WIN_NT)
>
> #define FB_DLL_INST
>
> #include <firebird.h>

But WIN_NT macro is defined in autoconf_msvc.h which is included into
firebird.h which is included after the check.
How is it supposed to work?

--
WBR, SD.

Vlad Khorsun

unread,
Apr 9, 2026, 5:14:36 AMApr 9
to firebir...@googlegroups.com
09.04.2026 11:25, 'Dimitry Sibiryakov' via firebird-devel:
>   Hello All,
>
>   in dllinst.h there are following lines:
>
>> #if !defined(FB_DLL_INST) && defined(WIN_NT)
>>
>> #define FB_DLL_INST
>>
>> #include <firebird.h>
>
>   But WIN_NT macro is defined in autoconf_msvc.h which is included into firebird.h which is included after the check.
It was added at

Revision: 793402d4be700419a8fda51d99593c6b17aa4286
Author: aafemt <aaf...@users.sourceforge.net>
Date: 20.02.2009 10:41:22
Message:
Windows only

so you should better ask author

> How is it supposed to work?

dllinst.h always included after firebird.h

Regards,
Vlad


Dimitry Sibiryakov

unread,
Apr 9, 2026, 5:28:29 AMApr 9
to firebir...@googlegroups.com
Vlad Khorsun wrote 09.04.2026 11:14:
> so you should better ask author

Nice idea. The author's answer is "the platform macro is specified in
compiler's command line" by prefix.* files.


--
WBR, SD.
Reply all
Reply to author
Forward
0 new messages