-fix compilation with msvc

-fix some memory leaks

svn path=/trunk/; revision=29459
This commit is contained in:
Christoph von Wittich 2007-10-08 19:18:42 +00:00
parent 73b6c28cf8
commit d576ff0223
5 changed files with 12 additions and 21 deletions

View file

@ -13,6 +13,9 @@
#ifdef WIN32
#include <io.h>
#include <dos.h>
#include <windows.h>
int __cdecl strcasecmp (const char * __sz1, const char * __sz2)
{return _stricmp (__sz1, __sz2);}
#else
#include <sys/io.h>
#include <errno.h>

View file

@ -69,8 +69,8 @@ namespace Sysreg_
}
}
}
fclose(file);
return ret;
}
//---------------------------------------------------------------------------------------

View file

@ -27,7 +27,7 @@
#include <assert.h>
#include <math.h>
#include <signal.h>
//#include <io.h>
#include <io.h>
namespace Sysreg_
{

View file

@ -77,9 +77,11 @@ int main(int argc, char * argv[])
if (!ret)
{
cout << "The regression test has failed at stage: " << i << endl;
delete regtest;
return -2;
}
}
cout << "The regression test completed successfully" << endl;
delete regtest;
return 0;
}

View file

@ -18,26 +18,12 @@
#define pclose _pclose
#endif
typedef std::basic_string<char> string;
typedef std::basic_istringstream<char> istringstream;
typedef std::basic_string<char> string;
typedef std::basic_istringstream<char> istringstream;
#ifdef UNICODE
using std::wcout;
using std::wcerr;
using std::endl;
#define cout wcout
#define cerr wcerr
#else
using std::cout;
using std::cerr;
using std::endl;
#endif
using std::cout;
using std::cerr;
using std::endl;
#endif // end of USER_TYPES_H__