After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 585733 - Wrong #include order in gstsegment.c
Wrong #include order in gstsegment.c
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Windows
: Normal trivial
: 0.10.24
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-06-14 12:57 UTC by LRN
Modified: 2009-06-14 19:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Changes #include order to get config.h before _mingw.h (628 bytes, patch)
2009-06-14 12:59 UTC, LRN
committed Details | Review

Description LRN 2009-06-14 12:57:50 UTC
GCC complains:
In file included from gst_private.h:28,
                 from gstsegment.c:25:
../config.h:311:1: error: "__MSVCRT_VERSION__" redefined
In file included from c:\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/math.h:20,
                 from gstsegment.c:23:
c:\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/_mingw.h:213:1: error: this is the location of the previous definition

This happens because gstsegment.c includes <math.h> before it includes "gst_private.h". <math.h> pulls <_mingw.h>, and <_mingw.h>, seeing that __MSVCRT_VERSION__ is not defined, defines it. Then "gst_private.h" pulls config.h, which redefines __MSVCRT_VERSION__
Comment 1 LRN 2009-06-14 12:59:04 UTC
Created attachment 136554 [details] [review]
Changes #include order to get config.h before _mingw.h
Comment 2 Sebastian Dröge (slomo) 2009-06-14 17:56:28 UTC
The patch is good but could you please use your real name for patches? :)
Comment 3 LRN 2009-06-14 18:02:33 UTC
No, i could not. I have my reasons.
Comment 4 Tim-Philipp Müller 2009-06-14 19:05:43 UTC
commit 18a34288cfdfc71a6bc2b6e1d6c59f5c64c23190
Author: Руслан Ижбулатов <lrn1986@gmail.com>
Date:   Sun Jun 14 16:56:32 2009 +0400

    segment: fix include order to get config.h before _mingw.h
    
    config.h must always be included before any other includes, either
    directly or indirectly via gst_private.h. Fixes #585733.