Files
mercury/runtime/mercury_windows.h
Julien Fischer 333bff9036 Fix several problems in the recently added mercury_windows header.
Branches: 11.07, main

Fix several problems in the recently added mercury_windows header.

runtime/mercury_windows.h
	Fix a typo: s/WIN2_/WIN32_/

	We need to wrap the contents of this file in
	#if defined(MR_WIN32) ... #endif; otherwise the
	namespace cleanliness check fails on non-Windows
	systems.

runtime/RESERVED_MACRO_NAMES:
	Ignore the WIN32_LEAN_NAD_MEAN macro since the runtime
	may define it in order to control the behaviour of windows.h.
2011-10-27 14:14:10 +00:00

38 lines
953 B
C

/*
** vim:ts=4 sw=4 expandtab
*/
/*
** Copyright (C) 2011 The University of Melbourne.
** This file may only be copied under the terms of the GNU Library General
** Public License - see the file COPYING.LIB in the Mercury distribution.
*/
/*
** mercury_windows.h - this header provides a wrapper around windows.h
** Mercury runtime and library modules should #include this header rather
** than #including windows.h directly.
**
*/
#ifndef MERCURY_WINDOWS_H
#define MERCURY_WINDOWS_H
#include "mercury_conf_param.h"
#if defined(MR_WIN32)
/*
** Defining WIN32_LEAN_AND_MEAN disables a series of #includes inside
** windows.h -- notably it disables the #include of winsock.h, the
** inclusion of which renders the winsock2 API unusable in Mercury
** foreign_procs.
*/
#if !defined(WIN32_LEAN_AND_MEAN)
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#endif
#endif /* not MERCURY_WINDOWS_H */