gst/festival/gstfestival.c: Guard unistd.h with HAVE_UNISTD_H
authorMichael Smith <msmith@xiph.org>
Thu, 24 Jul 2008 00:32:37 +0000 (00:32 +0000)
committerMichael Smith <msmith@xiph.org>
Thu, 24 Jul 2008 00:32:37 +0000 (00:32 +0000)
Original commit message from CVS:
* gst/festival/gstfestival.c:
Guard unistd.h with HAVE_UNISTD_H
* gst/modplug/libmodplug/load_it.cpp:
* gst/modplug/libmodplug/sndfile.cpp:
* gst/modplug/libmodplug/sndfile.h:
* gst/modplug/libmodplug/stdafx.h:
Support for compiling with MSVC: use _MSC_VER for detecting MSVC instead
of MSC_VER. Make CanPackSamples take the type it's passed. Change scope
of a variable in load_it.cpp to MSVC's scoping rules.
* gst/sdp/gstsdpdemux.c:
Guard unistd.h with HAVE_UNISTD_H
Fixes #544457.

ChangeLog
gst/festival/gstfestival.c
gst/modplug/libmodplug/load_it.cpp
gst/modplug/libmodplug/sndfile.cpp
gst/modplug/libmodplug/sndfile.h
gst/modplug/libmodplug/stdafx.h
gst/sdp/gstsdpdemux.c

index d4c510fcf5735d6ab11804007807e7a3a6373090..5618efbc8602cd9375f6ab92a4e3cd725f353742 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2008-07-23  Michael Smith <msmith@songbirdnest.com>
+
+       * gst/festival/gstfestival.c:
+         Guard unistd.h with HAVE_UNISTD_H
+       * gst/modplug/libmodplug/load_it.cpp:
+       * gst/modplug/libmodplug/sndfile.cpp:
+       * gst/modplug/libmodplug/sndfile.h:
+       * gst/modplug/libmodplug/stdafx.h:
+         Support for compiling with MSVC: use _MSC_VER for detecting MSVC instead
+         of MSC_VER. Make CanPackSamples take the type it's passed. Change scope
+         of a variable in load_it.cpp to MSVC's scoping rules.
+       * gst/sdp/gstsdpdemux.c:
+         Guard unistd.h with HAVE_UNISTD_H
+         Fixes #544457.
+
 2008-07-22  Stefan Kost  <ensonic@users.sf.net>
 
        * ext/timidity/gsttimidity.c:
index d67c5403bb1ea4af70743c1fde111fe4d3bbff61..7d919b90f8ffb29ab5ca7ff3fa530908326ba051 100644 (file)
 
 #include <stdio.h>
 #include <stdlib.h>
+
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
+
 #include <ctype.h>
 #include <string.h>
 #include <sys/types.h>
index d6222e9254c9a76a34c19b2a1c6ae1c69fcf0c8e..0dac75d64ae61850a295b8d5d9eb187552cc2b44 100644 (file)
@@ -869,7 +869,8 @@ BOOL CSoundFile::SaveIT(LPCSTR lpszFileName, UINT nPacking)
                {
                        MODCOMMAND *pzc = Patterns[npat];
                        UINT nz = PatternSize[npat] * m_nChannels;
-                       for (UINT iz=0; iz<nz; iz++)
+            INT iz;
+                       for (iz=0; iz<nz; iz++)
                        {
                                if ((pzc[iz].note) || (pzc[iz].instr)
                                 || (pzc[iz].volcmd) || (pzc[iz].command)) break;
index 23eeac7e3bb7fb1da4d37379c08a452a9f8695ec..aca357f0673e82f3eacc1beb8c60c25b33fe2a90 100644 (file)
@@ -820,7 +820,7 @@ UINT CSoundFile::PackSample(int &sample, int next)
 }
 
 
-BOOL CSoundFile::CanPackSample(LPSTR pSample, UINT nLen, UINT nPacking, BYTE *result)
+BOOL CSoundFile::CanPackSample(signed char * pSample, UINT nLen, UINT nPacking, BYTE *result)
 //-----------------------------------------------------------------------------------
 {
        int pos, old, oldpos, besttable = 0;
index 577bc69645417d73ba7be3abb4c493794bb23f36..863d866ffa49310f09a427d5e18275c5335c1d01 100644 (file)
@@ -730,7 +730,7 @@ public:
         /* Read/Write sample functions */
         signed char GetDeltaValue(signed char prev, UINT n) const { return (signed char)(prev + CompressionTable[n & 0x0F]); }
         UINT PackSample(int &sample, int next);
-        BOOL CanPackSample(LPSTR pSample, UINT nLen, UINT nPacking, BYTE *result=NULL);
+        BOOL CanPackSample(signed char * pSample, UINT nLen, UINT nPacking, BYTE *result=NULL);
         UINT ReadSample(MODINSTRUMENT *pIns, UINT nFlags, LPCSTR pMemFile, DWORD dwMemLength);
         BOOL DestroySample(UINT nSample);
         BOOL DestroyInstrument(UINT nInstr);
index cd2bb5d0ca3e9f234dea0f098cc199ecb6feec72..b1463fe58c4ebc459e556e8f14570bef9d76beac 100644 (file)
@@ -10,7 +10,7 @@
 #define _STDAFX_H_
 
 
-#ifdef MSC_VER
+#ifdef _MSC_VER
 
 #pragma warning (disable:4201)
 #pragma warning (disable:4514)
index 303452c892bc6e087e55fda807097a594469820d..be34a22a813295c6210cf30cf621eecf70b19c9c 100644 (file)
 #include "config.h"
 #endif
 
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
+
 #include <stdlib.h>
 #include <string.h>
 #include <locale.h>