Visual Studio and RAD Studio 32 and 64 bit compilation issues
- fixed: 64 bit compilation issues
- fixed: project could not be compiled with Visual Studio 2019
- fixed: project could not be compiled with Embarcadero RAD Studio XE7
Hi!
Sorry for being so late, I was reviewing a few things and here is what I did in the latest version (4.5.2):
- upper-cased
trueandfalse. I kept the lower-case as well for compatibility - added an MS specific
#defineto handlesx_strdup
Unfortunately, I couldn't handle the strncpy_s cases easily; but I'll definitely look into it because it's safer. The function seems to be available in standard C but it doesn't show in my Linux. I'll look into that some other time.
Also, I decided not to take into account the RAD-specific setting because it seems the problem comes from the compiler: struct initialization is standard for a long time.
I wanted to merge your first commit but cherry-pick on the second one but I couldn't find a way to do it. If you have a chance to check the new version, you'll have to redo the changes for the strncpy_s and others. If it's something you want to improve in sxmlc, please do so :) but prototypes should be defined in sxmlc.h (with sx_ prefix) and harmonized throughout the code, keeping in mind most people use it in embedded software running Linux :)
Regards, Matthieu