Fix headers, so MSVC can use them

svn path=/trunk/; revision=23153
This commit is contained in:
Hervé Poussineau 2006-07-18 15:30:22 +00:00
parent 3d6bddb98f
commit 3dd1713e53
2 changed files with 11 additions and 1 deletions

View file

@ -56,6 +56,8 @@ extern "C" {
* The type of function that is expected as an exception handler to be
* installed with _try1.
*/
struct _CONTEXT;
struct _EXCEPTION_RECORD;
typedef EXCEPTION_DISPOSITION (*PEXCEPTION_HANDLER)
(struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*);

View file

@ -137,13 +137,21 @@ extern "C" {
#endif
#endif
#ifndef NOMINMAX
#if defined(_MSC_VER) && defined(__cplusplus)
#include <stdlib.h>
#define min __min
#define max __max
#elif !defined(NOMINMAX)
#ifndef max
#define max(a,b) ((a)>(b)?(a):(b))
#endif
#ifndef min
#define min(a,b) ((a)<(b)?(a):(b))
#endif
#endif
#define UNREFERENCED_PARAMETER(P) {(P)=(P);}