Description: Use exact-size integers for WAV header.
Author: Sandro Santilli <strk@keybit.net>
Bug: https://savannah.gnu.org/bugs/?30993

--- a/libsound/sdl/sound_handler_sdl.cpp
+++ b/libsound/sdl/sound_handler_sdl.cpp
@@ -31,6 +31,7 @@
 
 #include <vector>
 #include <boost/scoped_array.hpp>
+#include <boost/cstdint.hpp>
 #include <SDL.h>
 
 // Define this to get debugging call about pausing/unpausing audio
@@ -45,23 +46,23 @@ namespace { // anonymous
 // http://ftp.iptel.org/pub/sems/doc/full/current/wav__hdr_8c-source.html
 typedef struct{
      char rID[4];            // 'RIFF'
-     long int rLen;        
+     boost::uint32_t rLen;        
      char wID[4];            // 'WAVE'
      char fId[4];            // 'fmt '
-     long int pcm_header_len;   // varies...
-     short int wFormatTag;
-     short int nChannels;      // 1,2 for stereo data is (l,r) pairs
-     long int nSamplesPerSec;
-     long int nAvgBytesPerSec;
-     short int nBlockAlign;      
-     short int nBitsPerSample;
+     boost::uint32_t pcm_header_len;   // varies...
+     boost::int16_t wFormatTag;
+     boost::int16_t nChannels;      // 1,2 for stereo data is (l,r) pairs
+     boost::uint32_t nSamplesPerSec;
+     boost::uint32_t nAvgBytesPerSec;
+     boost::int16_t nBlockAlign;      
+     boost::int16_t nBitsPerSample;
 } WAV_HDR;
 
 // Chunk of wave file
 // http://ftp.iptel.org/pub/sems/doc/full/current/wav__hdr_8c-source.html
 typedef struct{
     char dId[4];            // 'data' or 'fact'
-    long int dLen;
+    boost::uint32_t dLen;
 } CHUNK_HDR;
 
 } // end of anonymous namespace
