This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

allow executing a path in backslash notation


The attached patch allows executing a path in backslash notation.  This can be tested in the Cygwin builds of GNU make with the "DOS compatibility" compile-time option of GNU make enabled, such as those from Cygwin make packages 3.79 and 3.80.

$ cat dos-compat.mak
default:
        ..\echo.exe test
        C:\<FULLPATH>\echo.exe test

$ ./make.exe --win32 -f dos-compat.mak
..\echo.exe test
test
C:\<FULLPATH>\echo.exe test
test

The patch cannot be tested by simply running a command in backslash notation in the existing Cygwin build of bash or pdksh because these shells re-implement the search of the potential executable command.  I believe these re-implementations are for improved user interaction and platform-independent security.

The patch is a blind conjecture because I am not fully aware about the intention of find_exec() in spawn.cc.  Its implementation seems exceedingly complicated to me, and the comments in the middle of the function about refusing a full Windows path contradict the description of the function above its prototype.

-- 

Attachment: cygwin-dos-compatibility.txt
Description: Text document

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]