[Kst] branches/work/kst/portto4/kst/misc/getdata-windows
Peter Kümmel
syntheticpp at gmx.net
Sat Sep 25 12:40:02 CEST 2010
SVN commit 1179412 by kuemmel:
update getdata cmake build system
M +9 -7 cmake/CMakeLists.txt
M +11 -485 mingw.patch
--- branches/work/kst/portto4/kst/misc/getdata-windows/cmake/CMakeLists.txt #1179411:1179412
@@ -41,23 +41,25 @@
endif()
if(MINGW)
- # ALPHA quality!
+ #TODO add configure step with cmake!
add_definitions(
-D__MSVCRT__
- -DSTDC_HEADER
- -DSTDC_HEADER
+ -D__MSVCRT_VERSION__=0x0601
+ -DPACKAGE_BUGREPORT=""
+ -DPACKAGE_NAME=""
+ -DPACKAGE_VERSION=""
+ -DSTDC_HEADERS
-DHAVE_IO_H
-DHAVE_STDINT_H
-DHAVE_COMPLEX_H
-DHAVE_OFF64_T
- -DSTDC_HEADERS
-DHAVE_LIBGEN_H
-DHAVE_STRTOLL
- -DPACKAGE_BUGREPORT=""
- -DPACKAGE_NAME=""
- -DPACKAGE_VERSION=""
-DHAVE_DIRENT_H
-DHAVE__COMMIT
+ -DHAVE__STAT64
+ -DHAVE_STRUCT___STAT64
+ -DMKDIR_NO_MODE
)
endif()
--- branches/work/kst/portto4/kst/misc/getdata-windows/mingw.patch #1179411:1179412
@@ -1,494 +1,20 @@
-Index: src/open.c
-===================================================================
---- src/open.c (Revision 441)
-+++ src/open.c (Arbeitskopie)
-@@ -39,6 +39,10 @@
- #include <libgen.h>
- #endif
-
-+#ifdef __MINGW32__
-+#define mkdir(x,y) mkdir(x)
-+#endif
-+
- /* attempt to open or create a new dirfile - set error appropriately */
- static FILE* _GD_CreateDirfile(DIRFILE* D, const char* format_file,
- const char* filedir)
-Index: src/internal.h
-===================================================================
---- src/internal.h (Revision 441)
-+++ src/internal.h (Arbeitskopie)
-@@ -186,7 +186,7 @@
- #define rmdir _rmdir
- #endif
-
--#if defined __CYGWIN__ || defined __APPLE__
-+#if defined __CYGWIN__ || defined __APPLE__ || __MINGW32__
- # define gd_stat64 stat
- #elif HAVE_STAT64
- # define gd_stat64 stat64
-@@ -198,7 +198,7 @@
- typedef struct stat64 gd_stat64_t;
- #elif HAVE_STRUCT___STAT64
- typedef struct __stat64 gd_stat64_t;
--#elif defined __CYGWIN__ || defined __APPLE__
-+#elif defined __CYGWIN__ || defined __APPLE__ || __MINGW32__
- typedef struct stat gd_stat64_t;
- #endif
-
Index: src/getdata.h.in
===================================================================
---- src/getdata.h.in (Revision 441)
+--- src/getdata.h.in (Revision 448)
+++ src/getdata.h.in (Arbeitskopie)
-@@ -202,6 +202,10 @@
- #else
- # define GD_DCOMPLEXM(v) double v[2]
- # define GD_DCOMPLEXP(v) double *v
-+// TODO where defined?
+@@ -207,6 +207,15 @@
+ #undef _gd_int16_t
+ #undef _gd_uint16_t
+ #undef _gd_int64_t
++
++#if defined(__MINGW32__) || defined(_MSC_VER)
++// TODO move to config.h file
+typedef short _gd_int16_t;
+typedef unsigned short _gd_uint16_t;
+typedef __int64 _gd_int64_t;
- typedef _gd_int16_t gd_bit_t;
- typedef _gd_uint16_t gd_spf_t;
- typedef _gd_int64_t gd_shift_t;
-Index: bindings/cxx/getdata/indexentry.h
-===================================================================
---- bindings/cxx/getdata/indexentry.h (Revision 441)
-+++ bindings/cxx/getdata/indexentry.h (Arbeitskopie)
-@@ -22,18 +22,8 @@
- #ifndef GETDATA_INDEXENTRY_H
- #define GETDATA_INDEXENTRY_H
-
--#ifndef _FILE_OFFSET_BITS
--# define _FILE_OFFSET_BITS 64
--#endif
-+#include <getdata/getdata++.h>
-
--#define NO_GETDATA_LEGACY_API
--#define GETDATA_C89_API
--
--extern "C" {
--#include <getdata.h>
--}
--#include <getdata/entry.h>
--
- namespace GetData {
-
- class Dirfile;
-Index: bindings/cxx/getdata/getdata++.h
-===================================================================
---- bindings/cxx/getdata/getdata++.h (Revision 0)
-+++ bindings/cxx/getdata/getdata++.h (Revision 0)
-@@ -0,0 +1,45 @@
-+// (C) 2008, 2010 D. V. Wiebe
-+//
-+///////////////////////////////////////////////////////////////////////////
-+//
-+// This file is part of the GetData project.
-+//
-+// GetData is free software; you can redistribute it and/or modify it under
-+// the terms of the GNU Lesser General Public License as published by the
-+// Free Software Foundation; either version 2.1 of the License, or (at your
-+// option) any later version.
-+//
-+// GetData is distributed in the hope that it will be useful, but WITHOUT
-+// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
-+// License for more details.
-+//
-+// You should have received a copy of the GNU Lesser General Public License
-+// along with GetData; if not, write to the Free Software Foundation, Inc.,
-+// 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-+//
-+
-+#ifndef GETDATA_GETDATA_PP_H
-+#define GETDATA_GETDATA_PP_H
-+
-+#ifndef _FILE_OFFSET_BITS
-+# define _FILE_OFFSET_BITS 64
+#endif
+
-+// We don't want the legacy API since its symbols clash with us.
-+#ifndef NO_GETDATA_LEGACY_API
-+#define NO_GETDATA_LEGACY_API
-+#endif
+
-+// We use the C89 API since C++ compilers aren't required to support the
-+// C99 _Complex keyword
-+#ifndef GETDATA_C89_API
-+#define GETDATA_C89_API
-+#endif
-+
-+extern "C" {
-+#include <getdata.h>
-+}
-+#include <getdata/entry.h>
-+
-+#endif
-Index: bindings/cxx/getdata/linterpentry.h
-===================================================================
---- bindings/cxx/getdata/linterpentry.h (Revision 441)
-+++ bindings/cxx/getdata/linterpentry.h (Arbeitskopie)
-@@ -22,18 +22,8 @@
- #ifndef GETDATA_LINTERPENTRY_H
- #define GETDATA_LINTERPENTRY_H
-
--#ifndef _FILE_OFFSET_BITS
--# define _FILE_OFFSET_BITS 64
--#endif
-+#include <getdata/getdata++.h>
-
--#define NO_GETDATA_LEGACY_API
--#define GETDATA_C89_API
--
--extern "C" {
--#include <getdata.h>
--}
--#include <getdata/entry.h>
--
- namespace GetData {
-
- class Dirfile;
-Index: bindings/cxx/getdata/bitentry.h
-===================================================================
---- bindings/cxx/getdata/bitentry.h (Revision 441)
-+++ bindings/cxx/getdata/bitentry.h (Arbeitskopie)
-@@ -22,18 +22,8 @@
- #ifndef GETDATA_BITENTRY_H
- #define GETDATA_BITENTRY_H
-
--#ifndef _FILE_OFFSET_BITS
--# define _FILE_OFFSET_BITS 64
--#endif
-+#include <getdata/getdata++.h>
-
--#define NO_GETDATA_LEGACY_API
--#define GETDATA_C89_API
--
--extern "C" {
--#include <getdata.h>
--}
--#include <getdata/entry.h>
--
- namespace GetData {
-
- class Dirfile;
-Index: bindings/cxx/getdata/multiplyentry.h
-===================================================================
---- bindings/cxx/getdata/multiplyentry.h (Revision 441)
-+++ bindings/cxx/getdata/multiplyentry.h (Arbeitskopie)
-@@ -22,18 +22,8 @@
- #ifndef GETDATA_MULTIPLYENTRY_H
- #define GETDATA_MULTIPLYENTRY_H
-
--#ifndef _FILE_OFFSET_BITS
--# define _FILE_OFFSET_BITS 64
--#endif
-+#include <getdata/getdata++.h>
-
--#define NO_GETDATA_LEGACY_API
--#define GETDATA_C89_API
--
--extern "C" {
--#include <getdata.h>
--}
--#include <getdata/entry.h>
--
- namespace GetData {
-
- class Dirfile;
-Index: bindings/cxx/getdata/entry.h
-===================================================================
---- bindings/cxx/getdata/entry.h (Revision 441)
-+++ bindings/cxx/getdata/entry.h (Arbeitskopie)
-@@ -22,17 +22,8 @@
- #ifndef GETDATA_ENTRY_H
- #define GETDATA_ENTRY_H
-
--#ifndef _FILE_OFFSET_BITS
--# define _FILE_OFFSET_BITS 64
--#endif
-+#include <getdata/getdata++.h>
-
--#define NO_GETDATA_LEGACY_API
--#define GETDATA_C89_API
--
--extern "C" {
--#include <getdata.h>
--}
--
- #include <complex>
-
- #define __gd_unused __attribute__ (( unused ))
-Index: bindings/cxx/getdata/lincomentry.h
-===================================================================
---- bindings/cxx/getdata/lincomentry.h (Revision 441)
-+++ bindings/cxx/getdata/lincomentry.h (Arbeitskopie)
-@@ -22,18 +22,8 @@
- #ifndef GETDATA_LINCOMENTRY_H
- #define GETDATA_LINCOMENTRY_H
-
--#ifndef _FILE_OFFSET_BITS
--# define _FILE_OFFSET_BITS 64
--#endif
-+#include <getdata/getdata++.h>
-
--#define NO_GETDATA_LEGACY_API
--#define GETDATA_C89_API
--
--extern "C" {
--#include <getdata.h>
--}
--#include <getdata/entry.h>
--
- namespace GetData {
-
- class Dirfile;
-Index: bindings/cxx/getdata/fragment.h
-===================================================================
---- bindings/cxx/getdata/fragment.h (Revision 441)
-+++ bindings/cxx/getdata/fragment.h (Arbeitskopie)
-@@ -22,16 +22,8 @@
- #ifndef GETDATA_FRAGMENT_H
- #define GETDATA_FRAGMENT_H
-
--#ifndef _FILE_OFFSET_BITS
--# define _FILE_OFFSET_BITS 64
--#endif
-+#include <getdata/getdata++.h>
-
--#define NO_GETDATA_LEGACY_API
--#define GETDATA_C89_API
--
--extern "C" {
--#include <getdata.h>
--}
- #include <sys/types.h>
- #include <unistd.h>
-
-Index: bindings/cxx/getdata/constentry.h
-===================================================================
---- bindings/cxx/getdata/constentry.h (Revision 441)
-+++ bindings/cxx/getdata/constentry.h (Arbeitskopie)
-@@ -22,18 +22,9 @@
- #ifndef GETDATA_CONSTENTRY_H
- #define GETDATA_CONSTENTRY_H
-
--#ifndef _FILE_OFFSET_BITS
--# define _FILE_OFFSET_BITS 64
--#endif
-+#include <getdata/getdata++.h>
-
--#define NO_GETDATA_LEGACY_API
--#define GETDATA_C89_API
-
--extern "C" {
--#include <getdata.h>
--}
--#include <getdata/entry.h>
--
- namespace GetData {
-
- class Dirfile;
-Index: bindings/cxx/getdata/rawentry.h
-===================================================================
---- bindings/cxx/getdata/rawentry.h (Revision 441)
-+++ bindings/cxx/getdata/rawentry.h (Arbeitskopie)
-@@ -22,18 +22,8 @@
- #ifndef GETDATA_RAWENTRY_H
- #define GETDATA_RAWENTRY_H
-
--#ifndef _FILE_OFFSET_BITS
--# define _FILE_OFFSET_BITS 64
--#endif
-+#include <getdata/getdata++.h>
-
--#define NO_GETDATA_LEGACY_API
--#define GETDATA_C89_API
--
--extern "C" {
--#include <getdata.h>
--}
--#include <getdata/entry.h>
--
- namespace GetData {
-
- class Dirfile;
-Index: bindings/cxx/getdata/dirfile.h
-===================================================================
---- bindings/cxx/getdata/dirfile.h (Revision 441)
-+++ bindings/cxx/getdata/dirfile.h (Arbeitskopie)
-@@ -22,17 +22,8 @@
- #ifndef GETDATA_DIRFILE_H
- #define GETDATA_DIRFILE_H
-
--// We don't want the legacy API since its symbols clash with us.
--#define NO_GETDATA_LEGACY_API
-+#include <getdata/getdata++.h>
-
--// We use the C89 API since C++ compilers aren't required to support the
--// C99 _Complex keyword
--#define GETDATA_C89_API
--
--extern "C" {
--#include <getdata.h>
--}
--
- #include <getdata/fragment.h>
- #include <getdata/entry.h>
- #include <getdata/rawentry.h>
-@@ -49,6 +40,11 @@
- #include <getdata/divideentry.h>
- #include <getdata/recipentry.h>
-
-+#ifdef EOF
-+#undef EOF
-+#endif
-+
-+
- namespace GetData {
-
- class Entry;
-Index: bindings/cxx/getdata/polynomentry.h
-===================================================================
---- bindings/cxx/getdata/polynomentry.h (Revision 441)
-+++ bindings/cxx/getdata/polynomentry.h (Arbeitskopie)
-@@ -22,18 +22,8 @@
- #ifndef GETDATA_POLYNOMENTRY_H
- #define GETDATA_POLYNOMENTRY_H
-
--#ifndef _FILE_OFFSET_BITS
--# define _FILE_OFFSET_BITS 64
--#endif
-+#include <getdata/getdata++.h>
-
--#define NO_GETDATA_LEGACY_API
--#define GETDATA_C89_API
--
--extern "C" {
--#include <getdata.h>
--}
--#include <getdata/entry.h>
--
- namespace GetData {
-
- class Dirfile;
-Index: bindings/cxx/getdata/phaseentry.h
-===================================================================
---- bindings/cxx/getdata/phaseentry.h (Revision 441)
-+++ bindings/cxx/getdata/phaseentry.h (Arbeitskopie)
-@@ -22,18 +22,8 @@
- #ifndef GETDATA_PHASEENTRY_H
- #define GETDATA_PHASEENTRY_H
-
--#ifndef _FILE_OFFSET_BITS
--# define _FILE_OFFSET_BITS 64
--#endif
-+#include <getdata/getdata++.h>
-
--#define NO_GETDATA_LEGACY_API
--#define GETDATA_C89_API
--
--extern "C" {
--#include <getdata.h>
--}
--#include <getdata/entry.h>
--
- namespace GetData {
-
- class Dirfile;
-Index: bindings/cxx/getdata/sbitentry.h
-===================================================================
---- bindings/cxx/getdata/sbitentry.h (Revision 441)
-+++ bindings/cxx/getdata/sbitentry.h (Arbeitskopie)
-@@ -22,18 +22,8 @@
- #ifndef GETDATA_SBITENTRY_H
- #define GETDATA_SBITENTRY_H
-
--#ifndef _FILE_OFFSET_BITS
--# define _FILE_OFFSET_BITS 64
--#endif
-+#include <getdata/getdata++.h>
-
--#define NO_GETDATA_LEGACY_API
--#define GETDATA_C89_API
--
--extern "C" {
--#include <getdata.h>
--}
--#include <getdata/entry.h>
--
- namespace GetData {
-
- class Dirfile;
-Index: bindings/cxx/getdata/recipentry.h
-===================================================================
---- bindings/cxx/getdata/recipentry.h (Revision 441)
-+++ bindings/cxx/getdata/recipentry.h (Arbeitskopie)
-@@ -22,18 +22,8 @@
- #ifndef GETDATA_RECIPENTRY_H
- #define GETDATA_RECIPENTRY_H
-
--#ifndef _FILE_OFFSET_BITS
--# define _FILE_OFFSET_BITS 64
--#endif
-+#include <getdata/getdata++.h>
-
--#define NO_GETDATA_LEGACY_API
--#define GETDATA_C89_API
--
--extern "C" {
--#include <getdata.h>
--}
--#include <getdata/entry.h>
--
- namespace GetData {
-
- class Dirfile;
-Index: bindings/cxx/getdata/divideentry.h
-===================================================================
---- bindings/cxx/getdata/divideentry.h (Revision 441)
-+++ bindings/cxx/getdata/divideentry.h (Arbeitskopie)
-@@ -22,18 +22,8 @@
- #ifndef GETDATA_DIVIDEENTRY_H
- #define GETDATA_DIVIDEENTRY_H
-
--#ifndef _FILE_OFFSET_BITS
--# define _FILE_OFFSET_BITS 64
--#endif
-+#include <getdata/getdata++.h>
-
--#define NO_GETDATA_LEGACY_API
--#define GETDATA_C89_API
--
--extern "C" {
--#include <getdata.h>
--}
--#include <getdata/entry.h>
--
- namespace GetData {
-
- class Dirfile;
-Index: bindings/cxx/getdata/stringentry.h
-===================================================================
---- bindings/cxx/getdata/stringentry.h (Revision 441)
-+++ bindings/cxx/getdata/stringentry.h (Arbeitskopie)
-@@ -22,18 +22,8 @@
- #ifndef GETDATA_STRINGENTRY_H
- #define GETDATA_STRINGENTRY_H
-
--#ifndef _FILE_OFFSET_BITS
--# define _FILE_OFFSET_BITS 64
--#endif
-+#include <getdata/getdata++.h>
-
--#define NO_GETDATA_LEGACY_API
--#define GETDATA_C89_API
--
--extern "C" {
--#include <getdata.h>
--}
--#include <getdata/entry.h>
--
- namespace GetData {
-
- class Dirfile;
+ #if ! defined GD_C89_API && ! defined GD_NO_C99_API
+ # include <inttypes.h>
+ # define GD_DCOMPLEXM(v) double _Complex v
More information about the Kst
mailing list