This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using -mno-cygwin flag


Brian Salter-Duke wrote:

> I did understand that. If I understand you correctly, one can not use
> Mingw from inside cygwin to produce working code that uses sockets and
> pthreads. Is that correct? This code does use sockets and pthreads
> although I do not strictly need them as it is code that uses them to run
> in parallel and I only want to run on one processor. Oh well, I can
> still use it in cygwin.

Sure you can.  You just can't use the berkeley socket API.  You use the
native windows socket API (winsock.)  They are very similar, so porting
is usually not hard.  But it's not a drop-in replacement as some
semantics are different.

For pthreads, you can try pthreads-win32.  Or you can use the native
windows threads functions - but these two differ vastly.

The overall point here is that the code you're trying to compile relies
on posix/unix APIs, and without Cygwin those APIs are nonexistent on
windows.  So you either have to use the API that windows provides, find
a library that can provide them, or do without.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]