X-Recipient: archive-cygwin AT delorie DOT com 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 X-Yahoo-SMTP: jenXL62swBAWhMTL3wnej93oaS0ClBQOAKs8jbEbx_o- Date: Sat, 5 Feb 2011 14:35:41 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: sigsegv in compiled cygwin Message-ID: <20110205193541.GA14935@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20110204150118 DOT GA20523 AT ednor DOT casa DOT cgf DOT 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 AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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