Re: [Gpsbabel-code] MSVC patch
Brought to you by:
robertl
From: Robert L. <rob...@gp...> - 2010-04-05 13:40:38
|
On Mon, Apr 5, 2010 at 6:09 AM, Gerhard Olsson <ger...@gm...>wrote: > Changes the following: > * Some modules had code before variable declarations > Despite them needing the code for C++ anyway, Microsoft is determined to not embrace that newfangled C99, aren't they? > * Adding a few files missing from the project setup (and a few errors) > That didn't apply cleanly. I hand-edited that in, so please verify it. Thanx, RJL > * Add define HAVE_CONFIG_H > * Disabling "warnings as errors", as there are a bunch of > signed/unsigned comparisons and double to float assignments. (I could > have submitted a patch for that instead, but wanted to keep the size > down.) > > Compiles in Cygwin. > > Put the patch here: > http://hem.bredband.net/gerhardnospam/gpsbabel/msvc.diff.txt > > If the patch is not added, include the info in the list too. (There > will likely be a line break for PreprocessorDefinitions). > > Note: I did not bother too much with WDK for delbin.c, so I disabled > it in MSVC and patched vecs.c. I considered adding a define. > > /Gerhard > > Index: bushnell.c > =================================================================== > RCS file: /cvsroot/gpsbabel/gpsbabel/bushnell.c,v > retrieving revision 1.10 > diff -u -r1.10 bushnell.c > --- bushnell.c 13 Mar 2010 17:57:34 -0000 1.10 > +++ bushnell.c 5 Apr 2010 10:50:11 -0000 > @@ -158,6 +158,9 @@ > static void > wr_init(const char *fname) { > char *dot, *slash; > + static char valid_chars [] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789" > + ".-/\\~@#$%^&*()_+=<>" > + "abcdefghijklmnopqrstuvwxyz"; > > ofname = xstrdup(fname); > > @@ -166,10 +169,6 @@ > slash = strrchr(ofname, GB_PATHSEP); > if (dot > slash) *dot = 0; > > - static char valid_chars [] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789" > - ".-/\\~@#$%^&*()_+=<>" > - "abcdefghijklmnopqrstuvwxyz"; > - > mkshort_handle = mkshort_new_handle(); > setshort_length(mkshort_handle, 19); > setshort_goodchars(mkshort_handle, valid_chars); > Index: bushnell_trl.c > =================================================================== > RCS file: /cvsroot/gpsbabel/gpsbabel/bushnell_trl.c,v > retrieving revision 1.3 > diff -u -r1.3 bushnell_trl.c > --- bushnell_trl.c 18 Jan 2010 02:37:07 -0000 1.3 > +++ bushnell_trl.c 5 Apr 2010 10:50:11 -0000 > @@ -108,12 +108,12 @@ > > static void > bushnell_write_one(const waypoint *wpt) { > + gbint32 lat = wpt->latitude * 10000000.0; > + gbint32 lon = wpt->longitude * 10000000.0; > trkpt_count++; > if (trkpt_count > 4502) > fatal(MYNAME " too many trackpoints. Max is 4502."); > > - gbint32 lat = wpt->latitude * 10000000.0; > - gbint32 lon = wpt->longitude * 10000000.0; > gbfputint32(lat, file_out); > gbfputint32(lon, file_out); > } > Index: gopal.c > =================================================================== > RCS file: /cvsroot/gpsbabel/gpsbabel/gopal.c,v > retrieving revision 1.8 > diff -u -r1.8 gopal.c > --- gopal.c 23 Nov 2009 18:43:09 -0000 1.8 > +++ gopal.c 5 Apr 2010 10:50:11 -0000 > @@ -179,9 +179,9 @@ > waypoint *wpt, *lastwpt=NULL; > double long_old,lat_old; > char tbuffer[64]; > + struct tm tm2; > long_old=0;lat_old=0; > strftime(routename,sizeof(routename),"Tracklog %c",localtime(&tx)); > - struct tm tm2; > > route = route_head_alloc(); > route->rte_name=xstrdup(routename); > Index: msvc/GPSBabel.vcproj > =================================================================== > RCS file: /cvsroot/gpsbabel/gpsbabel/msvc/GPSBabel.vcproj,v > retrieving revision 1.39 > diff -u -r1.39 GPSBabel.vcproj > --- msvc/GPSBabel.vcproj 18 Jul 2009 06:11:18 -0000 1.39 > +++ msvc/GPSBabel.vcproj 5 Apr 2010 10:50:16 -0000 > @@ -144,7 +144,7 @@ > Name="VCCLCompilerTool" > Optimization="0" > AdditionalIncludeDirectories="expat;." > - > > PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;__WIN32__;_DEBUG;_CONSOLE;" > + > > PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;__WIN32__;_DEBUG;_CONSOLE;HAVE_CONFIG_H" > BasicRuntimeChecks="3" > RuntimeLibrary="1" > UsePrecompiledHeader="0" > @@ -154,10 +154,11 @@ > ProgramDataBaseFileName=".\Debug/" > BrowseInformation="1" > WarningLevel="3" > - WarnAsError="true" > + WarnAsError="false" > SuppressStartupBanner="true" > DebugInformationFormat="3" > CompileAs="0" > + ErrorReporting="1" > /> > <Tool > Name="VCManagedResourceCompilerTool" > @@ -371,6 +372,14 @@ > > > </File> > <File > + RelativePath="..\bushnell.c" > + > > + </File> > + <File > + RelativePath="..\bushnell_trl.c" > + > > + </File> > + <File > RelativePath="..\cet.c" > > > </File> > @@ -631,6 +640,10 @@ > </FileConfiguration> > </File> > <File > + RelativePath="..\enigma.c" > + > > + </File> > + <File > RelativePath="..\exif.c" > > > </File> > @@ -1251,6 +1264,10 @@ > > > </File> > <File > + RelativePath="..\jogmap.c" > + > > + </File> > + <File > RelativePath="..\jtr.c" > > > </File> > @@ -1811,6 +1828,10 @@ > > > </File> > <File > + RelativePath="..\pocketfms_wp.c" > + > > + </File> > + <File > RelativePath="..\polygon.c" > > > <FileConfiguration > @@ -2171,6 +2192,10 @@ > > > </File> > <File > + RelativePath="..\skytraq.c" > + > > + </File> > + <File > RelativePath="..\smplrout.c" > > > <FileConfiguration > @@ -2267,6 +2292,10 @@ > > > </File> > <File > + RelativePath="..\teletype.c" > + > > + </File> > + <File > RelativePath="..\text.c" > > > <FileConfiguration > @@ -2603,6 +2632,10 @@ > </FileConfiguration> > </File> > <File > + RelativePath="..\vpl.c" > + > > + </File> > + <File > RelativePath="..\waypt.c" > > > <FileConfiguration > @@ -2647,6 +2680,10 @@ > > > </File> > <File > + RelativePath="..\wintec_tes.c" > + > > + </File> > + <File > RelativePath="..\xcsv.c" > > > <FileConfiguration > @@ -3236,15 +3273,11 @@ > > > </File> > <File > - RelativePath="..\defs.h" > - > > - </File> > - <File > RelativePath="..\filterdefs.h" > > > </File> > <File > - RelativePath="..\garmin_device_xml.h.h" > + RelativePath="..\garmin_device_xml.h" > > > </File> > <File > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gpsbabel-code mailing list http://www.gpsbabel.org > Gps...@li... > https://lists.sourceforge.net/lists/listinfo/gpsbabel-code > |