On Mar 12, 2014, at 1:22 AM, Albert Chin <wireshark-dev@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, Mar 12, 2014 at 12:24:35AM -0700, Guy Harris wrote:
>>
>> On Mar 11, 2014, at 1:55 PM, Albert Chin <wireshark-dev@xxxxxxxxxxxxxxxxxxxxxxxxx> 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
#define WS_DLL_PUBLIC WS_DLL_PUBLIC_NOEXTERN extern
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).