| author | David Anderson <dvander@alliedmods.net> |
| Sun Aug 07 03:26:58 2005 +0000 (2005-08-07) | |
| changeset 95 | beffdec7d04c |
| parent 9 | 01b8b7435e67 |
| child 122 | 7c36121e2dfe |
| permissions | -rw-r--r-- |
1 /* ======== SourceMM ========
2 * Copyright (C) 2004-2005 Metamod:Source Development Team
3 * No warranties of any kind
4 *
5 * License: zlib/libpng
6 *
7 * Author(s): David "BAILOPAN" Anderson
8 * ============================
9 */
11 /**
12 * @brief Implements OS-dependant functions from oslink.h
13 * @file oslink.cpp
14 */
16 #include "oslink.h"
17 #ifdef __linux
18 #include <errno.h>
19 #endif
21 #if defined __WIN32__ || defined _WIN32 || defined WIN32
22 const char *dlerror()
23 {
24 static char buf[1024];
25 FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
26 NULL, GetLastError(),
27 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
28 (LPTSTR) &buf, 0, NULL);
29 return buf;
30 }
31 #endif
33 #if defined __linux__
34 int GetLastError()
35 {
36 return errno;
37 }
38 #endif