diff options
author | Robert Collins <rbtcollins@hotmail.com> | 2003-11-14 23:40:06 +0000 |
---|---|---|
committer | Robert Collins <rbtcollins@hotmail.com> | 2003-11-14 23:40:06 +0000 |
commit | 95d02d5b9be998c93ffb23085ebd5b2ba263463a (patch) | |
tree | 2081f00a0190ca76c33f1bc026dbc8f4c7141404 /winsup/cygwin/syscalls.cc | |
parent | 508682370b4aad954555e5611c994eb96fb5cc56 (diff) | |
download | cygnal-95d02d5b9be998c93ffb23085ebd5b2ba263463a.tar.gz cygnal-95d02d5b9be998c93ffb23085ebd5b2ba263463a.tar.bz2 cygnal-95d02d5b9be998c93ffb23085ebd5b2ba263463a.zip |
2003-11-11 Robert Collins <rbtcollins@hotmail.com>
Ron Parker <rdparker@butlermfg.com>
* bsdlib.cc: Update throughout to use CYG_MAX_PATH rather than MAX_PATH.
* cygheap.h: Ditto.
* dcrt0.cc: Ditto.
* delqueue.cc: Ditto.
* dlfcn.cc: Ditto.
* dll_init.cc: Ditto.
* dll_init.h: Ditto.
* dtable.cc: Ditto.
* environ.cc: Ditto.
* environ.h: Ditto.
* exceptions.cc: Ditto.
* external.cc: Ditto.
* fhandler_disk_file.cc: Ditto.
* fhandler_proc.cc: Ditto.
* fhandler_process.cc: Ditto.
* fhandler_raw.cc: Ditto.
* fhandler_registry.cc: Ditto.
* fhandler_socket.cc: Ditto.
* fhandler_virtual.cc: Ditto.
* miscfuncs.cc: Ditto.
* mmap.cc: Ditto.
* netdb.cc: Ditto.
* path.cc: Ditto.
* path.h: Ditto.
* pinfo.cc: Ditto.
* pinfo.h: Ditto.
* pthread.cc: Ditto.
* registry.cc: Ditto.
* shared.cc: Ditto.
* shared_info.h: Ditto.
* smallprint.c: Ditto.
* spawn.cc: Ditto.
* strace.cc: Ditto.
* syscalls.cc: Ditto.
* thread.h: Ditto.
* uinfo.cc: Ditto.
* winsup.h: Ditto.
* include/limits.h: Ditto.
* include/cygwin/config.h: Ditto.
* include/sys/param.h: Ditto.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r-- | winsup/cygwin/syscalls.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index dfc5f0f97..adf19e2da 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -689,7 +689,7 @@ link (const char *a, const char *b) } /* Shortcut hack. */ - char new_lnk_buf[MAX_PATH + 5]; + char new_lnk_buf[CYG_MAX_PATH + 5]; if (allow_winsymlinks && real_a.is_lnk_symlink () && !real_b.case_clash) { strcpy (new_lnk_buf, b); @@ -710,7 +710,7 @@ link (const char *a, const char *b) LPVOID lpContext; DWORD cbPathLen; DWORD StreamSize; - WCHAR wbuf[MAX_PATH]; + WCHAR wbuf[CYG_MAX_PATH]; BOOL bSuccess; @@ -725,7 +725,7 @@ link (const char *a, const char *b) goto docopy; } - cbPathLen = sys_mbstowcs (wbuf, real_b, MAX_PATH) * sizeof (WCHAR); + cbPathLen = sys_mbstowcs (wbuf, real_b, CYG_MAX_PATH) * sizeof (WCHAR); StreamId.dwStreamId = BACKUP_LINK; StreamId.dwStreamAttributes = 0; @@ -1365,7 +1365,7 @@ rename (const char *oldpath, const char *newpath) path_conv real_new (newpath, PC_SYM_NOFOLLOW); /* Shortcut hack. */ - char new_lnk_buf[MAX_PATH + 5]; + char new_lnk_buf[CYG_MAX_PATH + 5]; if (real_old.is_lnk_symlink () && !real_new.error && !real_new.case_clash) { strcpy (new_lnk_buf, newpath); @@ -2044,7 +2044,7 @@ static int __stdcall mknod_worker (const char *path, mode_t type, mode_t mode, _major_t major, _minor_t minor) { - char buf[sizeof (":\\00000000:00000000:00000000") + MAX_PATH]; + char buf[sizeof (":\\00000000:00000000:00000000") + CYG_MAX_PATH]; sprintf (buf, ":\\%x:%x:%x", major, minor, type | (mode & (S_IRWXU | S_IRWXG | S_IRWXO))); return symlink_worker (buf, path, true, true); @@ -2056,7 +2056,7 @@ mknod32 (const char *path, mode_t mode, __dev32_t dev) if (check_null_empty_str_errno (path)) return -1; - if (strlen (path) >= MAX_PATH) + if (strlen (path) >= CYG_MAX_PATH) return -1; path_conv w32path (path, PC_SYM_NOFOLLOW | PC_FULL); @@ -2595,7 +2595,7 @@ extern "C" void updwtmp (const char *wtmp_file, const struct utmp *ut) { /* Writing to wtmp must be atomic to prevent mixed up data. */ - char mutex_name[MAX_PATH]; + char mutex_name[CYG_MAX_PATH]; HANDLE mutex; int fd; @@ -2833,7 +2833,7 @@ pututline (struct utmp *ut) ut->ut_user, ut->ut_host); /* Read/write to utmp must be atomic to prevent overriding data by concurrent processes. */ - char mutex_name[MAX_PATH]; + char mutex_name[CYG_MAX_PATH]; HANDLE mutex = CreateMutex (NULL, FALSE, shared_name (mutex_name, "utmp_mutex", 0)); if (mutex) @@ -2987,7 +2987,7 @@ getusershell () "/usr/bin/csh", NULL }; - static char buf[MAX_PATH]; + static char buf[CYG_MAX_PATH]; int ch, buf_idx; if (!shell_fp && !(shell_fp = fopen64 (ETC_SHELLS, "rt"))) @@ -3002,11 +3002,11 @@ getusershell () /* Get each non-whitespace character as part of the shell path as long as it fits in buf. */ for (buf_idx = 0; - ch != EOF && !isspace (ch) && buf_idx < MAX_PATH; + ch != EOF && !isspace (ch) && buf_idx < CYG_MAX_PATH; buf_idx++, ch = getc (shell_fp)) buf[buf_idx] = ch; /* Skip any trailing non-whitespace character not fitting in buf. If the - path is longer than MAX_PATH, it's invalid anyway. */ + path is longer than CYG_MAX_PATH, it's invalid anyway. */ while (ch != EOF && !isspace (ch)) ch = getc (shell_fp); if (buf_idx) |