Fix a couple of missing includes for MSVC2005 and a C99 issue. Also, starting with 2.14.0, GLib won't provide a pipe(...

Original commit message from CVS:
Patch by: Ole André Vadla Ravnås  <ole.andre.ravnas@tandberg.com>
* gst/gsttrace.c:
* libs/gst/net/gstnetclientclock.c: (gst_net_client_clock_new):
* libs/gst/net/gstnettimepacket.c: (gst_net_time_packet_send):
* libs/gst/net/gstnettimeprovider.c: (gst_net_time_provider_new):
Fix a couple of missing includes for MSVC2005 and a C99 issue. Also,
starting with 2.14.0, GLib won't provide a pipe() macro any longer,
so use _pipe() directly (#492077).
* win32/common/dirent.c: (_treaddir):
Add a couple of casts to make it build without warnings with MSVC.
* win32/common/libgstreamer.def:
Add some more symbols that need to be exported.
This commit is contained in:
Ole André Vadla Ravnås 2007-10-31 22:01:03 +00:00 committed by Tim-Philipp Müller
parent 26f2316b27
commit 3317754e3e
7 changed files with 47 additions and 9 deletions

View file

@ -1,3 +1,21 @@
2007-10-31 Tim-Philipp Müller <tim at centricular dot net>
Patch by: Ole André Vadla Ravnås <ole.andre.ravnas@tandberg.com>
* gst/gsttrace.c:
* libs/gst/net/gstnetclientclock.c: (gst_net_client_clock_new):
* libs/gst/net/gstnettimepacket.c: (gst_net_time_packet_send):
* libs/gst/net/gstnettimeprovider.c: (gst_net_time_provider_new):
Fix a couple of missing includes for MSVC2005 and a C99 issue. Also,
starting with 2.14.0, GLib won't provide a pipe() macro any longer,
so use _pipe() directly (#492077).
* win32/common/dirent.c: (_treaddir):
Add a couple of casts to make it build without warnings with MSVC.
* win32/common/libgstreamer.def:
Add some more symbols that need to be exported.
2007-10-31 Tim-Philipp Müller <tim at centricular dot net>
* tests/examples/metadata/read-metadata.c: (message_loop):

View file

@ -56,6 +56,10 @@
#include <fcntl.h>
#include <string.h>
#if defined (_MSC_VER) && _MSC_VER >= 1400
# include <io.h>
#endif
#include "gst_private.h"
#include "gstinfo.h"

View file

@ -50,11 +50,17 @@
#include "config.h"
#endif
#include <unistd.h>
#include "gstnettimepacket.h"
#include "gstnetclientclock.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#if defined (_MSC_VER) && _MSC_VER >= 1400
#include <io.h>
#endif
GST_DEBUG_CATEGORY_STATIC (ncc_debug);
#define GST_CAT_DEFAULT (ncc_debug)
@ -610,7 +616,7 @@ gst_net_client_clock_new (gchar * name, const gchar * remote_address,
#ifdef G_OS_WIN32
GST_DEBUG_OBJECT (ret, "creating pipe");
if ((iret = pipe (CONTROL_SOCKETS (ret))) < 0)
if ((iret = _pipe (CONTROL_SOCKETS (ret), 4096, _O_BINARY)) < 0)
goto no_socket_pair;
#else
GST_DEBUG_OBJECT (ret, "creating socket pair");

View file

@ -188,6 +188,7 @@ gst_net_time_packet_send (const GstNetTimePacket * packet, gint fd,
fcntl (fd, F_SETFL, fdflags | O_NONBLOCK);
#elif defined G_OS_WIN32
flags = 1;
send_flags = 0;
#else
send_flags = MSG_DONTWAIT;
#endif
@ -196,11 +197,10 @@ gst_net_time_packet_send (const GstNetTimePacket * packet, gint fd,
#ifdef G_OS_WIN32
ioctlsocket (fd, FIONBIO, &flags); /* Set nonblocking mode */
ret = sendto (fd, buffer, GST_NET_TIME_PACKET_SIZE, NULL, addr, len);
#else
ret = sendto (fd, buffer, GST_NET_TIME_PACKET_SIZE, send_flags, addr, len);
#endif
ret = sendto (fd, buffer, GST_NET_TIME_PACKET_SIZE, send_flags, addr, len);
#ifdef __CYGWIN__
fcntl (fd, F_SETFL, fdflags);
#endif

View file

@ -44,7 +44,14 @@
#include <glib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#if defined (_MSC_VER) && _MSC_VER >= 1400
#include <io.h>
#endif
#ifndef G_OS_WIN32
#include <sys/ioctl.h>
#endif
@ -522,7 +529,7 @@ gst_net_time_provider_new (GstClock * clock, const gchar * address, gint port)
#ifdef G_OS_WIN32
GST_DEBUG_OBJECT (ret, "creating pipe");
if ((iret = pipe (CONTROL_SOCKETS (ret))) < 0)
if ((iret = _pipe (CONTROL_SOCKETS (ret), 4096, _O_BINARY)) < 0)
goto no_socket_pair;
#else
GST_DEBUG_OBJECT (ret, "creating socket pair");

View file

@ -285,7 +285,7 @@ _treaddir (_TDIR * dirp)
/* Start the search */
dirp->dd_handle = _tfindfirst (dirp->dd_name, &(dirp->dd_dta));
dirp->dd_handle = (long) _tfindfirst (dirp->dd_name, &(dirp->dd_dta));
if (dirp->dd_handle == -1) {
@ -353,7 +353,7 @@ _treaddir (_TDIR * dirp)
* file name. */
dirp->dd_dir.d_namlen = _tcslen (dirp->dd_dta.name);
dirp->dd_dir.d_namlen = (unsigned short) _tcslen (dirp->dd_dta.name);
_tcscpy (dirp->dd_dir.d_name, dirp->dd_dta.name);

View file

@ -103,6 +103,7 @@ EXPORTS
GST_CAT_CALL_TRACE DATA
GST_CAT_CAPS DATA
GST_CAT_CLOCK DATA
GST_CAT_DEFAULT DATA
GST_CAT_ELEMENT_PADS DATA
GST_CAT_ERROR_SYSTEM DATA
GST_CAT_EVENT DATA
@ -349,6 +350,8 @@ EXPORTS
gst_message_new_element
gst_message_new_eos
gst_message_new_error
gst_message_new_info
gst_message_new_latency
gst_message_new_new_clock
gst_message_new_segment_done
gst_message_new_segment_start