From 61377c582e0f2675baa5f5e6e30a35d1a4164b33 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 1 May 2017 16:08:43 +0300 Subject: Add hxx extension for headers and lib prefix for library dir --- libbutl/win32-utility.hxx | 54 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 libbutl/win32-utility.hxx (limited to 'libbutl/win32-utility.hxx') diff --git a/libbutl/win32-utility.hxx b/libbutl/win32-utility.hxx new file mode 100644 index 0000000..cdaf846 --- /dev/null +++ b/libbutl/win32-utility.hxx @@ -0,0 +1,54 @@ +// file : libbutl/win32-utility.hxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef LIBBUTL_WIN32_UTILITY_HXX +#define LIBBUTL_WIN32_UTILITY_HXX + +// Use this header to include and a couple of Win32-specific +// utilities. +// + +#ifdef _WIN32 + +// Try to include so that it doesn't mess other things up. +// +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# ifndef NOMINMAX // No min and max macros. +# define NOMINMAX +# include +# undef NOMINMAX +# else +# include +# endif +# undef WIN32_LEAN_AND_MEAN +#else +# ifndef NOMINMAX +# define NOMINMAX +# include +# undef NOMINMAX +# else +# include +# endif +#endif + +#include + +#include + +namespace butl +{ + namespace win32 + { + LIBBUTL_EXPORT std::string + error_msg (DWORD code); + + LIBBUTL_EXPORT std::string + last_error_msg (); + } +}; + +#endif // _WIN32 + +#endif // LIBBUTL_WIN32_UTILITY_HXX -- cgit v1.1