gstreamer mingw32 __stat64

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

gstreamer mingw32 __stat64

Julien Isorce
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



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer mingw32 __stat64

Andoni Morales
I'm facing the same problem...
Any suggestion?

2008/10/6 Julien Isorce <[hidden email]>
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



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer mingw32 __stat64

Stefan Sauer
In reply to this post by Julien Isorce
hi,

I think its best to file a bug for the time beeing.

Stefan

Julien Isorce schrieb:

> 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
> <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
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>  


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel