diff --git a/CMakeLists.txt b/CMakeLists.txt index 84fa9db..6dc9962 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,8 +71,6 @@ endif() # dependencies -CHECK_INCLUDE_FILE("stdint.h" HAVE_STDINT_H) - find_package(OpenGL REQUIRED) message(STATUS "Using in-tree libdxfrw") diff --git a/src/config.h.in b/src/config.h.in index 5253d4c..aca7757 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -3,9 +3,6 @@ #define PACKAGE_VERSION "@solvespace_VERSION_MAJOR@.@solvespace_VERSION_MINOR@~@solvespace_GIT_HASH@" -/* MSVC includes a proper stdint.h, but only since VS2008. */ -#cmakedefine HAVE_STDINT_H - /* Do we have the si library on win32, or libspnav on *nix? */ #cmakedefine HAVE_SPACEWARE diff --git a/src/graphicswin.cpp b/src/graphicswin.cpp index c9f2be8..83eeb3b 100644 --- a/src/graphicswin.cpp +++ b/src/graphicswin.cpp @@ -5,6 +5,7 @@ // Copyright 2008-2013 Jonathan Westhues. //----------------------------------------------------------------------------- #include "solvespace.h" +#include "config.h" #define mView (&GraphicsWindow::MenuView) #define mEdit (&GraphicsWindow::MenuEdit) diff --git a/src/gtk/gtkmain.cpp b/src/gtk/gtkmain.cpp index e26a541..3d208ce 100644 --- a/src/gtk/gtkmain.cpp +++ b/src/gtk/gtkmain.cpp @@ -48,12 +48,10 @@ #include <gdk/gdkx.h> #include <fontconfig/fontconfig.h> -#undef HAVE_STDINT_H /* no thanks, we have our own config.h */ - #include <GL/glx.h> -#include <config.h> #include "solvespace.h" +#include "config.h" #include "../unix/gloffscreen.h" #ifdef HAVE_SPACEWARE diff --git a/src/solvespace.cpp b/src/solvespace.cpp index 4bb634a..60ec68f 100644 --- a/src/solvespace.cpp +++ b/src/solvespace.cpp @@ -5,6 +5,7 @@ // Copyright 2008-2013 Jonathan Westhues. //----------------------------------------------------------------------------- #include "solvespace.h" +#include "config.h" SolveSpaceUI SolveSpace::SS = {}; Sketch SolveSpace::SK = {}; diff --git a/src/solvespace.h b/src/solvespace.h index 6196436..6a12c1f 100644 --- a/src/solvespace.h +++ b/src/solvespace.h @@ -7,7 +7,7 @@ #ifndef __SOLVESPACE_H #define __SOLVESPACE_H -#include <config.h> +#include <stdint.h> #include <stdlib.h> #include <ctype.h> #include <string.h> @@ -23,9 +23,6 @@ #include <unordered_map> #include <map> #include <set> -#ifdef HAVE_STDINT_H -# include <stdint.h> -#endif #ifdef WIN32 # include <windows.h> // required by GL headers #endif @@ -112,18 +109,6 @@ inline double ffabs(double v) { return (v > 0) ? v : (-v); } #define isforname(c) (isalnum(c) || (c) == '_' || (c) == '-' || (c) == '#') -#if defined(WIN32) && !defined(HAVE_STDINT_H) -// Define some useful C99 integer types. -typedef UINT64 uint64_t; -typedef INT64 int64_t; -typedef UINT32 uint32_t; -typedef INT32 int32_t; -typedef USHORT uint16_t; -typedef SHORT int16_t; -typedef UCHAR uint8_t; -typedef CHAR int8_t; -#endif - #if defined(WIN32) std::string Narrow(const wchar_t *s); std::wstring Widen(const char *s); diff --git a/src/ttf.cpp b/src/ttf.cpp index 4f7bb75..2de0cad 100644 --- a/src/ttf.cpp +++ b/src/ttf.cpp @@ -39,8 +39,6 @@ extern "C" const char *ft_error_string(int err) { #undef FT_ERROR_START_LIST #undef FT_ERROR_END_LIST -#undef HAVE_STDINT_H /* no thanks, we have our own config.h */ - #include "solvespace.h" //----------------------------------------------------------------------------- diff --git a/src/unix/unixutil.cpp b/src/unix/unixutil.cpp index 4c46ec5..7c1d921 100644 --- a/src/unix/unixutil.cpp +++ b/src/unix/unixutil.cpp @@ -7,11 +7,6 @@ // Copyright 2008-2013 Jonathan Westhues. // Copyright 2013 Daniel Richard G. <skunk@iSKUNK.ORG> //----------------------------------------------------------------------------- -#include <config.h> - -#include <stdarg.h> -#include <string.h> -#include <stdio.h> #include <time.h> #include "solvespace.h" diff --git a/src/win32/w32main.cpp b/src/win32/w32main.cpp index dc50253..8f9d551 100644 --- a/src/win32/w32main.cpp +++ b/src/win32/w32main.cpp @@ -11,9 +11,8 @@ #include <commctrl.h> #include <commdlg.h> -#include <string> - #include "solvespace.h" +#include "config.h" #ifdef HAVE_SPACEWARE # include <si.h>