#1 Library does not compile on older borland compilers

open
nobody
None
5
2011-03-19
2011-03-19
No

1. Compiler complains about missing abort function
2. Compaler complains about missing isdigit and isxdigit functions
3. Compiler issues several warnings
4. Compiler reports Error E2354 in bigInt.cpp line 170

Fixes:
For problems 1, 2 and 3 add this code in bigint.h after #include <cassert>

#ifdef __BORLANDC__
// Needed for abort
#include <cstdlib>
using std::abort;
//needed for isdigit and isxdigit
#include <ctype.h>
//disable some warnings
#pragma warn -rch
#pragma warn -ccc
#pragma warn -aus
#pragma warn -inl
#endif /* __BORLANDC__ */

For issue number 4 modify line 170 in bigint.cpp to look like this:

const std::string exeFileName (i_args.empty() ? "exeFileName" : i_args[0].c_str());

Discussion


Log in to post a comment.