Changes are necessary to make libshout compilable under Win32 with the MS C/C++ compiler
I have changed the sources to compile under Win32 with no errors, but don't have write access to svn, hence this ticket. The necessary changes:
- sock.h, line 34: reference to <compat.h> needs to be changed to #include "os.h"
- shout.c, line 1016: the MS compiler views a void pointer as a pointer with no size information associated with it, so addition operationg are not supported. The line should be changed to : ret = sock_write_bytes (self->socket, (void*)((char*)data + pos), len - pos);
- theora.c and vorbis.c should be included in the project file. This can be done either through the environment or manually with a text editor. Just add the following lines to libshout.dsp:
Begin Source File
SOURCE=..\src\vorbis.c
End Source File
Begin Source File
SOURCE=..\src\theora.c
End Source File
I don't know if that blank line is strictly necessary, but that's the way the other sources were included, so I stuck with that convention.
- The following lines need to be moved from sock.c to os.h: #define vsnprintf _vsnprintf
#ifndef MINGW32 #define va_copy(ap1, ap2) memcpy(&ap1, &ap2, sizeof(va_list)) #endif It actually won't hurt anything if they are left in sock.c, but they aren't necessary there.