This is the mail archive of the 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]

Re: posix functions

stefan <> 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

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


Want to unsubscribe from this list?
Send a message to

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