diff options
| author | Mateusz Loskot <mateusz@loskot.net> | 2006-11-17 22:16:33 +0000 |
|---|---|---|
| committer | Mateusz Loskot <mateusz@loskot.net> | 2006-11-17 22:16:33 +0000 |
| commit | 6209aa6374a226cc889b4578a505b91f3ec0ec7e (patch) | |
| tree | 0462efa230657ce32f0b10a1c9819606227ebe3d /src | |
| parent | b28c3691de529a27198f56f5c4c470ff53249d97 (diff) | |
| download | PROJ-6209aa6374a226cc889b4578a505b91f3ec0ec7e.tar.gz PROJ-6209aa6374a226cc889b4578a505b91f3ec0ec7e.zip | |
Uploaded PROJ.4 port for Windows CE.
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1377 4e78687f-474d-0410-85f9-8d5e500ac6b2
Diffstat (limited to 'src')
| -rw-r--r-- | src/nad_init.c | 14 | ||||
| -rw-r--r-- | src/pj_gridinfo.c | 14 | ||||
| -rw-r--r-- | src/pj_gridlist.c | 14 | ||||
| -rw-r--r-- | src/pj_open_lib.c | 8 | ||||
| -rw-r--r-- | src/projects.h | 12 |
5 files changed, 59 insertions, 3 deletions
diff --git a/src/nad_init.c b/src/nad_init.c index f582b747..936bada5 100644 --- a/src/nad_init.c +++ b/src/nad_init.c @@ -28,6 +28,9 @@ ****************************************************************************** * * $Log$ + * Revision 1.9 2006/11/17 22:16:30 mloskot + * Uploaded PROJ.4 port for Windows CE. + * * Revision 1.8 2003/03/17 18:56:01 warmerda * implement delayed loading of ctable format files * @@ -53,9 +56,18 @@ #include <projects.h> #include <stdio.h> #include <errno.h> -#include <assert.h> #include <string.h> +#ifdef _WIN32_WCE +/* assert.h includes all Windows API headers and causes 'LP' name clash. + * Here assert we disable assert() for Windows CE. + * TODO - mloskot: re-implement porting friendly assert + */ +# define assert(exp) ((void)0) +#else +# include <assert.h> +#endif /* _WIN32_WCE */ + /************************************************************************/ /* nad_ctable_load() */ /* */ diff --git a/src/pj_gridinfo.c b/src/pj_gridinfo.c index 19dc1bf5..2eaf6a09 100644 --- a/src/pj_gridinfo.c +++ b/src/pj_gridinfo.c @@ -29,6 +29,9 @@ ****************************************************************************** * * $Log$ + * Revision 1.8 2006/11/17 22:16:30 mloskot + * Uploaded PROJ.4 port for Windows CE. + * * Revision 1.7 2005/07/07 00:16:03 fwarmerdam * Fixed debug fprintf syntax per: * http://bugzilla.remotesensing.org/show_bug.cgi?id=886 @@ -59,7 +62,16 @@ #include <string.h> #include <math.h> #include <errno.h> -#include <assert.h> + +#ifdef _WIN32_WCE +/* assert.h includes all Windows API headers and causes 'LP' name clash. + * Here assert we disable assert() for Windows CE. + * TODO - mloskot: re-implement porting friendly assert + */ +# define assert(exp) ((void)0) +#else +# include <assert.h> +#endif /* _WIN32_WCE */ /************************************************************************/ /* swap_words() */ diff --git a/src/pj_gridlist.c b/src/pj_gridlist.c index f30d2c55..e86dd575 100644 --- a/src/pj_gridlist.c +++ b/src/pj_gridlist.c @@ -29,6 +29,9 @@ ****************************************************************************** * * $Log$ + * Revision 1.5 2006/11/17 22:16:30 mloskot + * Uploaded PROJ.4 port for Windows CE. + * * Revision 1.4 2005/11/01 05:56:13 fwarmerdam * improved error handling if gridcount is zero * @@ -48,7 +51,16 @@ #include <projects.h> #include <string.h> #include <math.h> -#include <assert.h> + +#ifdef _WIN32_WCE +/* assert.h includes all Windows API headers and causes 'LP' name clash. + * Here assert we disable assert() for Windows CE. + * TODO - mloskot: re-implement porting friendly assert + */ +# define assert(exp) ((void)0) +#else +# include <assert.h> +#endif /* _WIN32_WCE */ static PJ_GRIDINFO *grid_list = NULL; diff --git a/src/pj_open_lib.c b/src/pj_open_lib.c index e7b26ca6..e53e8e2d 100644 --- a/src/pj_open_lib.c +++ b/src/pj_open_lib.c @@ -31,6 +31,9 @@ ****************************************************************************** * * $Log$ + * Revision 1.7 2006/11/17 22:16:30 mloskot + * Uploaded PROJ.4 port for Windows CE. + * * Revision 1.6 2004/09/16 15:14:01 fwarmerdam * * src/pj_open_lib.c: added pj_set_searchpath() provided by Eric Miller. * @@ -111,6 +114,8 @@ pj_open_lib(char *name, char *mode) { int n = 0; int i; +#ifndef _WIN32_WCE + /* check if ~/name */ if (*name == '~' && name[1] == DIR_CHAR) if (sysname = getenv("HOME")) { @@ -163,4 +168,7 @@ pj_open_lib(char *name, char *mode) { fid == NULL ? "failed" : "succeeded" ); return(fid); +#else + return NULL; +#endif /* _WIN32_WCE */ } diff --git a/src/projects.h b/src/projects.h index 80bccab5..a8e6e28e 100644 --- a/src/projects.h +++ b/src/projects.h @@ -28,6 +28,9 @@ ****************************************************************************** * * $Log$ + * Revision 1.25 2006/11/17 22:16:30 mloskot + * Uploaded PROJ.4 port for Windows CE. + * * Revision 1.24 2006/10/18 04:34:03 fwarmerdam * added mlist functions from libproj4 * @@ -149,6 +152,15 @@ extern "C" { extern double hypot(double, double); #endif +#ifdef _WIN32_WCE +# include <wce_stdlib.h> +# include <wce_stdio.h> +# define rewind wceex_rewind +# define getenv wceex_getenv +# define strdup _strdup +# define hypot _hypot +#endif + /* some useful constants */ #define HALFPI 1.5707963267948966 #define FORTPI 0.78539816339744833 |
