From e10015e0ee28cbae0013aa203b3486ca4667aff5 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Sat, 4 Jun 2016 16:32:02 +0000 Subject: [PATCH] make sure intptr_t is defined... --- Common/Gmsh.cpp | 5 +++++ Common/OpenFile.cpp | 5 +++++ Common/gmshLocalNetworkClient.cpp | 5 +++++ Fltk/FlGui.cpp | 5 ----- Fltk/gamepadWindow.cpp | 17 ++++++++--------- Fltk/onelabGroup.cpp | 1 - Fltk/solverButton.cpp | 6 ++++++ Fltk/viewButton.cpp | 6 ++++++ 8 files changed, 35 insertions(+), 15 deletions(-) diff --git a/Common/Gmsh.cpp b/Common/Gmsh.cpp index 9620056c03..b66c668cf0 100644 --- a/Common/Gmsh.cpp +++ b/Common/Gmsh.cpp @@ -6,6 +6,11 @@ #include <string> #include <time.h> #include "GmshConfig.h" +#if !defined(HAVE_NO_STDINT_H) +#include <stdint.h> +#elif defined(HAVE_NO_INTPTR_T) +typedef unsigned long intptr_t; +#endif #include "GmshVersion.h" #include "GmshMessage.h" #include "GmshDefines.h" diff --git a/Common/OpenFile.cpp b/Common/OpenFile.cpp index c548809227..9e73180a24 100644 --- a/Common/OpenFile.cpp +++ b/Common/OpenFile.cpp @@ -6,6 +6,11 @@ #include <sstream> #include <string.h> #include "GmshConfig.h" +#if !defined(HAVE_NO_STDINT_H) +#include <stdint.h> +#elif defined(HAVE_NO_INTPTR_T) +typedef unsigned long intptr_t; +#endif #include "GmshMessage.h" #include "GmshIO.h" #include "Options.h" diff --git a/Common/gmshLocalNetworkClient.cpp b/Common/gmshLocalNetworkClient.cpp index 21a3ad0758..af96039249 100644 --- a/Common/gmshLocalNetworkClient.cpp +++ b/Common/gmshLocalNetworkClient.cpp @@ -4,6 +4,11 @@ // bugs and problems to the public mailing list <gmsh@onelab.info>. #include "GmshConfig.h" +#if !defined(HAVE_NO_STDINT_H) +#include <stdint.h> +#elif defined(HAVE_NO_INTPTR_T) +typedef unsigned long intptr_t; +#endif #include "Gmsh.h" #include "Context.h" #include "OS.h" diff --git a/Fltk/FlGui.cpp b/Fltk/FlGui.cpp index 9e8aaaadeb..f1aa75b2ed 100644 --- a/Fltk/FlGui.cpp +++ b/Fltk/FlGui.cpp @@ -4,11 +4,6 @@ // bugs and problems to the public mailing list <gmsh@onelab.info>. #include "GmshConfig.h" -#if !defined(HAVE_NO_STDINT_H) -#include <stdint.h> -#elif defined(HAVE_NO_INTPTR_T) -typedef unsigned long intptr_t; -#endif #include <sstream> #include <string.h> #include <FL/Fl.H> diff --git a/Fltk/gamepadWindow.cpp b/Fltk/gamepadWindow.cpp index 4c6544ffcb..8fae9a6b1e 100644 --- a/Fltk/gamepadWindow.cpp +++ b/Fltk/gamepadWindow.cpp @@ -4,11 +4,6 @@ // bugs and problems to the public mailing list <gmsh@onelab.info>. #include "GmshConfig.h" -#if !defined(HAVE_NO_STDINT_H) -#include <stdint.h> -#elif defined(HAVE_NO_INTPTR_T) -typedef unsigned long intptr_t; -#endif #include <string.h> #include <FL/Fl.H> #include <algorithm> @@ -25,8 +20,10 @@ static void gamepadWindow_handler(void *data) if(CTX::instance()->gamepad && CTX::instance()->gamepad->active){ gamepadWindow* gmpd_win = (gamepadWindow*)data; GamePad* pad = CTX::instance()->gamepad; - for (int i=0; i<std::min(13,GP_BUTTONS);i++) gmpd_win->gamepad.butt[i]->value(pad->button[i]); - for (int i=0; i<std::min(9,GP_AXES);i++) gmpd_win->gamepad.axe[i]->value( pad->axe[i] ); + for (int i=0; i<std::min(13,GP_BUTTONS);i++) + gmpd_win->gamepad.butt[i]->value(pad->button[i]); + for (int i=0; i<std::min(9,GP_AXES);i++) + gmpd_win->gamepad.axe[i]->value( pad->axe[i] ); Fl::add_timeout(gmpd_win->frequency, gamepadWindow_handler, data); gmpd_win->gamepad.mapping[16]->value(pad->axe_map[1]); } @@ -36,8 +33,10 @@ static void gamepad_update_cb(Fl_Widget *w) { gamepadWindow* gmpd_win = FlGui::instance()->options->gmpdoption; GamePad* pad = CTX::instance()->gamepad; - for (int i=0; i<std::min(8,GP_BUTTONS) ;i++) pad->button_map[i] = gmpd_win->gamepad.mapping[i]->value(); - for (int i=0; i<std::min(7,GP_AXES);i++) pad->axe_map[i] = gmpd_win->gamepad.mapping[10+i]->value(); + for (int i=0; i<std::min(8,GP_BUTTONS) ;i++) + pad->button_map[i] = gmpd_win->gamepad.mapping[i]->value(); + for (int i=0; i<std::min(7,GP_AXES);i++) + pad->axe_map[i] = gmpd_win->gamepad.mapping[10+i]->value(); } gamepadWindow::gamepadWindow() diff --git a/Fltk/onelabGroup.cpp b/Fltk/onelabGroup.cpp index 2fa71c1acb..fcdbd5eebd 100644 --- a/Fltk/onelabGroup.cpp +++ b/Fltk/onelabGroup.cpp @@ -10,7 +10,6 @@ #elif defined(HAVE_NO_INTPTR_T) typedef unsigned long intptr_t; #endif - #include <ctype.h> #include "GmshMessage.h" #include "onelab.h" diff --git a/Fltk/solverButton.cpp b/Fltk/solverButton.cpp index bf2f7474b2..718d59d3f4 100644 --- a/Fltk/solverButton.cpp +++ b/Fltk/solverButton.cpp @@ -3,6 +3,12 @@ // See the LICENSE.txt file for license information. Please report all // bugs and problems to the public mailing list <gmsh@onelab.info>. +#include "GmshConfig.h" +#if !defined(HAVE_NO_STDINT_H) +#include <stdint.h> +#elif defined(HAVE_NO_INTPTR_T) +typedef unsigned long intptr_t; +#endif #include "GmshMessage.h" #include "FlGui.h" #include "Options.h" diff --git a/Fltk/viewButton.cpp b/Fltk/viewButton.cpp index 2ce2235695..b4aeaaed1e 100644 --- a/Fltk/viewButton.cpp +++ b/Fltk/viewButton.cpp @@ -3,6 +3,12 @@ // See the LICENSE.txt file for license information. Please report all // bugs and problems to the public mailing list <gmsh@onelab.info>. +#include "GmshConfig.h" +#if !defined(HAVE_NO_STDINT_H) +#include <stdint.h> +#elif defined(HAVE_NO_INTPTR_T) +typedef unsigned long intptr_t; +#endif #include <FL/fl_ask.H> #include "FlGui.h" #include "drawContext.h" -- GitLab