Big re-sync with UPX 1.2 branch.

committer: mfx <mfx> 1026835258 +0000
This commit is contained in:
Markus F.X.J. Oberhumer
2002-07-16 16:00:58 +00:00
parent 4a462f3c9a
commit 666e8c2f2f
62 changed files with 1637 additions and 727 deletions
+47 -9
View File
@@ -2,8 +2,8 @@
This file is part of the UPX executable compressor.
Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2001 Laszlo Molnar
Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2002 Laszlo Molnar
All Rights Reserved.
UPX and the UCL library are free software; you can redistribute them
@@ -21,8 +21,8 @@
If not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Laszlo Molnar
markus@oberhumer.com ml1050@cdata.tvnet.hu
Markus F.X.J. Oberhumer Laszlo Molnar
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
*/
@@ -32,16 +32,56 @@
#ifdef __cplusplus
//#define NOTHROW throw()
/*************************************************************************
// exceptions, RTTI
// exceptions & RTTI
**************************************************************************/
#if defined(__DMC__)
#include <new.h>
#include <typeinfo.h>
namespace std {
typedef ::Type_info type_info;
class exception
{
public:
exception() NOTHROW { }
virtual ~exception() NOTHROW { }
virtual const char* what() const NOTHROW { return "exception"; }
};
class bad_alloc : public exception
{
public:
bad_alloc() NOTHROW { }
virtual ~bad_alloc() NOTHROW { }
virtual const char* what() const NOTHROW { return "bad_alloc"; }
};
};
#elif defined(__WATCOMC__)
#define std
#include <exception>
//#include <stdexcept>
#include <new>
#include <typeinfo>
class bad_alloc { };
#else
#include <exception>
//#include <stdexcept>
#include <new>
#include <typeinfo>
#endif
/*************************************************************************
// STL
@@ -52,7 +92,7 @@
#if defined(__linux__)
# define _NOTHREADS
#endif
#if defined(__DJGPP__) || defined(__MINGW32__) || defined(__sparc__)
#if defined(__GNUC__)
# define __THROW_BAD_ALLOC throw bad_alloc()
# define __USE_MALLOC
# define enable upx_stl_enable
@@ -71,8 +111,6 @@
#endif /* WANT_STL */
using namespace std;
#endif /* __cplusplus */
#endif /* already included */