Re: [www-dev] Re: building svl failed
Yan Wu <[email protected]>
| Newsgroups | gmane.comp.openoffice.devel.general |
|---|---|
| Message-ID | <[email protected]> |
On 3/15/11, [email protected] <[email protected]> wrote: > I set the environment viable TEMP and TMP to "C:/cygwin/tmp", but I got > the same error! > and where can i find rsc_tempfiles.patch file and how to apply it! > thank you ! > -- I did it in this way to solve this problem: $cd svl $make clean $export TEMP="C:/cygwin/tmp" $export TMP="C:/cygwin/tmp" $make -r I tried to use the patch but still got problem. In the attachment, you could find the patch provided by Michael Stahl. It can be applied as: $cp rsc_tempfiles.patch <SRC_ROOT> #SRC_ROOT is your OOo source root directory $patch -p1 < rsc_tempfiles.patch -- ----------------------------------------------------------------- To unsubscribe send email to [email protected] For additional commands send email to [email protected] with Subject: help
rsc_tempfiles.patch
(application/octet-stream, 2.7 KB)
# HG changeset patch
# Parent e154b7f823a4e9f17cac6401d7d1d8b642b92005
diff --git a/rsc/source/prj/start.cxx b/rsc/source/prj/start.cxx
--- a/rsc/source/prj/start.cxx
+++ b/rsc/source/prj/start.cxx
@@ -52,10 +52,15 @@
#endif
#endif // UNX
+
+#include <rtl/strbuf.hxx>
+#include <sal/main.h>
+
+#include <tools/fsys.hxx>
+
#include <rsctools.hxx>
#include <rscerror.h>
-#include <sal/main.h>
-#include <tools/fsys.hxx>
+
/*************** C O D E ************************************************/
/****************************************************************/
@@ -128,8 +133,29 @@ static BOOL CallPrePro( const ByteString
}
}
- aNewCmdL.Append( rsc_strdup( rInput.GetBuffer() ) );
- aNewCmdL.Append( rsc_strdup( rOutput.GetBuffer() ) );
+ ::rtl::OStringBuffer input(rInput.Len()+3);
+ if (fRspFile)
+ {
+ input.append('"');
+ }
+ input.append(rInput);
+ if (fRspFile)
+ {
+ input.append('"');
+ }
+ ::rtl::OStringBuffer output(rOutput.Len()+3);
+ if (fRspFile)
+ {
+ output.append('"');
+ }
+ output.append(rOutput);
+ if (fRspFile)
+ {
+ output.append('"');
+ }
+
+ aNewCmdL.Append( rsc_strdup( input.getStr() ) );
+ aNewCmdL.Append( rsc_strdup( output.getStr() ) );
aNewCmdL.Append( (void *)0 );
if ( bVerbose )
@@ -258,7 +284,7 @@ static BOOL CallRsc2( ByteString aRsc2Na
#ifdef OS2
fprintf( fRspFile, "%s\n", aSrsName.GetBuffer() );
#else
- fprintf( fRspFile, aSrsName.GetBuffer() );
+ fprintf( fRspFile, "%s", aSrsName.GetBuffer() );
#endif
pString = pInputList->First();
diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c
--- a/rsc/source/rscpp/cpp3.c
+++ b/rsc/source/rscpp/cpp3.c
@@ -410,10 +410,19 @@ readoptions(char* filename, char*** pfar
else
{
*poptbuff=EOS;
- if (strlen(optbuff)>0)
+ size_t const len = strlen(optbuff);
+ if (len > 0)
{
- pfa[fargc+1]=malloc(strlen(optbuff)+1);
- strcpy(pfa[fargc+1],optbuff);
+ pfa[fargc+1] = malloc(len+1);
+ if (('"' == optbuff[0]) && ('"' == optbuff[len-1]))
+ { // do not copy "s
+ strncpy(pfa[fargc+1], optbuff+1, len-1);
+ pfa[fargc+1][len-2] = '\0';
+ }
+ else
+ {
+ strcpy(pfa[fargc+1],optbuff);
+ }
fargc++;
pfa[fargc+1]=0;
poptbuff=&optbuff[0];