Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: From: NOE Nicolas To: "Cygwin (Adresse de messagerie)" Subject: latest release trouble using stat() with -mno-cygwin flag Date: Tue, 9 Jan 2001 11:17:30 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="iso-8859-1" Hello, I use stat() from sys/stat.h to get a file size in a C program, compiling with -mno-cygwin flag. It used to work before I updated to latest releases (cygwin, gcc and mingw), but now the stat structure seems to be melted, since I always get 4 as st_size, and that the real size seems to be in the st_atime field ! By the way, everything works fine without -mno-cygwin flag. Maybe I should ask my question on the mingw list, but I don't know if the mingw included in cygwin distribution is just a copy of the latest mingw release or if some things are changed. If the bug comes from a faulty mingw, is there a safe way to remove my current one (mingw-20001225-1.tar.gz) and reinstall a previous one ? I use the command line : gcc -mno-cygwin -o stat stat.c and my test program is the following (stat.c) : #include #include #include int main(int argc, char *argv[]) { int i; struct stat buf; for (i = 1; i < argc; i++) if (stat(argv[i], &buf)) fprintf(stderr, "stat(): error\n"); else printf("%s size is %d\n", argv[i], buf.st_size); return 0; } Nicolas Noe (n DOT noe AT cstb DOT fr) -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple