-fix some linux build issues

svn path=/trunk/; revision=27641
This commit is contained in:
Christoph von Wittich 2007-07-13 23:19:04 +00:00
parent 111b3553aa
commit 79ae53bf4b
3 changed files with 20 additions and 4 deletions

View file

@ -10,7 +10,7 @@
* PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at)
*/
#if 1
#ifndef __LINUX__
#include <windows.h>
#else
#include <unistd.h>

View file

@ -48,9 +48,9 @@ SYSREGBUILD_OBJECTS = \
ifeq ($(HOST),mingw32-linux)
SYSREGBUILD_HOST_CFLAGS = $(TOOLS_CPPFLAGS) -D__USE_W32API -D__LINUX__ -Iinclude -Iinclude/reactos -Iinclude/psdk -Iinclude/reactos/libs
SYSREGBUILD_HOST_CFLAGS = $(TOOLS_CPPFLAGS) -D__LINUX__
else
SYSREGBUILD_HOST_CFLAGS = $(TOOLS_CPPFLAGS) -D__USE_W32API -Iinclude -Iinclude/reactos -Iinclude/psdk -Iinclude/reactos/libs
SYSREGBUILD_HOST_CFLAGS = $(TOOLS_CPPFLAGS) -D__USE_W32API -Iinclude -Iinclude/reactos -Iinclude/psdk -Iinclude$(SEP)crt -Iinclude/reactos/libs -I$(INTERMEDIATE_)$(SEP)include$(SEP)psdk
endif
SYSREGBUILD_HOST_LFLAGS = $(TOOLS_LFLAGS)

View file

@ -11,9 +11,25 @@
*/
#include <string>
#include <tchar.h>
#include <iostream>
#ifndef __LINUX__
#include <tchar.h>
#else
#define TCHAR char
#define tstrcpy strcpy
#define _tcscat strcat
#define _tcscpy(str1, str2) strcpy(str1, str2)
#define _tcslen(str1) strlen(str1)
#define _tcstod strtod
#define _tcscmp strcmp
#define _tcstoul strtoul
#define _tcsncmp strncmp
#define _tremove remove
#define _ttoi atoi
#define _T(x) x
#endif
typedef std::basic_string<TCHAR> string;
typedef std::basic_istringstream<TCHAR> istringstream;