Procházet zdrojové kódy

KWSys 2013-10-08 (96b2f6f4)

Extract upstream KWSys using the following shell commands.

$ git archive --prefix=upstream-kwsys/ 96b2f6f4 | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' deec6b8a..96b2f6f4
Adrien Destugues (2):
      2b303bd7 SystemTools: Remove outdated preprocessor checks for Haiku
      96b2f6f4 DynamicLoader: Cleanup test include files for Haiku

Rolf Eike Beer (1):
      dbc8fa1b SystemInformation: fix truncation warnings

Change-Id: I25364f58d62dd73fde0f7625d9d77ed0d4726e33
KWSys Robot před 12 roky
rodič
revize
1a39f857f7
3 změnil soubory, kde provedl 5 přidání a 13 odebrání
  1. 4 3
      SystemInformation.cxx
  2. 0 5
      SystemTools.cxx
  3. 1 5
      testDynamicLoader.cxx

+ 4 - 3
SystemInformation.cxx

@@ -1734,12 +1734,12 @@ int SystemInformationImplementation::GetFullyQualifiedDomainName(
       {
       char host[NI_MAXHOST]={'\0'};
 
-      socklen_t addrlen
+      const size_t addrlen
         = (fam==AF_INET?sizeof(struct sockaddr_in):sizeof(struct sockaddr_in6));
 
       ierr=getnameinfo(
             ifa->ifa_addr,
-            addrlen,
+            static_cast<socklen_t>(addrlen),
             host,
             NI_MAXHOST,
             NULL,
@@ -3836,7 +3836,8 @@ bool SystemInformationImplementation::QueryLinuxMemory()
     unsigned long temp;
     unsigned long cachedMem;
     unsigned long buffersMem;
-    char *r=fgets(buffer, sizeof(buffer), fd); // Skip "total: used:..."
+    // Skip "total: used:..."
+    char *r=fgets(buffer, static_cast<int>(sizeof(buffer)), fd);
     int status=0;
     if(r==buffer)
       {

+ 0 - 5
SystemTools.cxx

@@ -152,11 +152,6 @@ public:
 #define _chdir chdir
 #endif
 
-#if defined(__HAIKU__)
-#include <os/kernel/OS.h>
-#include <os/storage/Path.h>
-#endif
-
 #if defined(__BEOS__) && !defined(__ZETA__)
 #include <be/kernel/OS.h>
 #include <be/storage/Path.h>

+ 1 - 5
testDynamicLoader.cxx

@@ -15,14 +15,10 @@
 #include KWSYS_HEADER(ios/iostream)
 #include KWSYS_HEADER(stl/string)
 
-#if defined(__BEOS__)
+#if defined(__BEOS__) || defined(__HAIKU__)
 #include <be/kernel/OS.h>  /* disable_debugger() API. */
 #endif
 
-#if defined(__HAIKU__)
-#include <os/kernel/OS.h>  /* disable_debugger() API. */
-#endif
-
 // Work-around CMake dependency scanning limitation.  This must
 // duplicate the above list of headers.
 #if 0