fix some of the build errors
authorChristoph von Wittich <christoph_vw@reactos.org>
Wed, 3 Oct 2007 16:52:31 +0000 (16:52 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Wed, 3 Oct 2007 16:52:31 +0000 (16:52 +0000)
svn path=/trunk/; revision=29379

reactos/tools/sysreg/os_support.cpp
reactos/tools/sysreg/rosboot_test.cpp

index b6175b2..1f3ce16 100644 (file)
@@ -17,8 +17,9 @@ namespace System_
     void OsSupport::checkAlarms()
     {
         struct timeval tm;
+               size_t i;
         gettimeofday(&tm, 0);
-        for (size_t i = 0; i < s_Entries.size(); i++)
+        for (i = 0; i < s_Entries.size(); i++)
         {
             long diffsec = s_Entries[i]->tm.tv_sec - tm.tv_sec;
             if (diffsec < 0)
@@ -34,7 +35,7 @@ namespace System_
 #ifdef __LINUX__
         if (s_Entries.size())
         {
-            long secs = Entries[i]->tm.tv_sec - tm.tv_sec;
+            long secs = s_Entries[i]->tm.tv_sec - tm.tv_sec;
             alarm(secs);
         }
 #endif
@@ -64,7 +65,6 @@ namespace System_
 
 #ifndef __LINUX__
 
-    HANDLE OsSupport::s_hTimer = INVALID_HANDLE_VALUE;
     HANDLE OsSupport::s_hThread = 0;
     static HANDLE hTimer;
        bool OsSupport::terminateProcess(OsSupport::ProcessID pid, int exitcode)
index d16e219..f33b2c5 100644 (file)
@@ -27,7 +27,6 @@
 #include <assert.h>
 #include <math.h>
 #include <signal.h>
                        
 namespace Sysreg_
 {
@@ -754,7 +753,7 @@ namespace Sysreg_
         OsSupport::cancelAlarms();
         OsSupport::setAlarm (m_MaxTime, m_Pid);
 #ifdef __LINUX__
-        OsSupport::setAlarm(m_MaxTime, _getpid());
+        OsSupport::setAlarm(m_MaxTime, getpid());
 #else
         OsSupport::setAlarm(m_MaxTime, GetCurrentProcessId());
 #endif