This is the mail archive of the
cygwin-patches@sources.redhat.com
mailing list for the Cygwin project.
PATCH: getcwd() pathstyle
- To: <cygwin-patches at sources dot redhat dot com>
- Subject: PATCH: getcwd() pathstyle
- From: "Jason Gouger" <cygwin at jason-gouger dot com>
- Date: Sun, 7 Jan 2001 19:38:16 -0800
Below is a small patch which adds a "pathstyle" to the CYGWIN options. This
option controls the format of the string returned by the low-level getcwd()
function. The options are 'posix', 'win32', and 'dos'. The 'posix' option
causes getcwd to return the traditional cygwin path, i.e. /usr/local/bin.
The 'win32' option causes getcwd to return a win32 compatible path, i.e.
C:/cygwin/usr/local/bin. The 'dos' option causes getcwd to return a dos
compatible path, i.e. C:\cygwin\usr\local\bin.
The 'pathstyle=win32' option allows cygwin programs to more easily interact
with win32 types of programs when the cygwin program builds
arguments/envvars based off of the cwd.
Sun Jan 7 18:45:22 2001 Jason Gouger <cygwin@jason-gouger.com>
* environ.cc: Added new configuration entry (pathstyle) to
'struct parse_thing .. known[]'
* winsup.h: Added header definition for new function
pathstyle_start_init
* path.cc: New function to initialize pathstyle configuration
named pathstyle_start_init
Modified 'getcwd' to return different pathstyles
+ pathstyle=posix (default), getcwd returns
the traditional path, i.e. /usr/local/bin
+ pathstyle=win32, getcwd returns a win32
type of path, i.e. C:/cygwin/usr/local/bin
+ pathstyle=dos, getcwd returns a dos
type of path, i.e. C:\cygwin\usr\local\bin
begin 666 pathstyle.patch
M26YD97@Z(&5N=FER;VXN8V,*/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/0I20U,@
M9FEL93H@+V-V<R]S<F,O<W)C+W=I;G-U<"]C>6=W:6XO96YV:7)O;BYC8RQV
M"G)E=')I979I;F<@<F5V:7-I;VX@,2XS.0ID:69F("UP("UU("TS("UR,2XS
M.2!E;G9I<F]N+F-C"BTM+2!E;G9I<F]N+F-C"3(P,#`O,3(O,3D@,3DZ-3(Z
M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