public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: sigsegv in compiled cygwin
Date: Sat, 05 Feb 2011 19:35:00 -0000	[thread overview]
Message-ID: <20110205193541.GA14935@ednor.casa.cgf.cx> (raw)
In-Reply-To: <iik3sk$7ur$1@dough.gmane.org>

On Sun, Feb 06, 2011 at 03:12:51AM +0900, jojelino wrote:
>i found small piece of code that need some comment.
>
>from trunk
>
>       int (*wsastartup) (int, WSADATA *);
>
>       /* Don't use autoload to load WSAStartup to eliminate recursion. */
>       wsastartup = (int (*)(int, WSADATA *))
>		   GetProcAddress ((HMODULE) (dll->handle), "WSAStartup");
>
>would have meant
>       typedef int __stdcall (*pfnwsastartup) (int, WSADATA *);
>       pfnwsastartup wsastartup;
>       wsastartup = (pfnwsastartup)
>		   GetProcAddress ((HMODULE) (dll->handle), "WSAStartup");
>
>otherwise stack frame would be damaged.

Why the typedef?

cgf

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

  reply	other threads:[~2011-02-05 19:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-04 12:38 jojelino
2011-02-04 15:01 ` Christopher Faylor
2011-02-05 18:11   ` jojelino
2011-02-05 19:35     ` Christopher Faylor [this message]
2011-02-05 19:59       ` jojelino
2011-02-05 20:03       ` Christopher Faylor
2011-02-09 14:16         ` [patch]another sigsegv in environ.cc jojelino
2011-02-09 14:52           ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110205193541.GA14935@ednor.casa.cgf.cx \
    --to=cgf-use-the-mailinglist-please@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).