delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/05/04/19:49:07

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <42795FFF.23CADF3C@dessent.net>
Date: Wed, 04 May 2005 16:51:27 -0700
From: Brian Dessent <brian AT dessent DOT net>
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Using -mno-cygwin flag
References: <42789D45 DOT 6F74436D AT dessent DOT net> <20050504234142 DOT GB7464 AT monster DOT octa4 DOT net>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019