From e0b126d8c7f691856ec4d80bb57cb1ba5c71fd69 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 22 Jun 2016 23:00:36 +0300 Subject: Add mkslink(), mkhlink() --- butl/win32-utility | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 butl/win32-utility (limited to 'butl/win32-utility') diff --git a/butl/win32-utility b/butl/win32-utility new file mode 100644 index 0000000..c74eb66 --- /dev/null +++ b/butl/win32-utility @@ -0,0 +1,52 @@ +// file : butl/win32-utility -*- C++ -*- +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef BUTL_WIN32_UTILITY +#define BUTL_WIN32_UTILITY + +// 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 + +namespace butl +{ + namespace win32 + { + std::string + error_msg (DWORD code); + + std::string + last_error_msg (); + } +}; + +#endif // _WIN32 + +#endif // BUTL_WIN32_UTILITY -- cgit v1.1