endif
else
HOST=mingw32-linux
-HOST_CFLAGS+=-fshort-wchar -D__LINUX__
-HOST_CPPFLAGS+=-fshort-wchar -D__LINUX__
+HOST_CFLAGS+=-fshort-wchar
+HOST_CPPFLAGS+=-fshort-wchar
endif
endif
{
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
-#ifdef __LINUX__
+#ifdef __linux__
const char * NamedPipeReader::s_LineBreak = "\x0A\0";
#else
const char * NamedPipeReader::s_LineBreak = "\x0D\x0A\0";
cerr << "NamedPipeReader::openPipe> pipe already open" << endl;
return false;
}
-#ifndef __LINUX__
+#ifndef __linux__
h_Pipe = CreateFile(PipeCmd.c_str(),
GENERIC_WRITE | GENERIC_READ,
0,
cerr << "NamedPipeReader::closePipe> pipe is not open" << endl;
return false;
}
-#ifdef __LINUX__
+#ifdef __linux__
close(h_Pipe);
#else
DisconnectNamedPipe(h_Pipe);
bool NamedPipeReader::readPipe(char * buffer, int bufferlength, long & bytesread)
{
-#ifdef __LINUX__
+#ifdef __linux__
long cbRead = read(h_Pipe,
buffer,
(bufferlength-1) * sizeof(char));
}
}
-#ifdef __LINUX__
+#ifdef __linux__
if (s_Entries.size())
{
long secs = s_Entries[i]->tm.tv_sec - tm.tv_sec;
void OsSupport::cancelAlarms()
{
-#ifndef __LINUX__
+#ifndef __linux__
if (s_hThread)
{
TerminateThread(s_hThread, 0);
}
-#ifndef __LINUX__
+#ifndef __linux__
HANDLE OsSupport::s_hThread = 0;
static HANDLE hTimer;
string RosBootTest::XEN_CONFIG_FILE = "XEN_CONFIG_FILE";
string RosBootTest::XEN_CONFIG_NAME = "XEN_CONFIG_NAME";
-#ifdef __LINUX__
+#ifdef __linux__
string RosBootTest::ROS_EMU_PATH = "ROS_EMU_PATH_LIN";
#else
string RosBootTest::ROS_EMU_PATH = "ROS_EMU_PATH_WIN";
img = "output-i386";
EnvironmentVariable::getValue("ROS_OUTPUT", img);
-#ifdef __LINUX__
+#ifdef __linux__
img += "/ros.hd";
#else
img += "\\ros.hd";
}
-#ifdef __LINUX__
+#ifdef __linux__
qemuimgdir += "/qemu-img";
#else
const char * options[] = {NULL,
"create",
"-f",
-#ifdef __LINUX__
+#ifdef __linux__
"raw",
#else
"vmdk",
{
string::size_type pos;
-#ifdef __LINUX__
+#ifdef __linux__
pos = m_EmuPath.find_last_of("/");
#else
pos = m_EmuPath.find_last_of("\\");
m_MaxMem = "64";
}
-#ifdef __LINUX__
+#ifdef __linux__
if (mktemp(pipename))
{
return false;
}
-#ifdef __LINUX__
+#ifdef __linux__
/* on linux we need get pid in order to be able
* to terminate the emulator in case of errors
* on windows we can get pid as return of CreateProcess
{
pipe = pipe.substr(0, pos);
}
-#ifdef __LINUX__
+#ifdef __linux__
m_Src = pipe;
#else
m_Src = "\\\\.\\pipe\\" + pipe.substr(0, pos);
return false;
}
}
-#ifdef __LINUX__
+#ifdef __linux__
if (mkfifo(m_Src.c_str(), 400))
{
/*
cleanup(conf_parser);
return false;
}
-#ifdef __LINUX__
+#ifdef __linux__
/*
* For linux systems we can only
* check if the emulator runs by
}
#endif
OsSupport::cancelAlarms();
-#ifdef __LINUX__
+#ifdef __linux__
// OsSupport::setAlarm (m_MaxTime, m_Pid);
// OsSupport::setAlarm(m_MaxTime, getpid());
#else