On 02/03/2011 04:45, Yan Wu wrote:
>> hmm, still have no idea, the call to cpp/rscpp is not shown...
>> please try the following:
>> first apply the attached patch (to give -verbose flag to rsc)
>> then rebuild rsc:
>>  (cd rsc && rm -r wntmsci* && build debug=t && deliver)
>> then try again, it should now print the arguments that don't work
>>
> The call to cpp/rsccpp is still not shown after applying the patch and
> rebuilding rsc. The error log is:

but it is shown :)

> Preprocessor commandline:  -I. 
> -If:/DEV300_m100/solver/300/wntmsci12.pro/inc/stl
>  -If:/DEV300_m100/solver/300/wntmsci12.pro/inc/external 
> -If:/DEV300_m100/solver/
> 300/wntmsci12.pro/inc -If:/DEV300_m100/solenv/wntmsci12/inc 
> -If:/DEV300_m100/sol
> env/inc -If:/DEV300_m100/res 
> -If:/DEV300_m100/solver/300/wntmsci12.pro/inc/stl -
> Id:/OOoEnv/JDK16~1.0_1/include/win32 -Id:/OOoEnv/JDK16~1.0_1/include 
> -Ic:/PROGRA
> ~1/MI2578~1/Windows/v6.1/include -Ic:/PROGRA~1/MICROS~1.0/VC/include 
> -Ic:/PROGRA
> ~1/MICROS~1.0SD/include -Ic:/PROGRA~1/MICROS~1.0SD/include 
> -If:/DEV300_m100/solv
> er/300/wntmsci12.pro/workdir/inc -If:/DEV300_m100/svl/source/inc 
> -If:/DEV300_m10
> 0/svl/inc/ -If:/DEV300_m100/svl/inc/svl -If:/DEV300_m100/svl/source/misc/ 
> -DBOOS
> T_MEM_FN_ENABLE_CDECL -DCPPU_ENV=msci -DCUI -DENABLE_GRAPHITE -DENABLE_GTK 
> -DENA
> BLE_LAYOUT=0 -DENABLE_LAYOUT_EXPERIMENTAL=0 -DFULL_DESK -DINTEL -DM1500 -DMSC 
> -D
> NDEBUG -DNT351 -DOPTIMIZE -DOSL_DEBUG_LEVEL=0 -DPRODUCT -DPRODUCT_FULL 
> -DSOLAR_J
> AVA -DSTLPORT_VERSION=400 -DSUPD=300 -DVCL -DWIN32 -DWINVER=0x0500 -DWNT 
> -D_CRT_
> NONSTDC_NO_DEPRECATE -D_CRT_NON_CONFORMING_SWPRINTFS 
> -D_CRT_SECURE_NO_DEPRECATE
> -D_MT -D_REENTRANT -D_WIN32_IE=0x0500 -D_X86_=1 
> f:/DEV300_m100/svl/source/misc/m
> ediatyp.src C:\Documents and Settings\wuyan\174.tmp

here it is.
i'd guess the problem is this: C:\Documents and Settings\wuyan\174.tmp
this path contains spaces, and probably the rscpp parses it as 3 paths
insead of 1.

it seems when using response files the paths need to be quoted.
please try out the attached patch.

btw, in another part of the rsc call there was this:
> --tmpdir=C:/cygwin/tmp

so it seems you have 2 different temp directories set; the build system
uses $TMPDIR (fallback to /tmp), while the rscpp apparently uses some
other non-standard environment variable, like $TMP or $TEMP or something.

> Preprocessor startline:  f:/DEV300_m100/solver/300/wntmsci12.pro/bin/rscpp 
> @C:\D
> ocuments and Settings\wuyan\175.tmp
> cpp: line 0, Error: Too many file arguments.  Usage: cpp [input [output]]
> @C:\Documents: Invalid argument
> cpp: line 0, Error: Can't open input file "@C:\Documents"
> Error starting preprocessor
> make: *** 
> [/cygdrive/f/DEV300_m100/solver/300/wntmsci12.pro/workdir/SrsPartTarge
> t/svl/source/misc/mediatyp.src] error 1
> 
> 
> 
> Yan

-- 
"The dependency management (or lack thereof) in C and C++ results in far
 too much code going through the compiler.  You might say that Go was
 conceived while waiting for a big compilation." -- Rob Pike
--
------------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: sy...@openoffice.org with Subject: help
# 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];

Reply via email to