Peter Rosin wrote:
> I have:
> $ gcc -v
> Reading specs from C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/specs
> Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as
> --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads
> --disable-nls --enable-languages=c,c++,f77,ada,objc,java
> --disable-win32-registry --disable-shared --enable-sjlj-exceptions
> --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm
> --disable-libgcj-debug --enable-interpreter
> --enable-hash-synchronization --enable-libstdcxx-debug
> Thread model: win32
> gcc version 3.4.2 (mingw-special)
> 
> "gcc -std=c89 -E" on lt-usea.c has exactly one occurence of stat.h:
> # 1
> "C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/sys/stat.h" 1 3
> 
> No declaration from it though.
> 
> That file is like this:
> 
That's...quite different than mine. I'm running a slightly patched
version of mingw's gcc:

$ gcc -v
Reading specs from C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/specs
Configured with: ../gcc-3.4.5-20060117-3csw/configure --with-gcc
--with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32
--prefix=/mingw --enable-threads --disable-nls
--enable-languages=c,c++,f77,objc,java --disable-win32-registry
--disable-shared --enable-sjlj-exceptions --enable-libgcj
--disable-java-awt --without-x --enable-java-gc=boehm
--disable-libgcj-debug --enable-interpreter
--enable-hash-synchronization --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.5 (mingw special)

But the real kicker is sys/stat.h:

/*
 * stat.h
 * This file has no copyright assigned and is placed in the Public Domain.
 * This file is a part of the mingw-runtime package.
 * No warranty is given; refer to the file DISCLAIMER within the package.
 *
 * Symbolic constants for opening and creating files, also stat, fstat and
 * chmod functions.
 *
 */

#ifndef _STAT_H_
#define _STAT_H_

/* All the headers include this file. */
#include <_mingw.h>

#define __need_size_t
#define __need_wchar_t
#ifndef RC_INVOKED
#include <stddef.h>
#endif /* Not RC_INVOKED */

#include <sys/types.h>

/*
 * Constants for the stat st_mode member.
 */
...
#endif  /* Not _STAT_H_ */

What version of mingw-runtime are you using? (I'm not sure which version
I have; its from a bundle I put together about a year ago; I can get to
the docu for that bundler later today. It's probably mingw-runtime-3.14).

--
Chuck


Reply via email to