portability fixes

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@59 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
spog
2006-05-09 20:51:34 +00:00
parent 06eb8cc3a4
commit 3591d7dc01
25 changed files with 217 additions and 190 deletions

View File

@@ -32,9 +32,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#ifdef WIN32
#define UNICODE
#include <windows.h>
#endif
#if defined (__linux__) || defined (__APPLE__)
#else
#include <errno.h>
#include <unistd.h>
#endif
@@ -66,15 +64,6 @@ void Error (const char *error, ...)
strcat( text, "\n" );
#if defined (__linux__) || defined (__APPLE__)
if (errno != 0)
{
strcat( text, "errno: " );
strcat( text, strerror (errno));
strcat( text, "\n");
}
#endif
#ifdef WIN32
if (GetLastError() != 0)
{
@@ -110,8 +99,16 @@ void Error (const char *error, ...)
strcat( text, "\n");
LocalFree( lpMsgBuf );
}
#else
if (errno != 0)
{
strcat( text, "errno: " );
strcat( text, strerror (errno));
strcat( text, "\n");
}
#endif
#if 0
// we need to have a current context to call glError()
if (g_glwindow_globals.d_glBase != 0)