[Bug: 21.4.20] Network Drives

Steve Higham steve at sjlt.co.uk
Sat Apr 28 17:52:37 EDT 2007


Stephen,

My machine contains several perl scripts (*.pl) which are certainly
executable. Can the "executable extension list" be modified as a standard
lisp variable?

-----Original Message-----
From: Stephen J. Turnbull [mailto:stephen at xemacs.org] 
Sent: 28 April 2007 13:46
To: Steve Higham
Cc: 'Benson Margulies'; xemacs-beta at xemacs.org
Subject: RE: [Bug: 21.4.20] Network Drives

Thanks for diagnosing and testing!

Steve Higham writes:

 > /* All files are eXecutable under WIN32. Therefore we simply test for the
 >    existence of the file. I'm not sure what should happen under Cygwin */

Cygwin will need its own workarounds for this; I don't think it's
worth worrying about it now, as we may need to require a recent
version of Cygwin for Vista in any case.

 > #ifndef X_OK
 > # ifdef WIN32_NATIVE
 > #  define X_OK 0
 > # else
 > #  define X_OK 1
 > # endif
 > #endif

I don't think this is appropriate.  There are only a small number of
uses of X_OK, including at least one platform-independent function
that returns it.  You'd need to trace such returned values to be sure
they weren't used outside of Windows-specific calls, and of course you
couldn't be sure they wouldn't be in the future.

What 21.5 does in mswindows_access() in nt.c is to check if (mode &
X_OK) is nonzero, and if so calls a function
mswindows_is_executable().  I think this is the preferred idiom.

BTW, mswindows_is_executable() itself looks kinda problematic: it
checks for the extension .bat, .cmd, .com, or .exe, and decides the
file is executable iff it's one of them.  (Not a problem in 21.4,
since that function doesn't exist in 21.4.)

 > If you're comfortable with this change, could you check it into the
 > codebase. I haven't updated the xemacs source code before and would
 > rather not start now.

Note that all commits to 21.4 must be approved by Vin Shelton.  Please
don't commit to the stable branch without his explicit approval.



More information about the XEmacs-Beta mailing list