From 1562193bf66f3df4a168867496bcd0aa7c831e5f Mon Sep 17 00:00:00 2001
From: hjk <qtc-committer@nokia.com>
Date: Thu, 12 Mar 2009 11:49:04 +0100
Subject: [PATCH] Fixes:    debugger: compile fix for dumpers on naked Windows
 XP Details:  <unistd.h> does not seem to be present there

---
 share/qtcreator/gdbmacros/gdbmacros.cpp | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/share/qtcreator/gdbmacros/gdbmacros.cpp b/share/qtcreator/gdbmacros/gdbmacros.cpp
index 1a2bb67f548..d0e3d68c5cb 100644
--- a/share/qtcreator/gdbmacros/gdbmacros.cpp
+++ b/share/qtcreator/gdbmacros/gdbmacros.cpp
@@ -63,10 +63,6 @@ int qtGhVersion = QT_VERSION;
 #include <set>
 #include <vector>
 
-#include <ctype.h>
-#include <stdio.h>
-#include <unistd.h>
-
 /*!
   \class QDumper
   \brief Helper class for producing "nice" output in Qt Creator's debugger.
@@ -246,7 +242,7 @@ static const void *addOffset(const void *p, int offset)
 
 static const void *skipvtable(const void *p)
 {
-    return sizeof(void*) + reinterpret_cast<const char *>(p);
+    return sizeof(void *) + reinterpret_cast<const char *>(p);
 }
 
 static const void *deref(const void *p)
@@ -266,7 +262,7 @@ static bool isEqual(const char *s, const char *t)
 
 static bool startsWith(const char *s, const char *t)
 {
-    return qstrncmp(s, t, strlen(t)) == 0;
+    return qstrncmp(s, t, qstrlen(t)) == 0;
 }
 
 // provoke segfault when address is not readable
@@ -277,7 +273,7 @@ static bool startsWith(const char *s, const char *t)
 
 const char *stripNamespace(const char *type)
 {
-    static const size_t nslen = strlen(NS);
+    static const size_t nslen = qstrlen(NS);
     return startsWith(type, NS) ? type + nslen : type;
 }
 
-- 
GitLab