bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: gettext cvs, woe32 dlls


From: Bruno Haible
Subject: Re: gettext cvs, woe32 dlls
Date: Wed, 10 May 2006 22:44:02 +0200
User-agent: KMail/1.5

Hello Charles,

I have a question about the WOE32GCC_SHLIBS conditional:

>  case "$host_os" in
> -  mingw*) is_mingw=yes ;;
> -  *) is_mingw=no ;;
> +  mingw* | cygwin* )
> +     is_woe32gcc=yes
> +     if test "$enable_shared" = yes ; then
> +       woe32gcc_with_shlibs=yes
> +     else
> +       woe32gcc_with_shlibs=no
> +     fi
> +     ;;
> +  *) is_woe32gcc=no
> +     woe32gcc_with_shlibs=no
> +     ;;
>  esac
> -AM_CONDITIONAL([MINGW], [test $is_mingw = yes])
> +AM_CONDITIONAL([WOE32GCC], [test $is_woe32gcc = yes])
> +AM_CONDITIONAL([WOE32GCC_SHLIBS], [test $woe32gcc_with_shlibs = yes])

When a library libfoo contains a public, exported variable 'int data;',
and the library is installed with both shared and static libs (.dll, .dll.a
and .a), then what should the include file libfoo.h contain?

    extern __declspec(dllimport) int data;
is the right thing when a program links to the shared variant (so that the
compiler knows to use _imp__data instead of data itself).

    extern int data;
is the right thing when a program links to the static variant.

But how can the header file know whether the program will link statically
or not?

This matters for libintl, libasprintf and libgettextpo.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]