public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* posix functions
@ 2000-04-15  7:49 stefan
  2000-04-15 11:07 ` Mumit Khan
  0 siblings, 1 reply; 3+ messages in thread
From: stefan @ 2000-04-15  7:49 UTC (permalink / raw)
  To: Cygwin Mailing List

hi cygwin'ners:

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 ?

i got two further question on the socket-api:

1) is it neccessary to link againt -lwsock32 using cygwin1.dll ?
2) is it neccessary to call WSAStartup() (i am NOT speaking of mingw) ?

Thanks in advance.

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Stefan Jahn                                                _/
_/ email: st.jahn@fhtw-berlin.de                              _/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: posix functions
  2000-04-15  7:49 posix functions stefan
@ 2000-04-15 11:07 ` Mumit Khan
  2000-04-16  7:45   ` stefan
  0 siblings, 1 reply; 3+ messages in thread
From: Mumit Khan @ 2000-04-15 11:07 UTC (permalink / raw)
  To: stefan; +Cc: Cygwin Mailing List

stefan <stefan@lkcc.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@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: posix functions
  2000-04-15 11:07 ` Mumit Khan
@ 2000-04-16  7:45   ` stefan
  0 siblings, 0 replies; 3+ messages in thread
From: stefan @ 2000-04-16  7:45 UTC (permalink / raw)
  To: Mumit Khan; +Cc: Cygwin Mailing List

On Sat, 15 Apr 2000, Mumit Khan wrote:

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

Yes, you're rigth. They are part of BSD 4.3 specs.

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Stefan Jahn                                                _/
_/ email: st.jahn@fhtw-berlin.de                              _/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-04-16  7:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-15  7:49 posix functions stefan
2000-04-15 11:07 ` Mumit Khan
2000-04-16  7:45   ` stefan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).