Wireshark-dev: Re: [Wireshark-dev] Duplicate symbol warnings on Solaris
From: Guy Harris <[email protected]>
Date: Wed, 12 Mar 2014 11:05:50 -0700
On Mar 12, 2014, at 1:22 AM, Albert Chin <[email protected]> wrote:

> On Wed, Mar 12, 2014 at 12:24:35AM -0700, Guy Harris wrote:
>> On Mar 11, 2014, at 1:55 PM, Albert Chin <[email protected]> wrote:
>> If it's not expanding to something that includes "extern" in 1.10.5,
>> try the current top of the 1.10 branch; it should expand to
>> something that includes "extern" there.
> It is not expanding to "extern".

Presumably meaning "It is not expanding to something that includes "extern" *in 1.10.5*", as per "Anyway, I'll check top of 1.10"; in the top of 1.10, it's defined as


which, obviously, is guaranteed to expand to something that includes "extern".

> However, in
> epan/dissectors/packet-dcom.h, you have:
>  WS_DLL_PUBLIC const value_string dcom_hresult_vals[];
>  WS_DLL_PUBLIC const value_string dcom_variant_type_vals[];
>  extern const value_string dcom_protseq_vals[];
> If WS_DLL_PUBLIC should expand to "extern", why isn't
> dcom_protseq_vals WS_DLL_PUBLIC rather than "extern"?

Probably because the first two are used by plugins, and the third isn't - it's currently used only by some DCOM protocol dissectors in libwireshark - so nobody noticed that it *had* to be WS_DLL_PUBLIC on Windows (this isn't an issue on most UN*Xes, possibly not on any UN*Xes, but the way Windows DLLs work, any variable defined in one DLL that must be accessible in another DLL - such as a variable in libwireshark that needs to be accessible to plugins - has to be declared in the right fashion, which WS_DLL_PUBLIC does).