[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #5675 [Obfsproxy]: winsock.m4's functionality can be replaced with AC_TRY_LINK
#5675: winsock.m4's functionality can be replaced with AC_TRY_LINK
-----------------------+----------------------------------------------------
Reporter: asn | Owner: asn
Type: defect | Status: new
Priority: normal | Milestone:
Component: Obfsproxy | Version:
Keywords: building | Parent:
Points: | Actualpoints:
-----------------------+----------------------------------------------------
Changes (by zwol):
* cc: zackw@â (added)
Comment:
I'm not especially proud of `winsock.m4`, but I do not believe it is
"useless" or that it "can simply be replaced with `AC_TRY_LINK`." From
IRC:
{{{
<zwol> the issue is that [AC_TRY_LINK, AC_CHECK_LIB, and AC_SEARCH_LIBS]
all *fail* to find ntohl in -lws2_32 on Windows
<zwol> because it doesn't get declared correctly [so the linker is looking
for the wrong symbol].
<zwol> in order to find ntohl in -lws2_32 on Windows, we have to control
the test program so we can make it include <winsock2.h>. That's the point
of winsock.m4.
<zwol> The point of the "for ac_lib in '' -lws2_32" construct is to check
first for *no* special library. That was copied verbatim from
AC_SEARCH_LIBS.
}}}
Having said that, I am interested to see what you manage to come up with.
It may well be possible to do something simpler than what I did.
Note that I was doing ''native'' compilation on Windows XP in the MinGW
environment. It is entirely possible that cross-compiling to MinGW
behaves differently.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5675#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs