This commit was generated by cvs2svn to compensate for changes in r1383,
[chise/xemacs-chise.git.1] / src / ntplay.c
index 916168e..d535fd9 100644 (file)
@@ -19,13 +19,13 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 02111-1307, USA.*/
 
 #include <windows.h>
-#undef CONST
 #include <config.h>
 #include <stdio.h>
 #include "sysfile.h"
 #include "lisp.h"
 
-#ifdef __CYGWIN32__
+#if (defined (__CYGWIN32__) || defined(__MINGW32__)) && \
+       CYGWIN_VERSION_DLL_MAJOR < 21
 extern BOOL WINAPI PlaySound(LPCSTR,HMODULE,DWORD);
 #else
 #include <mmsystem.h>
@@ -51,7 +51,7 @@ void play_sound_file (char *sound_file, int volume)
        return;
 
       size = lseek (ofd, 0, SEEK_END);
-      data = xmalloc (size);
+      data = (unsigned char *)xmalloc (size);
       lseek (ofd, 0, SEEK_SET);
       
       if (!data)
@@ -90,7 +90,7 @@ static void play_sound_data_1 (unsigned char *data, int length, int volume,
 
   if (convert_to_malloc)
     {
-      sound_data = xmalloc (length);
+      sound_data = (unsigned char *)xmalloc (length);
       memcpy (sound_data, data, length);
     }
   else