Enhance FOO_EXPORT macro

Thiago Macieira thiago at kde.org
Fri May 4 11:16:01 BST 2007


Christian Ehrlicher said:
> Maybe because KDE_IMPORT is not defined (correct) on linux?
>
> #ifdef __KDE_HAVE_GCC_VISIBILITY
> #define KDE_NO_EXPORT __attribute__ ((visibility("hidden")))
> #define KDE_EXPORT __attribute__ ((visibility("default")))
> #define KDE_IMPORT
>
> But I don't know if it maybe breaks something when we define
> KDE_IMPORT __attribute__ ((visibility("default")))
>
> Any comments?

You're right, it's not correctly defined. KDE_IMPORT and KDE_EXPORT should
be the same on gcc/ELF.

On x86, you can get away with KDE_IMPORT being empty, but it breaks on
64-bit platforms.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358






More information about the kde-core-devel mailing list