Thanks! We could remove even this hack by linking editcap with libwireshark. Is there still a strong reason for not doing so?
Cheers, Balint 2013/3/7 Gerald Combs <ger...@wireshark.org>: > This didn't work because prior includes (wsgetopt.h in editcap.c and > privileges.h in capinfos.c) lock in the export behavior. I checked in > your changes in r48170 along with a workaround to reset the export > definitions. It's clunkier than I would like but Visual C++ is happier now. > > On 3/7/13 8:23 AM, Bálint Réczey wrote: >> If no one objects I commit those tomorrow. >> >> Cheers, >> Balint >> >> 2013/3/7 Bálint Réczey <bal...@balintreczey.hu>: >>> I think the attached patches would make it be a bit less hack-ish. >>> >>> Cheers, >>> Balint >>> >>> 2013/3/7 Gerald Combs <ger...@wireshark.org>: >>>> -DENABLE_STATIC instead of -DWS_BUILD_DLL worked on my machine. Checked >>>> in in r48158. >>>> >>>> On 3/6/13 8:52 AM, Christopher Maynard wrote: >>>>> Pascal Quantin <pascal.quantin@...> writes: >>>>> >>>>>> Hi all,I added this workaround a few days ago in r48021 but Gerald >>>>>> reverted it >>>>> in r48072 as it was breaking getopt(). So we have to figure out how to >>>>> solve >>>>> this properly. >>>>> >>>>> OK, I missed that. How about something like this instead? >>>>> >>>>> Index: Makefile.common >>>>> =================================================================== >>>>> --- Makefile.common (revision 48134) >>>>> +++ Makefile.common (working copy) >>>>> @@ -178,6 +178,7 @@ >>>>> editcap.c \ >>>>> epan/crypt/md5.c \ >>>>> epan/nstime.c \ >>>>> + wsutil/wsgetopt.c \ >>>>> $(WTAP_PLUGIN_SOURCES) >>>>> >>>>> # reordercap specifics >>>>> @@ -188,6 +189,7 @@ >>>>> # capinfos specifics >>>>> capinfos_SOURCES = \ >>>>> capinfos.c \ >>>>> + wsutil/wsgetopt.c \ >>>>> $(WTAP_PLUGIN_SOURCES) >>>>> >>>>> # dftest specifics >>>>> Index: Makefile.nmake >>>>> =================================================================== >>>>> --- Makefile.nmake (revision 48134) >>>>> +++ Makefile.nmake (working copy) >>>>> @@ -327,7 +327,7 @@ >>>>> # (e.g. epan\plugins.obj) must be built first using >>>>> epan\Makefile.nmake >>>>> (which happens for 'nmake ... all'). >>>>> # Linking with setargv.obj enables "wildcard expansion" of command-line >>>>> arguments >>>>> capinfos.obj : >>>>> - $(CC) $(CFLAGS) -Fd.\ -c capinfos.c >>>>> + $(CC) $(CFLAGS) -DWS_BUILD_DLL -Fd.\ -c capinfos.c >>>>> capinfos.exe : $(LIBS_CHECK) config.h $(capinfos_OBJECTS) >>>>> wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib >>>>> image\capinfos.res >>>>> @echo Linking $@ >>>>> $(LINK) @<< >>>>> @@ -340,7 +340,7 @@ >>>>> # XXX: This makefile does not properly handle doing a 'nmake ... >>>>> editcap.exe' >>>>> directly since some of the .objs >>>>> # (e.g. epan\plugins.obj) must be built first using >>>>> epan\Makefile.nmake >>>>> (which happens for 'nmake ... all'). >>>>> editcap.obj : >>>>> - $(CC) $(CFLAGS) -Fd.\ -c editcap.c >>>>> + $(CC) $(CFLAGS) -DWS_BUILD_DLL -Fd.\ -c editcap.c >>>>> editcap.exe : $(LIBS_CHECK) config.h $(editcap_OBJECTS) >>>>> wsutil\libwsutil.lib >>>>> wiretap\wiretap-$(WTAP_VERSION).lib image\editcap.res >>>>> @echo Linking $@ >>>>> $(LINK) @<< >>>>> >>>>> >>>>> ___________________________________________________________________________ >>>>> Sent via: Wireshark-dev mailing list <wireshark-dev@wireshark.org> >>>>> Archives: http://www.wireshark.org/lists/wireshark-dev >>>>> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev >>>>> >>>>> mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe >>>>> >>>> >>>> ___________________________________________________________________________ >>>> Sent via: Wireshark-dev mailing list <wireshark-dev@wireshark.org> >>>> Archives: http://www.wireshark.org/lists/wireshark-dev >>>> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev >>>> mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe >> ___________________________________________________________________________ >> Sent via: Wireshark-dev mailing list <wireshark-dev@wireshark.org> >> Archives: http://www.wireshark.org/lists/wireshark-dev >> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev >> mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe >> > ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev@wireshark.org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe