[gst-devel] gstreamer mingw32 __stat64

Julien Isorce julien.isorce at gmail.com
Mon Oct 6 12:26:30 CEST 2008


Hi,

In top of "gstreamer-0.10.21/plugins/elements/gstfilesrc.c"  I can see:

#ifdef G_OS_WIN32
...
#define stat __stat64
...
#endif

(G_OS_WIN32 is defined in glibconfig.h :

#define GLIB_MAJOR_VERSION 2
#define GLIB_MINOR_VERSION 18
#define GLIB_MICRO_VERSION 1

#define G_OS_WIN32
#define G_PLATFORM_WIN32
)

And in C:/MinGW/include/sys/stat.h i can see that __stat64 is only defined
like this:

#if __MSVCRT_VERSION__ >= 0x0601
struct __stat64
{
    _dev_t st_dev;
    _ino_t st_ino;
    _mode_t st_mode;
    short st_nlink;
    short st_uid;
    short st_gid;
    _dev_t st_rdev;
    __int64 st_size;
    __time64_t st_atime;
    __time64_t st_mtime;
    __time64_t st_ctime;
};
#endif /* __MSVCRT_VERSION__ */

And in C:/MinGW/include/_mingw.h I can see :

#ifndef __MSVCRT_VERSION__
/*  High byte is the major version, low byte is the minor. */
# define __MSVCRT_VERSION__ 0x0600
#endif

So __stat64 is never defined when using mingw32 so gstfilesrc.c won't
compile.

I am using last release of mingw32 3.4.5:
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=11598&release_id=16693
(see dev package)

So what should I do ? : define __MSVCRT_VERSION__ 0x0601  or remove the
#ifdef G_OS_WIN32
...
#define stat __stat64
...
#endif in top of gstfilesrc.c ?

Sincerely

Julien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20081006/953aeb68/attachment.htm>


More information about the gstreamer-devel mailing list