delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/02/24/11:03:54

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 <samuel DOT thibault AT ens-lyon DOT org>
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
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
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 <errno.h>
> 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019