zeromq/libzmq — pull request #1283 by DaiyuHurst (2014-12-29 22:51:58+00:00)
Title: Implement a definitive cygwin target for libzmq.

Hi folks!

Like the original poster here:

https://github.com/zeromq/pyzmq/issues/113

I couldn't get a shared library built on cygwin with existing and past releases. The solution offered there worked but was really inelegant. I thought maybe a few hours work could correct that (some friends of mine are using 0mq for an emulator project and I'm helping ensure a Windows port exists).

The changes I offer create a working shared library for the cygwin environment, tested only on Cygwin64, but should work in Cygwin32 as well. They should not affect builds on any other targets.

All tests pass except for test_ipc_wildcard, which fails in bounce() trying to receive the message it sent itself. One other observation from extensive debugging through test_term_endpoint showed all the IPC stuff is working but the program hands trying to return(0); substituting exit(0) briefly fixed it, and my guess is that something is corrupting the stack, making it impossible for the program to return control to the caller. I do not include the modified test_term_endpoint, exit(0) is not a proper fix for a corrupted stack.

I'll be submitting parallel changes to czmq and zyre as well, and I'd appreciate any and all feedback on these proposed changes.

Thanks in advance!