mirror of
https://github.com/anope/anope.git
synced 2026-06-25 23:26:38 +02:00
3fe5aa037a
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2106 5417fbe8-f217-4b02-8779-1006273d7864
28 lines
609 B
C++
28 lines
609 B
C++
/* POSIX emulation layer for Windows.
|
|
*
|
|
* Copyright (C) 2008 Robin Burchell <w00t@inspircd.org>
|
|
* Copyright (C) 2008 Anope Team <info@anope.org>
|
|
*
|
|
* Please read COPYING and README for further details.
|
|
*
|
|
* Based on the original code of Epona by Lara.
|
|
* Based on the original code of Services by Andy Church.
|
|
*
|
|
* $Id$
|
|
*
|
|
*/
|
|
|
|
#ifdef WIN32
|
|
#include <windows.h>
|
|
|
|
const char *dlerror()
|
|
{
|
|
static char errbuf[513];
|
|
DWORD err = GetLastError();
|
|
if (!err)
|
|
return NULL;
|
|
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, 0, errbuf, 512, NULL);
|
|
return errbuf;
|
|
}
|
|
#endif
|