From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20961 invoked by alias); 5 Feb 2011 19:35:50 -0000 Received: (qmail 20884 invoked by uid 22791); 5 Feb 2011 19:35:50 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,TW_EG,TW_FN,UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org Received: from nm4-vm0.bullet.mail.sp2.yahoo.com (HELO nm4-vm0.bullet.mail.sp2.yahoo.com) (98.139.91.190) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Sat, 05 Feb 2011 19:35:45 +0000 Received: from [98.139.91.63] by nm4.bullet.mail.sp2.yahoo.com with NNFMP; 05 Feb 2011 19:35:43 -0000 Received: from [98.136.185.28] by tm3.bullet.mail.sp2.yahoo.com with NNFMP; 05 Feb 2011 19:35:43 -0000 Received: from [127.0.0.1] by smtp109.mail.gq1.yahoo.com with NNFMP; 05 Feb 2011 19:35:43 -0000 Received: from cgf.cx (cgf@72.70.43.36 with login) by smtp109.mail.gq1.yahoo.com with SMTP; 05 Feb 2011 11:35:43 -0800 PST X-Yahoo-SMTP: jenXL62swBAWhMTL3wnej93oaS0ClBQOAKs8jbEbx_o- Received: from ednor.cgf.cx (ednor.casa.cgf.cx [192.168.187.5]) by cgf.cx (Postfix) with ESMTP id BD3D813C0CD for ; Sat, 5 Feb 2011 14:35:41 -0500 (EST) Received: by ednor.cgf.cx (Postfix, from userid 201) id A1CA461E2AE; Sat, 5 Feb 2011 14:35:41 -0500 (EST) Date: Sat, 05 Feb 2011 19:35:00 -0000 From: Christopher Faylor To: cygwin@cygwin.com Subject: Re: sigsegv in compiled cygwin Message-ID: <20110205193541.GA14935@ednor.casa.cgf.cx> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20110204150118.GA20523@ednor.casa.cgf.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-02/txt/msg00137.txt.bz2 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