aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/path.h
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/path.h')
-rw-r--r--winsup/cygwin/path.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h
index 14367c7..70ec2d2 100644
--- a/winsup/cygwin/path.h
+++ b/winsup/cygwin/path.h
@@ -122,6 +122,15 @@ const char * __stdcall find_exec (const char *name, path_conv& buf, const char *
#define isdrive(s) (isalpha (*(s)) && (s)[1] == ':')
+static inline bool
+has_exec_chars (const char *buf, int len)
+{
+ return len >= 2 &&
+ ((buf[0] == '#' && buf[1] == '!') ||
+ (buf[0] == ':' && buf[1] == '\n') ||
+ (buf[0] == 'M' && buf[1] == 'Z'));
+}
+
/* cwd cache stuff. */
class muto;