From: <mar...@us...> - 2011-01-25 15:04:36
|
Revision: 4020 http://navit.svn.sourceforge.net/navit/?rev=4020&view=rev Author: martin-s Date: 2011-01-25 15:04:30 +0000 (Tue, 25 Jan 2011) Log Message: ----------- Fix:map_shapefile:MSVC fixes|Thanks chollya Modified Paths: -------------- trunk/navit/navit/map/shapefile/shapefile.c Modified: trunk/navit/navit/map/shapefile/shapefile.c =================================================================== --- trunk/navit/navit/map/shapefile/shapefile.c 2011-01-25 15:02:38 UTC (rev 4019) +++ trunk/navit/navit/map/shapefile/shapefile.c 2011-01-25 15:04:30 UTC (rev 4020) @@ -22,8 +22,10 @@ #include <stdio.h> #include <string.h> #include <math.h> +#include "config.h" +#ifdef HAVE_UNISTD_H #include <unistd.h> -#include "config.h" +#endif #include "debug.h" #include "plugin.h" #include "projection.h" @@ -269,7 +271,7 @@ static void longest_match_add_key_value(struct longest_match *lm, char *k, char *v) { - char buffer[strlen(k)+strlen(v)+2]; + char* buffer=g_alloca(strlen(k)+strlen(v)+2); int idx; strcpy(buffer,"*=*"); @@ -324,9 +326,9 @@ static void build_match(struct longest_match *lm, struct longest_match_list *lml, char *line) { + struct longest_match_list_item *lmli; char *kvl=NULL,*i=NULL,*p,*kv; dbg(1,"line=%s\n",line); - struct longest_match_list_item *lmli; kvl=line; p=strchr(line,'\t'); if (p) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |