From 329fca30fdbbc051a733c6d15efa6b95370ac221 Mon Sep 17 00:00:00 2001
From: markt <markt>
Date: Fri, 29 Jun 2007 17:25:24 +0000
Subject: updates for compiling with gcc 4.3

---
 ChangeLog                 |  2 ++
 src/Ewmh.cc               |  5 +++++
 src/FbCommands.cc         |  5 +++++
 src/FbTk/FbPixmap.cc      |  5 +++++
 src/FbTk/FbString.cc      | 10 ++++++++++
 src/FbTk/KeyUtil.cc       |  5 +++++
 src/FbTk/Menu.cc          |  3 +++
 src/FbTk/StringUtil.cc    |  5 +++++
 src/FbTk/TextBox.cc       | 10 ++++++++++
 src/FbTk/TextureRender.cc |  5 +++++
 src/FbTk/ThemeItems.cc    | 10 ++++++++++
 src/FbTk/XFontImp.cc      |  8 ++++++++
 src/FocusControl.cc       |  5 +++++
 src/Gnome.cc              |  5 +++++
 src/IconbarTool.cc        |  5 +++++
 src/Remember.cc           |  5 +++++
 src/Resources.cc          |  5 +++++
 src/RootTheme.cc          |  5 +++++
 src/Screen.cc             |  5 +++++
 src/ScreenPlacement.cc    |  5 +++++
 src/ScreenResources.cc    |  5 +++++
 src/Slit.cc               |  5 +++++
 src/WinClient.cc          |  5 +++++
 src/Xutil.cc              |  5 +++++
 util/fbrun/main.cc        | 10 ++++++++++
 25 files changed, 143 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 9e031ab..3c1bcc4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
  (Format: Year/Month/Day)
 Changes for 1.0.0:
+*07/06/29:
+   * Updates for compiling with gcc 4.3 (thanks Dmitry E. Oboukhov)
 *07/06/28:
    * Strip off additional bits in event state set by Xorg, bug #1736252 (Mark)
      FbTk/KeyUtil.hh
diff --git a/src/Ewmh.cc b/src/Ewmh.cc
index fc4e3e1..945c7b6 100644
--- a/src/Ewmh.cc
+++ b/src/Ewmh.cc
@@ -42,6 +42,11 @@
 #include <iostream>
 #include <algorithm>
 #include <new>
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
 
 using std::cerr;
 using std::endl;
diff --git a/src/FbCommands.cc b/src/FbCommands.cc
index 9becb8e..04f266e 100644
--- a/src/FbCommands.cc
+++ b/src/FbCommands.cc
@@ -45,6 +45,11 @@
 #else
   #include <stdlib.h>
 #endif
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
 
 
 #ifdef HAVE_CONFIG_H
diff --git a/src/FbTk/FbPixmap.cc b/src/FbTk/FbPixmap.cc
index 14d05e7..43ba1a1 100644
--- a/src/FbTk/FbPixmap.cc
+++ b/src/FbTk/FbPixmap.cc
@@ -30,6 +30,11 @@
 #include <X11/Xutil.h>
 #include <X11/Xatom.h>
 #include <iostream>
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
 
 using std::cerr;
 
diff --git a/src/FbTk/FbString.cc b/src/FbTk/FbString.cc
index 6614ec4..7ee1b5f 100644
--- a/src/FbTk/FbString.cc
+++ b/src/FbTk/FbString.cc
@@ -27,6 +27,16 @@
 #else
   #include <errno.h>
 #endif
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
+#ifdef HAVE_CSTDLIB
+  #include <cstdlib>
+#else
+  #include <stdlib.h>
+#endif
 
 #include "FbString.hh"
 #include "config.h"
