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 393427 - error/warnings when compiling with mingw
error/warnings when compiling with mingw
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Windows
: Normal normal
: 0.10.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-01-06 08:23 UTC by Vincent Torri
Modified: 2007-01-08 12:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for the compilation of gst-plugins-good with MinGW (5.19 KB, patch)
2007-01-06 08:24 UTC, Vincent Torri
none Details | Review
new patch (4.24 KB, patch)
2007-01-06 12:36 UTC, Vincent Torri
committed Details | Review

Description Vincent Torri 2007-01-06 08:23:16 UTC
rtsp plugin:

rtspconnection.c:53:23: sys/ioctl.h: No such file or directory
rtspconnection.c: In function `rtsp_connection_read':
rtspconnection.c:504: warning: implicit declaration of function `ioctl'

winsock2.h declares ioctlsocket (third arg is an ulong, not an int). I've attached a patch below.


rtspdefs.c:47:19: netdb.h: No such file or directory
rtspdefs.c: In function `rtsp_strresult':
rtspdefs.c:215: warning: implicit declaration of function `hstrerror'

I don't know what I should do, here.
note that netdb.h is not needed on mingw. Is it for Linux ?


udp plugin:

gstudpsrc.c: In function `gst_udpsrc_create':
gstudpsrc.c:423: warning: int format, gulong arg (arg 8)
gstudpsrc.c:450: warning: int format, gulong arg (arg 8)

A fix is in the patch below.


jpeg plugin:

gstjpegenc.c: In function `gst_jpegenc_init':
gstjpegenc.c:235: warning: assignment from incompatible pointer type

gstjpegdec.c: In function `gst_jpeg_dec_init':
gstjpegdec.c:305: warning: assignment from incompatible pointer type
gstjpegdec.c:307: warning: assignment from incompatible pointer type

smokecodec.c: In function `smokecodec_encode_new':
smokecodec.c:176: warning: assignment from incompatible pointer type
smokecodec.c:187: warning: assignment from incompatible pointer type
smokecodec.c:189: warning: assignment from incompatible pointer type

These warnings come from jconfig.h: on Windows, a boolean is a unsigned char. A fix is in the patch below
Comment 1 Vincent Torri 2007-01-06 08:24:03 UTC
Created attachment 79515 [details] [review]
patch for the compilation of gst-plugins-good with MinGW
Comment 2 Vincent Torri 2007-01-06 08:26:54 UTC
netdb is needed... for hstrerror :)
Comment 3 Tim-Philipp Müller 2007-01-06 12:10:12 UTC
Cool, thanks for the patch. May I suggest the following changes though? :)

 - if the libjpeg header file says 'boolean', then the functions
   should probably return boolean on all systems, not only on win32
   (and even if different types were required it would be nicer to
   use a define or typedef IMHO)

 - please don't put #ifdef around GST_LOG statements for int vs long,
   just pick one of %ld or %d and add a cast

 - the printf format for gulong is %lu not %lud
Comment 4 Vincent Torri 2007-01-06 12:36:48 UTC
Created attachment 79523 [details] [review]
new patch

- The functions return boolean. You're right. Done
- Done (cast to an int)
- My 'suppr' key does not work well :)
Comment 5 Tim-Philipp Müller 2007-01-08 12:46:01 UTC
Thanks, applied:

 2007-01-08  Tim-Philipp Müller  <tim at centricular dot net>

        Patch by: Vincent Torri  <vtorri at univ-evry fr>

        * ext/jpeg/gstjpegdec.c:
        * ext/jpeg/gstjpegenc.c:
        * ext/jpeg/smokecodec.c:
          These libjpeg callbacks should return a 'boolean' (unsigned char
          apparently) and not a 'gboolean' (which maps to gint). Fixes
          warnings when compiling with MingW.

        * gst/rtsp/rtspconnection.c: (rtsp_connection_read):
          Use ioctlsocket on win32.

        * gst/udp/gstudpsrc.c: (gst_udpsrc_create):
          Some printf format fixes for win32.