diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-03-11 14:12:09 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-03-11 14:12:09 +0300 |
commit | ff488124ff455b4fe3271282b1585adea74eb84d (patch) | |
tree | 7cd791625ac0a7ae56478b2aa1be7fc0b801cc90 /winsup/cygwin/syscalls.cc | |
parent | 949c0ec28c86623b83ae56651c00d1bd3c3a5d0c (diff) |
* syscalls.cc (sync): Use MAX_PATH rather than CYG_MAX_PATH.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r-- | winsup/cygwin/syscalls.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 61786601d..e421edd9c 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -1272,19 +1272,20 @@ sync_worker (const char *vol) extern "C" void sync () { - char vol[CYG_MAX_PATH]; + /* Per MSDN, 50 bytes should be enough here. */ + char vol[MAX_PATH]; if (wincap.has_guid_volumes ()) /* Win2k and newer */ { - char a_drive[CYG_MAX_PATH] = {0}; - char b_drive[CYG_MAX_PATH] = {0}; + char a_drive[MAX_PATH] = {0}; + char b_drive[MAX_PATH] = {0}; if (is_floppy ("A:")) - GetVolumeNameForVolumeMountPointA ("A:\\", a_drive, CYG_MAX_PATH); + GetVolumeNameForVolumeMountPointA ("A:\\", a_drive, MAX_PATH); if (is_floppy ("B:")) - GetVolumeNameForVolumeMountPointA ("B:\\", b_drive, CYG_MAX_PATH); + GetVolumeNameForVolumeMountPointA ("B:\\", b_drive, MAX_PATH); - HANDLE sh = FindFirstVolumeA (vol, CYG_MAX_PATH); + HANDLE sh = FindFirstVolumeA (vol, MAX_PATH); if (sh != INVALID_HANDLE_VALUE) { do @@ -1302,7 +1303,7 @@ sync () vol[strlen (vol) - 1] = '\0'; sync_worker (vol); } - while (FindNextVolumeA (sh, vol, CYG_MAX_PATH)); + while (FindNextVolumeA (sh, vol, MAX_PATH)); FindVolumeClose (sh); } } |