small change in python-compat.h (for win32)
John Arbash Meinel
john at arbash-meinel.com
Fri Nov 21 18:54:01 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alexander Belchenko wrote:
> dirstate_helpers extension linked with winsock2 dll on windows.
>
> if sys.platform == 'win32':
> add_pyrex_extension('bzrlib._dirstate_helpers_c',
> libraries=['Ws2_32'])
>
> But python-compat.h uses header from winsock1 library.
> It does not harm actually, but IMO there should be consistency.
>
> Here is proposed small one-line change:
>
> --- bzrlib/python-compat.h 2008-10-21 15:53:56 +0000
> +++ bzrlib/python-compat.h 2008-11-19 14:08:04 +0000
> @@ -42,7 +42,7 @@
> #include <windows.h>
>
> /* Needed for htonl */
> - #include "Winsock.h"
> + #include "Winsock2.h"
>
> /* sys/stat.h doesn't have any of these macro definitions for MSVC, so
> * we'll define whatever is missing that we actually use.
This seems fine either way. I believe when I "#include "Winsock.h" it
actually complained that it couldn't find the htonl that was in
Ws2_32.lib. I'm not 100% sure, but I believe I remember that.
Anyway, I'll go ahead and submit the patch.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkknA8kACgkQJdeBCYSNAAM1eACfV4gKZBoAVJd0DFVaRx/w0r+u
AKkAn0rZtGkTs3FI4Qf40hK322shXeom
=VpvW
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list