X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Date: Tue, 24 Feb 2009 17:03:34 +0100 From: Samuel Thibault To: cygwin AT cygwin DOT com Subject: Re: stat() returning EFAULT? Message-ID: <20090224160334.GD25330@const.bordeaux.inria.fr> Mail-Followup-To: cygwin AT cygwin DOT com References: <49A41834 DOT 9030501 AT dazjorz DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <49A41834.9030501@dazjorz.com> User-Agent: Mutt/1.5.12-2006-07-14 X-IsSubscribed: yes 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 Sjors Gielen, le Tue 24 Feb 2009 16:54:28 +0100, a écrit : > Here's the test case and output: > > #include > int main() { > if(stat("test") != 0) perror("Calling stat() on test"); > if(stat("test.exe") != 0) perror("Calling stat() on test.exe"); > return 0; > } Compile with -Wall, you're missing the second argument of stat(). Samuel -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/