Mercurial > mxe-octave
comparison src/msvc-libgsf-1.patch @ 3135:8147e6f8659a
[MSVC] enable libgsf compilation
- bump version to 1.14.27
- update generic patch
- add MSVC-specific patch
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Sat, 13 Jul 2013 00:35:02 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
3134:d0564e676d38 | 3135:8147e6f8659a |
---|---|
1 diff -ur libgsf-1.14.27-orig/configure libgsf-1.14.27/configure | |
2 --- libgsf-1.14.27-orig/configure 2013-06-23 12:50:43 -0400 | |
3 +++ libgsf-1.14.27/configure 2013-07-12 23:44:33 -0400 | |
4 @@ -14191,7 +14191,11 @@ | |
5 for try in 1 2; do | |
6 cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7 /* end confdefs.h. */ | |
8 +#ifdef _MSC_VER | |
9 +#include <winsock2.h> | |
10 +#else | |
11 #include <sys/time.h> | |
12 +#endif | |
13 int | |
14 main () | |
15 { | |
16 diff -ur libgsf-1.14.27-orig/dumpdef.pl libgsf-1.14.27/dumpdef.pl | |
17 --- libgsf-1.14.27-orig/dumpdef.pl 2009-05-18 21:55:48 -0400 | |
18 +++ libgsf-1.14.27/dumpdef.pl 2013-07-13 00:13:39 -0400 | |
19 @@ -43,7 +43,7 @@ | |
20 while ($lines =~ /^\s*extern\s+ #function type | |
21 [A-Za-z_]\w*(?:[\s\*]+[A-Za-z_]\w*)*[\s\*]+([A-Za-z_]\w*) #[first arg | |
22 \s*(?:\[\s*\]\s*)?;/gxm) { | |
23 - push @symbols, "$1 DATA"; | |
24 + push @symbols, $1; | |
25 } | |
26 @symbols; | |
27 } | |
28 diff -ur libgsf-1.14.27-orig/gsf/Makefile.in libgsf-1.14.27/gsf/Makefile.in | |
29 --- libgsf-1.14.27-orig/gsf/Makefile.in 2013-06-23 12:50:44 -0400 | |
30 +++ libgsf-1.14.27/gsf/Makefile.in 2013-07-13 00:12:49 -0400 | |
31 @@ -350,7 +350,8 @@ | |
32 top_srcdir = @top_srcdir@ | |
33 AM_CPPFLAGS = -I$(top_srcdir) $(LIBGSF_CFLAGS) \ | |
34 $(Z_CPPFLAGS) \ | |
35 - -DGSFLOCALEDIR=\"$(datadir)/locale\" | |
36 + -DGSFLOCALEDIR=\"$(datadir)/locale\" \ | |
37 + -DBUILDING_LIBGSF | |
38 | |
39 lib_LTLIBRARIES = libgsf-1.la | |
40 CLEANFILES = $(am__append_1) $(am__append_3) $(am__append_5) | |
41 @@ -482,8 +483,8 @@ | |
42 | |
43 CPP_CFLAGS = -DGLIB_CHECK_VERSION\(x,y,z\) | |
44 LIB_PUBLIC_HDRS = $(libgsf_1_include_HEADERS) | |
45 -@HAVE_LIBEXE_TRUE@gsf_mslibdir = $(DESTDIR)$(libdir) | |
46 -@HAVE_LIBEXE_TRUE@gsf_mslib_DATA = gsf-1.lib | |
47 +@HAVE_LIBEXE_TRUE@#gsf_mslibdir = $(DESTDIR)$(libdir) | |
48 +@HAVE_LIBEXE_TRUE@#gsf_mslib_DATA = gsf-1.lib | |
49 @HAVE_INTROSPECTION_TRUE@Gsf_1_gir_INCLUDES = GObject-2.0 Gio-2.0 libxml2-2.0 | |
50 @HAVE_INTROSPECTION_TRUE@Gsf_1_gir_CFLAGS = $(AM_CPPFLAGS) | |
51 @HAVE_INTROSPECTION_TRUE@Gsf_1_gir_LIBS = libgsf-1.la | |
52 diff -ur libgsf-1.14.27-orig/gsf/gsf-fwd.h libgsf-1.14.27/gsf/gsf-fwd.h | |
53 --- libgsf-1.14.27-orig/gsf/gsf-fwd.h 2013-02-23 14:06:49 -0500 | |
54 +++ libgsf-1.14.27/gsf/gsf-fwd.h 2013-07-13 00:09:36 -0400 | |
55 @@ -25,6 +25,12 @@ | |
56 #include <glib.h> | |
57 #include <glib-object.h> | |
58 | |
59 +#if defined(_MSC_VER) && !defined(BUILDING_LIBGSF) | |
60 +# define LIBGSF_EXTERN extern __declspec(dllimport) | |
61 +#else | |
62 +# define LIBGSF_EXTERN extern | |
63 +#endif | |
64 + | |
65 G_BEGIN_DECLS | |
66 | |
67 /** | |
68 diff -ur libgsf-1.14.27-orig/gsf/gsf-input-memory.c libgsf-1.14.27/gsf/gsf-input-memory.c | |
69 --- libgsf-1.14.27-orig/gsf/gsf-input-memory.c 2013-03-08 21:46:57 -0500 | |
70 +++ libgsf-1.14.27/gsf/gsf-input-memory.c 2013-07-13 00:18:03 -0400 | |
71 @@ -36,6 +36,10 @@ | |
72 #include <io.h> | |
73 #include <fcntl.h> | |
74 | |
75 +#ifndef S_ISREG | |
76 +# define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) | |
77 +#endif | |
78 + | |
79 #define MAP_FAILED NULL | |
80 #endif | |
81 | |
82 diff -ur libgsf-1.14.27-orig/gsf/gsf-input-stdio.c libgsf-1.14.27/gsf/gsf-input-stdio.c | |
83 --- libgsf-1.14.27-orig/gsf/gsf-input-stdio.c 2013-03-08 21:46:57 -0500 | |
84 +++ libgsf-1.14.27/gsf/gsf-input-stdio.c 2013-07-13 00:17:57 -0400 | |
85 @@ -32,6 +32,10 @@ | |
86 #include <sys/types.h> | |
87 #include <sys/stat.h> | |
88 | |
89 +#ifndef S_ISREG | |
90 +# define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) | |
91 +#endif | |
92 + | |
93 static GObjectClass *parent_class; | |
94 | |
95 struct _GsfInputStdio { | |
96 diff -ur libgsf-1.14.27-orig/gsf/gsf-opendoc-utils.h libgsf-1.14.27/gsf/gsf-opendoc-utils.h | |
97 --- libgsf-1.14.27-orig/gsf/gsf-opendoc-utils.h 2013-02-23 16:27:40 -0500 | |
98 +++ libgsf-1.14.27/gsf/gsf-opendoc-utils.h 2013-07-13 00:03:47 -0400 | |
99 @@ -138,7 +138,7 @@ | |
100 | |
101 /* For 1.15.x s/opendoc/odf/ and s/ooo/odf/ */ | |
102 #ifndef GSF_DISABLE_DEPRECATED | |
103 -extern GsfXMLInNS gsf_ooo_ns[]; /* use get_gsf_ooo_ns instead */ | |
104 +LIBGSF_EXTERN GsfXMLInNS gsf_ooo_ns[]; /* use get_gsf_ooo_ns instead */ | |
105 GSF_DEPRECATED_FOR (gsf_odf_get_ns) | |
106 GsfXMLInNS *get_gsf_ooo_ns (void); | |
107 GSF_DEPRECATED_FOR (gsf_odf_get_version_string) | |
108 diff -ur libgsf-1.14.27-orig/gsf/gsf-output-stdio.c libgsf-1.14.27/gsf/gsf-output-stdio.c | |
109 --- libgsf-1.14.27-orig/gsf/gsf-output-stdio.c 2013-03-08 21:46:57 -0500 | |
110 +++ libgsf-1.14.27/gsf/gsf-output-stdio.c 2013-07-13 00:17:52 -0400 | |
111 @@ -52,6 +52,9 @@ | |
112 #ifdef HAVE_IO_H | |
113 #include <io.h> | |
114 #endif | |
115 +#ifndef S_ISREG | |
116 +# define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) | |
117 +#endif | |
118 #endif /* G_OS_WIN32 */ | |
119 | |
120 #ifndef W_OK | |
121 diff -ur libgsf-1.14.27-orig/gsf/gsf-utils.h libgsf-1.14.27/gsf/gsf-utils.h | |
122 --- libgsf-1.14.27-orig/gsf/gsf-utils.h 2013-03-07 17:56:29 -0500 | |
123 +++ libgsf-1.14.27/gsf/gsf-utils.h 2013-07-13 00:03:06 -0400 | |
124 @@ -280,21 +280,21 @@ | |
125 * | |
126 * Major version number of libgsf, indicating the ABI version. | |
127 */ | |
128 -extern int libgsf_major_version; | |
129 +LIBGSF_EXTERN int libgsf_major_version; | |
130 | |
131 /** | |
132 * libgsf_minor_version: | |
133 * | |
134 * Minor (secondary) version number of libgsf, indicating the API version. | |
135 */ | |
136 -extern int libgsf_minor_version; | |
137 +LIBGSF_EXTERN int libgsf_minor_version; | |
138 | |
139 /** | |
140 * libgsf_micro_version: | |
141 * | |
142 * Micro (tertiary) version number of libgsf, indicating bug fixes. | |
143 */ | |
144 -extern int libgsf_micro_version; | |
145 +LIBGSF_EXTERN int libgsf_micro_version; | |
146 | |
147 char const *gsf_extension_pointer (char const * path); | |
148 void gsf_iconv_close (GIConv handle); | |
149 diff -ur libgsf-1.14.27-orig/gsf-win32/Makefile.in libgsf-1.14.27/gsf-win32/Makefile.in | |
150 --- libgsf-1.14.27-orig/gsf-win32/Makefile.in 2013-06-23 12:50:44 -0400 | |
151 +++ libgsf-1.14.27/gsf-win32/Makefile.in 2013-07-13 00:20:12 -0400 | |
152 @@ -355,8 +355,8 @@ | |
153 CLEANFILES = $(am__append_1) $(am__append_2) | |
154 @WITH_WIN32_TRUE@noinst_DATA = lib.def | |
155 LIB_PUBLIC_HDRS = $(libgsf_win32_1_include_HEADERS) | |
156 -@HAVE_LIBEXE_TRUE@gsf_win32_mslibdir = $(DESTDIR)$(libdir) | |
157 -@HAVE_LIBEXE_TRUE@gsf_win32_mslib_DATA = gsf-win32-1.lib | |
158 +@HAVE_LIBEXE_TRUE@#gsf_win32_mslibdir = $(DESTDIR)$(libdir) | |
159 +@HAVE_LIBEXE_TRUE@#gsf_win32_mslib_DATA = gsf-win32-1.lib | |
160 all: all-am | |
161 | |
162 .SUFFIXES: | |
163 diff -ur libgsf-1.14.27-orig/tools/gsf.c libgsf-1.14.27/tools/gsf.c | |
164 --- libgsf-1.14.27-orig/tools/gsf.c 2013-03-07 17:56:29 -0500 | |
165 +++ libgsf-1.14.27/tools/gsf.c 2013-07-13 00:21:19 -0400 | |
166 @@ -8,6 +8,13 @@ | |
167 #include <string.h> | |
168 #include <errno.h> | |
169 | |
170 +#ifndef S_ISREG | |
171 +# define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) | |
172 +#endif | |
173 +#ifndef S_ISDIR | |
174 +# define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) | |
175 +#endif | |
176 + | |
177 static gboolean show_version; | |
178 | |
179 static GOptionEntry const gsf_options [] = { |