From d2c3b2655be6a799c2927389229423533721674b Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Mon, 19 Dec 2011 13:19:57 +0000
Subject: [PATCH] one more try

---
 CMakeLists.txt            | 10 ++++++++--
 Common/GmshConfig.h.in    |  3 ++-
 Common/ListUtils.cpp      |  3 +++
 Common/avl.cpp            |  3 +++
 Fltk/FlGui.cpp            |  3 +++
 Fltk/menuWindow.cpp       |  3 +++
 Fltk/optionWindow.cpp     |  3 +++
 Fltk/pluginWindow.cpp     |  3 +++
 Fltk/visibilityWindow.cpp |  3 +++
 9 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0864cd3b04..0aa565aff8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -813,14 +813,20 @@ check_include_file(sys/socket.h HAVE_SYS_SOCKET_H)
 if(HAVE_SYS_SOCKET_H)
   set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
 endif(HAVE_SYS_SOCKET_H)
-
 check_type_size(socklen_t SOCKLEN_T_SIZE)
+set(CMAKE_EXTRA_INCLUDE_FILES)
 if(NOT SOCKLEN_T_SIZE)
   set_config_option(HAVE_NO_SOCKLEN_T "NoSocklenT")
 endif(NOT SOCKLEN_T_SIZE)
-set(CMAKE_EXTRA_INCLUDE_FILES)
 
+check_include_file(stdint.h HAVE_STDINT_H)
+if(HAVE_STDINT_H)
+  set(CMAKE_EXTRA_INCLUDE_FILES stdint.h)
+else(HAVE_STDINT_H)
+  set_config_option(HAVE_NO_STDINT_H "NoStdintH")
+endif(HAVE_STDINT_H)
 check_type_size(intptr_t INTPTR_T_SIZE)
+set(CMAKE_EXTRA_INCLUDE_FILES)
 if(NOT INTPTR_T_SIZE)
   set_config_option(HAVE_NO_INTPTR_T "NoIntptrT")
 endif(NOT INTPTR_T_SIZE)
diff --git a/Common/GmshConfig.h.in b/Common/GmshConfig.h.in
index b5bd6e3dce..cbf5dcd9bb 100644
--- a/Common/GmshConfig.h.in
+++ b/Common/GmshConfig.h.in
@@ -38,6 +38,7 @@
 #cmakedefine HAVE_NETGEN
 #cmakedefine HAVE_NO_INTPTR_T
 #cmakedefine HAVE_NO_SOCKLEN_T
+#cmakedefine HAVE_NO_STDINT_H
 #cmakedefine HAVE_NO_VSNPRINTF
 #cmakedefine HAVE_OCC
 #cmakedefine HAVE_OPENGL
@@ -47,8 +48,8 @@
 #cmakedefine HAVE_PLUGINS
 #cmakedefine HAVE_POST
 #cmakedefine HAVE_QT
-#cmakedefine HAVE_SLEPC
 #cmakedefine HAVE_SALOME
+#cmakedefine HAVE_SLEPC
 #cmakedefine HAVE_SOLVER
 #cmakedefine HAVE_TAUCS
 #cmakedefine HAVE_TETGEN
diff --git a/Common/ListUtils.cpp b/Common/ListUtils.cpp
index 3d9ffbc04b..de517a4f7a 100644
--- a/Common/ListUtils.cpp
+++ b/Common/ListUtils.cpp
@@ -8,6 +8,9 @@
 //
 
 #include "GmshConfig.h"
+#if !defined(HAVE_NO_STDINT_H)
+#include <stdint.h>
+#endif
 #if defined(HAVE_NO_INTPTR_T)
 typedef unsigned long intptr_t;
 #endif
diff --git a/Common/avl.cpp b/Common/avl.cpp
index 11381b9d47..7054665ce9 100644
--- a/Common/avl.cpp
+++ b/Common/avl.cpp
@@ -26,6 +26,9 @@
 // Modified for Gmsh (C++ and 64 bit compatibility)
 
 #include "GmshConfig.h"
+#if !defined(HAVE_NO_STDINT_H)
+#include <stdint.h>
+#endif
 #if defined(HAVE_NO_INTPTR_T)
 typedef unsigned long intptr_t;
 #endif
diff --git a/Fltk/FlGui.cpp b/Fltk/FlGui.cpp
index e7493e1970..bf0f9b7c0e 100644
--- a/Fltk/FlGui.cpp
+++ b/Fltk/FlGui.cpp
@@ -4,6 +4,9 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include "GmshConfig.h"
+#if !defined(HAVE_NO_STDINT_H)
+#include <stdint.h>
+#endif
 #if defined(HAVE_NO_INTPTR_T)
 typedef unsigned long intptr_t;
 #endif
diff --git a/Fltk/menuWindow.cpp b/Fltk/menuWindow.cpp
index 75cdbc46df..2c3fc1f11a 100644
--- a/Fltk/menuWindow.cpp
+++ b/Fltk/menuWindow.cpp
@@ -4,6 +4,9 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include "GmshConfig.h"
+#if !defined(HAVE_NO_STDINT_H)
+#include <stdint.h>
+#endif
 #if defined(HAVE_NO_INTPTR_T)
 typedef unsigned long intptr_t;
 #endif
diff --git a/Fltk/optionWindow.cpp b/Fltk/optionWindow.cpp
index b8782983af..873a67e704 100644
--- a/Fltk/optionWindow.cpp
+++ b/Fltk/optionWindow.cpp
@@ -4,6 +4,9 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include "GmshConfig.h"
+#if !defined(HAVE_NO_STDINT_H)
+#include <stdint.h>
+#endif
 #if defined(HAVE_NO_INTPTR_T)
 typedef unsigned long intptr_t;
 #endif
diff --git a/Fltk/pluginWindow.cpp b/Fltk/pluginWindow.cpp
index 5b79ec4362..94e4cdffa9 100644
--- a/Fltk/pluginWindow.cpp
+++ b/Fltk/pluginWindow.cpp
@@ -4,6 +4,9 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include "GmshConfig.h"
+#if !defined(HAVE_NO_STDINT_H)
+#include <stdint.h>
+#endif
 #if defined(HAVE_NO_INTPTR_T)
 typedef unsigned long intptr_t;
 #endif
diff --git a/Fltk/visibilityWindow.cpp b/Fltk/visibilityWindow.cpp
index e3b1f74cb7..163d62bb7b 100644
--- a/Fltk/visibilityWindow.cpp
+++ b/Fltk/visibilityWindow.cpp
@@ -4,6 +4,9 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include "GmshConfig.h"
+#if !defined(HAVE_NO_STDINT_H)
+#include <stdint.h>
+#endif
 #if defined(HAVE_NO_INTPTR_T)
 typedef unsigned long intptr_t;
 #endif
-- 
GitLab