Mercurial > mxe-octave
changeset 916:2ae2b8ee4c18
replace asprintf in package openscenegraph
MinGW does not provide asprintf. We could get it from gnulib
or liberty, but in this case it's easy reimplement the section.
author | Mark Brand <mabrand@mabrand.nl> |
---|---|
date | Tue, 27 Apr 2010 12:33:40 +0200 |
parents | 43389b74773e |
children | 05f38762e065 |
files | src/openscenegraph-3-no-asprintf.patch |
diffstat | 1 files changed, 25 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/openscenegraph-3-no-asprintf.patch Tue Apr 27 12:33:40 2010 +0200 @@ -0,0 +1,25 @@ +This file is part of mingw-cross-env. +See doc/index.html for further information. + +diff -urN a/src/osgPlugins/xine/ReaderWriterXine.cpp b/src/osgPlugins/xine/ReaderWriterXine.cpp +--- a/src/osgPlugins/xine/ReaderWriterXine.cpp 2010-03-13 11:38:10.000000000 +0100 ++++ b/src/osgPlugins/xine/ReaderWriterXine.cpp 2010-04-27 12:21:20.597790305 +0200 +@@ -326,9 +326,15 @@ + const char* user_home = xine_get_homedir(); + if(user_home) + { +- char* cfgfile = NULL; +- int result = asprintf(&(cfgfile), "%s/.xine/config", user_home); +- if (result>0) xine_config_load(_xine, cfgfile); ++ const char* tail = "/.xine/config"; ++ int size = strlen(user_home) + strlen(tail) + 1; ++ char* cfgfile = malloc(size); ++ if (cfgfile) ++ { ++ strcpy(cfgfile, user_home); ++ strcat(cfgfile, tail); ++ xine_config_load(_xine, cfgfile); ++ } + } + + xine_init(_xine);