delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/04/15/13:07:42

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-Id: <200004151806.NAA01712@hp2.xraylith.wisc.edu>
To: stefan <stefan AT lkcc DOT org>
cc: Cygwin Mailing List <cygwin AT sourceware DOT cygnus DOT com>
Subject: Re: posix functions
In-reply-to: Your message of "Sat, 15 Apr 2000 16:48:35 +0200."
<Pine DOT LNX DOT 4 DOT 10 DOT 10004151642280 DOT 4062-100000 AT bono DOT reversers DOT net>
Date: Sat, 15 Apr 2000 13:06:44 -0500
From: Mumit Khan <khan AT NanoTech DOT Wisc DOT EDU>

stefan <stefan AT lkcc DOT org> writes:
> 
> when posting some software i noticed, that most of the POSIX functions
> have been implemented within the cygwin1.dll. would not have expected...
> the only "problem" where these two symbols:
> 
> setreuid()
> setregid()
> 
> does anyone know if i am just using a cygwin1.dll too old, or never ever
> someone used these ?

As far as I can remember, both of these are from BSD 4.3, and is not
part of the POSIX specs. Unfortunately, I don't have the POSIX specs
with me, so correction welcome. Was it added to later revisions of
POSIX?

You can probably use the POSIX ("almost equivalent") setuid, but be
aware that it's stubbed under Cygwin, which means that it'll link but 
set errno to ENOSYS when called.

> i got two further question on the socket-api:
> 
> 1) is it neccessary to link againt -lwsock32 using cygwin1.dll ?

Yes, but you need to make sure you're using winsock calls, not Cygwin's
sockets. I believe that you need to define:
  
  #define Win32_Winsock

*before* including any cygwin's networking includes. And of course you'll
need to link with -lwsock32 or whatever the appropriate libraries are.

> 2) is it neccessary to call WSAStartup() (i am NOT speaking of mingw) ?

If you're going to use Winsock instead of Cygwin networking code, you'll 
have to follow Winsock's specifications. Winsock requires that you call
WSAStartup.

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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