diff --git a/src/FbTk/KeyUtil.cc b/src/FbTk/KeyUtil.cc
index abf91fe..1830dca 100644
--- a/src/FbTk/KeyUtil.cc
+++ b/src/FbTk/KeyUtil.cc
@@ -25,6 +25,11 @@
 #include "App.hh"
 
 #include <string>
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
 
 namespace {
 
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index 7b259eb..cf735d6 100644
--- a/src/FbTk/Menu.cc
+++ b/src/FbTk/Menu.cc
@@ -67,6 +67,9 @@
 #endif
 #include <typeinfo>
 
+#include <algorithm>
+
+
 #ifdef DEBUG
 #include <iostream>
 using std::cout;
diff --git a/src/FbTk/StringUtil.cc b/src/FbTk/StringUtil.cc
index 11bd87d..869a3b5 100644
--- a/src/FbTk/StringUtil.cc
+++ b/src/FbTk/StringUtil.cc
@@ -44,6 +44,11 @@
 #else
   #include <assert.h>
 #endif
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
 
 
 #include <memory>
diff --git a/src/FbTk/TextBox.cc b/src/FbTk/TextBox.cc
index 19c44dc..fa1600e 100644
--- a/src/FbTk/TextBox.cc
+++ b/src/FbTk/TextBox.cc
@@ -32,6 +32,16 @@
 #else
   #include <ctype.h>
 #endif
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
+#ifdef HAVE_CSTDLIB
+  #include <cstdlib>
+#else
+  #include <stdlib.h>
+#endif
 #include <X11/keysym.h>
 #include <X11/Xutil.h>
 
diff --git a/src/FbTk/TextureRender.cc b/src/FbTk/TextureRender.cc
index e5271dc..5d9c7d5 100644
--- a/src/FbTk/TextureRender.cc
+++ b/src/FbTk/TextureRender.cc
@@ -39,6 +39,11 @@
 #else
   #include <stdio.h>
 #endif
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
 
 // mipspro has no new(nothrow)
 #if defined sgi && ! defined GCC
diff --git a/src/FbTk/ThemeItems.cc b/src/FbTk/ThemeItems.cc
index 6d2b244..db314a3 100644
--- a/src/FbTk/ThemeItems.cc
+++ b/src/FbTk/ThemeItems.cc
@@ -45,6 +45,16 @@
 #else
   #include <stdio.h>
 #endif
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
+#ifdef HAVE_CSTDLIB
+  #include <cstdlib>
+#else
+  #include <stdlib.h>
+#endif
 
 #include <iostream>
 #include <memory>
diff --git a/src/FbTk/XFontImp.cc b/src/FbTk/XFontImp.cc
index 0c404a1..1c97b35 100644
--- a/src/FbTk/XFontImp.cc
+++ b/src/FbTk/XFontImp.cc
@@ -36,6 +36,14 @@
 #else
   #include <stdio.h>
 #endif
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
+
+#include <algorithm>
+
 
 using std::cerr;
 using std::endl;
diff --git a/src/FocusControl.cc b/src/FocusControl.cc
index e16cbec..4de491a 100644
--- a/src/FocusControl.cc
+++ b/src/FocusControl.cc
@@ -34,6 +34,11 @@
 
 #include <string>
 #include <iostream>
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
 
 using std::cerr;
 using std::endl;
diff --git a/src/Gnome.cc b/src/Gnome.cc
index 92b7b51..c401f1b 100644
--- a/src/Gnome.cc
+++ b/src/Gnome.cc
@@ -33,6 +33,11 @@
 
 #include <iostream>
 #include <new>
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
 
 using std::cerr;
 using std::endl;
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc
index da9fb59..3509a0c 100644
--- a/src/IconbarTool.cc
+++ b/src/IconbarTool.cc
@@ -49,6 +49,11 @@
 #include <typeinfo>
 #include <string>
 #include <iterator>
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
 
 using std::string;
 using std::list;
diff --git a/src/Remember.cc b/src/Remember.cc
index cb1114c..12b5097 100644
--- a/src/Remember.cc
+++ b/src/Remember.cc
@@ -44,6 +44,11 @@
 
 
 #include <X11/Xlib.h>
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
 
 //use GNU extensions
 #ifndef	 _GNU_SOURCE
diff --git a/src/Resources.cc b/src/Resources.cc
index 9603523..fde08d7 100644
--- a/src/Resources.cc
+++ b/src/Resources.cc
@@ -35,6 +35,11 @@
 #include <stdio.h>
 #include <string>
 #include <vector>
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
 
 using std::string;
 using std::vector;
diff --git a/src/RootTheme.cc b/src/RootTheme.cc
index 4e5c9fe..5189fbb 100644
--- a/src/RootTheme.cc
+++ b/src/RootTheme.cc
@@ -41,6 +41,11 @@
 
 #include <sys/types.h>
 #include <sys/wait.h>
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
 
 using std::cerr;
 using std::endl;
diff --git a/src/Screen.cc b/src/Screen.cc
index 3db8ddc..99e88d6 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -135,6 +135,11 @@ extern  "C" {
 #include <algorithm>
 #include <functional>
 #include <stack>
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
 
 using std::cerr;
 using std::endl;
diff --git a/src/ScreenPlacement.cc b/src/ScreenPlacement.cc
index 4b52aa4..d9f8df2 100644
--- a/src/ScreenPlacement.cc
+++ b/src/ScreenPlacement.cc
@@ -34,6 +34,11 @@
 
 #include <iostream>
 #include <exception>
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
 using std::cerr;
 using std::endl;
 
diff --git a/src/ScreenResources.cc b/src/ScreenResources.cc
index 8b71505..e4d712a 100644
--- a/src/ScreenResources.cc
+++ b/src/ScreenResources.cc
@@ -27,6 +27,11 @@
 
 #include "Screen.hh"
 #include <string>
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
 
 using std::string;
 
diff --git a/src/Slit.cc b/src/Slit.cc
index f5f1158..118179b 100644
--- a/src/Slit.cc
+++ b/src/Slit.cc
@@ -75,6 +75,11 @@
 
 #include <iostream>
 #include <algorithm>
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
 
 using std::string;
 using std::pair;
diff --git a/src/WinClient.cc b/src/WinClient.cc
index bb6bf10..250a0b8 100644
--- a/src/WinClient.cc
+++ b/src/WinClient.cc
@@ -43,6 +43,11 @@
 #else
   #include <assert.h>
 #endif
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
 
 using std::string;
 using std::list;
diff --git a/src/Xutil.cc b/src/Xutil.cc
index c138142..c2fb71f 100644
--- a/src/Xutil.cc
+++ b/src/Xutil.cc
@@ -32,6 +32,11 @@
 #include <X11/Xatom.h>
 #include <X11/Xlib.h>
 #include <iostream>
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
 
 using std::string;
 
diff --git a/util/fbrun/main.cc b/util/fbrun/main.cc
index e5d3e2f..86003ab 100644
--- a/util/fbrun/main.cc
+++ b/util/fbrun/main.cc
@@ -34,6 +34,16 @@ extern  "C" {
 
 #include <string>
 #include <iostream>
+#ifdef HAVE_CSTRING
+  #include <cstring>
+#else
+  #include <string.h>
+#endif
+#ifdef HAVE_CSTDLIB
+  #include <cstdlib>
+#else
+  #include <stdlib.h>
+#endif
 
 using std::cerr;
 using std::endl;
-- 
cgit v0.11.2