Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2006-02-04 00:33:09 +0300
committerCorinna Vinschen <corinna@vinschen.de>2006-02-04 00:33:09 +0300
commit19122010293a715be088a7fd87138a17777fa78e (patch)
tree7ade698dfce72e55c9032bf0a93599be8ec6088a /winsup/cygwin
parentd6b2195f1c4309e3a66bbbbb5bbc8db40a2cd958 (diff)
* path.cc (suffix_scan::lnk_match): Return true beginning with
SCAN_APPENDLNK. (suffix_scan::next): Rearrange code to make .lnk append order slightly more deterministic. * spawn.cc (exe_suffixes): Try no suffix before .exe suffix to align evaluation with stat_suffixes. (dll_suffixes): Ditto.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog10
-rw-r--r--winsup/cygwin/path.cc14
-rw-r--r--winsup/cygwin/spawn.cc6
3 files changed, 20 insertions, 10 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index b075f84fa..acf355b64 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,13 @@
+2006-02-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (suffix_scan::lnk_match): Return true beginning with
+ SCAN_APPENDLNK.
+ (suffix_scan::next): Rearrange code to make .lnk append order slightly
+ more deterministic.
+ * spawn.cc (exe_suffixes): Try no suffix before .exe suffix to align
+ evaluation with stat_suffixes.
+ (dll_suffixes): Ditto.
+
2006-02-02 Christopher Faylor <cgf@timesys.com>
* cygwin/version.h: Mention CW_SETUP_WINENV in comment for API minor
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 091b4ace2..45dc57947 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -3035,7 +3035,7 @@ public:
const char *path;
char *has (const char *, const suffix_info *);
int next ();
- int lnk_match () {return nextstate >= SCAN_EXTRALNK;}
+ int lnk_match () {return nextstate >= SCAN_APPENDLNK;}
};
char *
@@ -3092,22 +3092,20 @@ suffix_scan::next ()
nextstate = SCAN_LNK;
return 1;
}
- if (!*suffixes->name)
- suffixes++;
nextstate = SCAN_EXTRALNK;
/* fall through to suffix checking below */
break;
case SCAN_HASLNK:
- nextstate = SCAN_EXTRALNK; /* Skip SCAN_BEG */
+ nextstate = SCAN_APPENDLNK; /* Skip SCAN_BEG */
return 1;
- case SCAN_LNK:
case SCAN_EXTRALNK:
- strcpy (eopath, ".lnk");
nextstate = SCAN_DONE;
- return 1;
+ *eopath = '\0';
+ return 0;
case SCAN_JUSTCHECK:
- nextstate = SCAN_APPENDLNK;
+ nextstate = SCAN_LNK;
return 1;
+ case SCAN_LNK:
case SCAN_APPENDLNK:
strcat (eopath, ".lnk");
nextstate = SCAN_DONE;
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 000b4aa78..f5df7ccd3 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -39,7 +39,8 @@ details. */
static suffix_info exe_suffixes[] =
{
- suffix_info (".exe", 1), suffix_info ("", 1),
+ suffix_info ("", 1),
+ suffix_info (".exe", 1),
suffix_info (".com"),
suffix_info (NULL)
};
@@ -47,7 +48,8 @@ static suffix_info exe_suffixes[] =
static suffix_info dll_suffixes[] =
{
suffix_info (".dll"),
- suffix_info (".exe", 1), suffix_info ("", 1),
+ suffix_info ("", 1),
+ suffix_info (".exe", 1),
suffix_info (NULL)
};