On Thu, Aug 07, 2014 at 12:49:34PM +0200, Paul Onyschuk wrote: > On Thu, 7 Aug 2014 11:30:36 +0100 > Adam Thompson wrote: > > > Perhaps, though as ms aren't updating C support any more I'm not sure > > about the idea of targeting vs. At the end of the day mingw or sigwin > > are probably better targets for Windows porting in my opinion. > > A lot of software is doing that already. Some IDEs for Windows like > Code::Blocks are targeting mingw by default, since GCC is on-part if > not better than compilers provided by Microsoft. Yeah, I've got a friend who uses Code::Blocks and I've compiled under Windows using mingw before and been happy with the results. > > As for the move to C++, I think if we allow ourselves to use the > > extensions provided by C99 and other common non-standard extensions > > (e.g. asprintf), we can get many of the benefits of such a move > > without the massive rewrite. > > asprintf() is definitly nice to have if you looking for string > manipulation with dynamic allocation. Agreed, I've used it extensively in prior projects. > snprintf() returns the number of characters that would have been output > if the size were unlimited, so that truncation can be detected. This > way buffer overflows can be detected and prevented compared to strcat() > and strcpy(). Yeah, which would be useful in various parts of the code. I also like the idea of being able to use stdbool.h. > > That's a good point, I'll have a look into this as I've got an > > up-to-date mac system at home. > > Perhaps I may even be able to put together a homebrew package as well, > > but first I need to work out if smjs will compile and is packaged for > > this to happen. > > Mac OS X shouldn't be a problem. What differs is location of includes > and libraries for linking. Their libc isn't so modern, but I wouldn't > worry about it. Beside that default compiler is Clang. The includes stuff isn't really the problem here, it's more that I'm happy enough to maintain an edbrowse package (or formula in homebrew speak) but not an smjs one since I'm not a Mozilla developer and thus keeping up with the changes in smjs would probably be a large amount of work which I simply don't have time for. I'm definitely going to look at the osx makefile though since that should just be a case of fixing include locations and possibly compiler flags. Cheers, Adam.