Mercurial > mxe-octave
comparison src/msvc-proj-1.patch @ 3155:43449ab99ea2
[MSVC] enable PROJ compilation
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Sat, 20 Jul 2013 11:55:26 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
3154:6665f8a98e70 | 3155:43449ab99ea2 |
---|---|
1 diff -ur proj-4.8.0-orig/src/Makefile.am proj-4.8.0/src/Makefile.am | |
2 --- proj-4.8.0-orig/src/Makefile.am 2012-03-07 00:58:49 -0500 | |
3 +++ proj-4.8.0/src/Makefile.am 2013-07-20 11:32:41 -0400 | |
4 @@ -22,7 +22,8 @@ | |
5 | |
6 lib_LTLIBRARIES = libproj.la | |
7 | |
8 -libproj_la_LDFLAGS = -no-undefined -version-info 7:0:7 | |
9 +libproj_la_CPPFLAGS = -DBUILDING_PROJ | |
10 +libproj_la_LDFLAGS = -no-undefined -version-info 7:0:7 -Wl,proj.def -export-symbols-regex "xXx" | |
11 | |
12 libproj_la_SOURCES = \ | |
13 projects.h pj_list.h \ | |
14 diff -ur proj-4.8.0-orig/src/emess.h proj-4.8.0/src/emess.h | |
15 --- proj-4.8.0-orig/src/emess.h 2010-12-05 11:06:29 -0500 | |
16 +++ proj-4.8.0/src/emess.h 2013-07-20 11:35:24 -0400 | |
17 @@ -11,7 +11,7 @@ | |
18 | |
19 #ifdef EMESS_ROUTINE /* use type */ | |
20 /* for emess procedure */ | |
21 -struct EMESS emess_dat = { (char *)0, (char *)0, 0 }; | |
22 +PROJ_EXPORT struct EMESS emess_dat = { (char *)0, (char *)0, 0 }; | |
23 | |
24 #ifdef sun /* Archaic SunOs 4.1.1, etc. */ | |
25 extern char *sys_errlist[]; | |
26 @@ -20,7 +20,7 @@ | |
27 | |
28 #else /* for for calling procedures */ | |
29 | |
30 -extern struct EMESS emess_dat; | |
31 +extern PROJ_EXPORT struct EMESS emess_dat; | |
32 void emess(int, char *, ...); | |
33 | |
34 #endif /* use type */ | |
35 diff -ur proj-4.8.0-orig/src/proj.def proj-4.8.0/src/proj.def | |
36 --- proj-4.8.0-orig/src/proj.def 2011-05-04 14:50:18 -0400 | |
37 +++ proj-4.8.0/src/proj.def 2013-07-20 11:38:20 -0400 | |
38 @@ -53,4 +53,8 @@ | |
39 pj_ctx_set_app_data @51 | |
40 pj_ctx_get_app_data @52 | |
41 pj_log @53 | |
42 - pj_clear_initcache @54 | |
43 + pj_clear_initcache @54 | |
44 + | |
45 + emess @55 | |
46 + nad_init @56 | |
47 + nad_cvt @57 | |
48 diff -ur proj-4.8.0-orig/src/proj_api.h proj-4.8.0/src/proj_api.h | |
49 --- proj-4.8.0-orig/src/proj_api.h 2012-02-20 20:11:24 -0500 | |
50 +++ proj-4.8.0/src/proj_api.h 2013-07-20 11:35:01 -0400 | |
51 @@ -31,6 +31,16 @@ | |
52 #ifndef PROJ_API_H | |
53 #define PROJ_API_H | |
54 | |
55 +#ifdef _MSC_VER | |
56 +# ifdef BUILDING_PROJ | |
57 +# define PROJ_EXPORT __declspec(dllexport) | |
58 +# else | |
59 +# define PROJ_EXPORT __declspec(dllimport) | |
60 +# endif | |
61 +#else | |
62 +# define PROJ_EXPORT | |
63 +#endif | |
64 + | |
65 /* standard inclusions */ | |
66 #include <math.h> | |
67 #include <stdlib.h> | |
68 @@ -42,13 +52,13 @@ | |
69 /* Try to update this every version! */ | |
70 #define PJ_VERSION 480 | |
71 | |
72 -extern char const pj_release[]; /* global release id string */ | |
73 +extern PROJ_EXPORT char const pj_release[]; /* global release id string */ | |
74 | |
75 #define RAD_TO_DEG 57.29577951308232 | |
76 #define DEG_TO_RAD .0174532925199432958 | |
77 | |
78 | |
79 -extern int pj_errno; /* global error return code */ | |
80 +extern PROJ_EXPORT int pj_errno; /* global error return code */ | |
81 | |
82 #if !defined(PROJECTS_H) | |
83 typedef struct { double u, v; } projUV; |