Re: [Patch] Warning fixes



Tor Lillqvist <tml iki fi> writes:

> Owen Taylor writes:
>  > This is wrong. GDKVAR is needed on Win32 .. the right thing here is
>  > to define GDKVAR differently in this case... Tim did a fix like
>  > this for some stuff in GTK+ recently.
> 
> Would this work:
> 
> #ifdef G_OS_WIN32
> #  ifdef GDK_COMPILATION
> #    define GDKVAR __declspec(dllexport)
> #  else
> #    define GDKVAR extern __declspec(dllimport)
> #  endif
> #else
> #  ifdef GDK_COMPILATION
> #    define GDKVAR
> #  else
> #    define GDKVAR extern
> #  endif
> #endif
> 
> (I.e. check GDK_COMPILATION on Unix, too. Makefile.am uses
> -DGDK_COMPILATION on all platforms.)

Don't we need extern for header files when compiling GDK as
well? Perhaps we need different GDKVAR names for header
files and C files?

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]