Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

TCC/LE string replacement differing from cmd.exe

Sep
2
0
First post, looking for some help. I'm trying to build Go 1.4.3 with their build script (https://github.com/golang/go/blob/go1.4.3/src/make.bat#L57) which works with cmd.exe but not tcc.exe. (some brief background: to build from source, one must build a version of Go prior to 1.5 to "bootstrap" the building of the latest version -- all versions 1.5+ are built in Go instead of C).

The line in question is a little bit hairy:

Code:
set DEFGOROOT=-DGOROOT_FINAL="\"%GOROOT_FINAL:\=\\%\""

So I tried to simplify it and see where the root of the problem is:

Code:
[C:\Program Files (x86)\JPSoft\TCCLE14]set FOO=C:\my-test\some-stuff\asdf

[C:\Program Files (x86)\JPSoft\TCCLE14]set BAR=%FOO:\=\\%

[C:\Program Files (x86)\JPSoft\TCCLE14]echo %FOO%
C:\my-test\some-stuff\asdf

[C:\Program Files (x86)\JPSoft\TCCLE14]echo %BAR%
C:\\\\my-test\\\\\\\\\some-stuff\\\\\\\\\\\\asdf

Pretty strange... but here's what I discovered:

Code:
C:\\\\my-test\\\\\\\\\some-stuff\\\\\\\\\\\\asdf
             \my-test\          \some-stuff\

That's right, for some reason the number of slashes is related to the size of the directory before.

Not sure what's going on here, but any help is appreciated!
 
Back
Top
[FOX] Ultimate Translator
Translate