[PATCH] Make libao compile with VC 10.
Changes:
- export API symbols from the DLL
- use C99's variadic macros for logging instead of a similar gcc extension
- include ks.h instead of ksmedia.h
- use ANSI versions of functions explicitely (do not use Unicode versions)
- isspace requires ctype.h
- remove unused dirent.h
- use size_t as return value of strlen
With these changes, code compiles with no errors and warnings (level 3) with VC 10 compiler and WinSDK v7.1, in Debug and Release modes, for Win32, x64 and Itanium platforms. It also compiles and links without a warning on Mac OS X with the 10.6 SDK and gcc 4.2 compiler (using ./configure ; make).
Used preprocessor definitions: HAVE_WMM;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;AO_BUILDING_LIBAO
This does not deal with dl(open|sym|close) APIs, so plugins do not work currently.
Also this only means clean compilation/linking. Correct working of the library has not been tested (because I do not know how to test it). Testing that the logging format is correct would be appreciated (rework of logging was the biggest change).
I would also like to submit the VC 2010 solution and project file for inclusion into libao (perhaps as a second revision of this patch). Is it possible? If yes, is there a good place to put it into (like contrib/vc10)? Need to know to make correct relative paths from the project file to the source files.
P.S.: could not find libao's SCM (Git, SVN) - is there one?