on 2009 Dec 03 2:07 PM
Recently, I've tried to update a custom backup program written in Borland C++ Builder from dbtools 9 to dbtools 10, and I've started getting strange error messages. After some investigation using MSVC I discovered that size of chkpt_log_type
member in a_backup_db
structure is 1 byte in C++B and 4 bytes in MSVC. With my C knowledge being between 'weak' and 'nonexistent', I copied dbtools.h to my project and inserted 3 bytes stuffing after the chkpt_log_type
. It did the trick for me, but I am unsure it is the best solution (and if it is correct at all), hence I'm asking for the better option.
Request clarification before answering.
As to the question "What's the size of an enum?", you may have a look at StackOverflow.
AFAIK, the size is partly compiler-dependent, and MSVC seems to use an int whereas C++ only requires the smallest binary size that can store all values - what could be 3 bits in this particular case.
Besides these facts, I can't tell whether this might lead to further problems when compling the DBTools LIB against different compilers. I would suggest to use the fitting LIB (Borland or MS). Note that in SA 11 there's no more support for Borland compilers on Windows plattforms.
Oops, I have to correct myself: There's no more Borland LIB in SA 11 but a .DEF file as substitute.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
46 | |
9 | |
8 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.