|
From: SF/projects/mingw n. l. <min...@li...> - 2013-01-11 18:20:12
|
Bugs item #1100932, was opened at 2005-01-12 06:44 Message generated for change (Comment added) made by earnie You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1100932&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: MSYS >Group: Aged issue Status: Open Resolution: None Priority: 5 Private: No Submitted By: Angus Leeming (angus_leeming) >Assigned to: Cesar Strauss (cstrauss) Summary: getenv chews PATH Initial Comment: OS: Windows XP gcc 3.4.2 (mingw-special) GNU ld version 2.15.91 20040904 Installation: Dec 13 09:19 MSYS-1.0.10.exe Dec 13 08:59 MinGW-3.1.0-1.exe Dec 13 09:08 binutils-2.15.91-20040904-1.tar Dec 13 09:13 gcc-core-3.4.2-20040916-1.tar Dec 13 09:16 gcc-g++-3.4.2-20040916-1.tar Dec 13 09:00 mingw-runtime-3.5.tar Dec 13 09:02 mingw-utils-0.3.tar Dec 13 09:22 msys-autoconf-2.59.tar Dec 13 09:23 msys-automake-1.8.2.tar Dec 13 09:24 msys-libtool-1.5.tar Dec 13 09:29 msysDTK-1.0.1.exe Dec 13 09:04 w32api-3.1.tar Build environment is MSYS $ uname -a MINGW32_NT-5.1 BORIS 1.0.10(0.46/3/2) 2004-03-15 07:17 i686 unknown From include/_mingw.h: # define __MSVCRT_VERSION__ 0x0600 #define __MINGW32_VERSION 3.5 #define __MINGW32_MAJOR_VERSION 3 #define __MINGW32_MINOR_VERSION 5 From include/w32api.h #define __W32API_VERSION 3.1 #define __W32API_MAJOR_VERSION 3 #define __W32API_MINOR_VERSION 1 The Bug report itself! getenv bug with a PATH containing a quoted entry This might be a corner case, but I thought I'd flag it up anyway. It appears that getenv is chewing up my PATH. From a DOS cmd prompt, my PATH environment variable is: J:\MINSYS\HOME\ANGUS> echo %PATH% C:\PROGRA~1\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS; C:\WINDOWS\System32\Wbem; "C:\Program Files\Norton SystemWorks\Norton Ghost\" Note that the last entry here is enclosed in quotes. It's not me who put that entry in. I guess that it's safe to assume that Norton knew what they were doing. Doing the same thing from a MinSYS terminal: $ echo $PATH .:/usr/local/bin:/mingw/bin:/bin:/c/Program Files/Perl/bin/: /c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem: "C:/Program Files/Norton SystemWorks/Norton Ghost/" Ie, all is 'translated' as expected. Note that the quoted entry is not translated but is not mangled either. However, all is not well when I try and grab the path using getenv: $ cat path.C #include <cstdlib> #include <iostream> int main() { char const * const path = getenv("PATH"); std::cout << "PATH is " << path << std::endl; return 0; } $ g++ -o path path.C $ ./path PATH is .;J:\MinSYS\local\bin;j:\mingw\bin; J:\MinSYS\bin;c:\Program Files\Perl\bin\; c:\WINDOWS\system32;c:\WINDOWS;c:\WINDOWS\System32\Wbem; "C;J:\MinSYS\Program Files\Norton SystemWorks\Norton Ghost\" See what nastiness it's done to the quoted entry? Regards, Angus ---------------------------------------------------------------------- >Comment By: Earnie Boyd (earnie) Date: 2013-01-11 10:20 Message: Cesar, please confirm that this issue is fixed. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1100932&group_id=2435 |