
Juergen Schoenwaelder wrote:
On Thu, Feb 08, 2007 at 07:29:25AM +1100, Andrew Hood wrote:
The attached diff lets SVN compile with MSVC2005. It might break builds with other tool chains.
Thanks. I have applied the patches to the .c and .h files (although I changed some of them - please check that things still work for you).
New patch against 6570. There seems to be no reason to have the duplicate function definitions which upset the compiler. I got the inline to work and dropped those two functions from dstring.c since there should be no excuse for not inlining such simple functions.
Indeed they could probably be made macros.
#define dstring_str(ds) (ds ? ds->str : NULL) #define dstring_len(ds) (ds ? ds->len : 0)
I did not update the makefile itself since most changes seem to reflect local preferences. But since I never use the makefile nor the README, I am happy to checkin whatever people who build on Windows using native tools agree on. (So far, I only cross-compiled binaries using the GNU tool chain.)
Which is why you aren't running into the MSVC "peculiarities".
MS doco says inline is defined to be C++ only. MS doco says use __inline in C.