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>2007-12-06 21:24:06 +0300
committerCorinna Vinschen <corinna@vinschen.de>2007-12-06 21:24:06 +0300
commit36093cfbbfaaa714ef049265d91bbde67d889e2c (patch)
tree78bdddee79b74672b2bc64ebf0a83330ea8a01f2 /winsup/cygwin/dcrt0.cc
parent6320370052b940a458f4f712b83e40fcf032e399 (diff)
* dcrt0.cc (initial_env): Use PATH_MAX instead of CYG_MAX_PATH for path
name buffer size. (dll_crt0_1): Allocate new_argv0 with PATH_MAX size. * exceptions.cc (debugger_command): Set size to 2 * PATH_MAX + 20; (error_start_init): Use PATH_MAX instead of CYG_MAX_PATH for path name buffer size. * external.cc (fillout_pinfo): Always fill out ep.progname 0-terminated. Fill out ep.progname_long. * fhandler_process.cc (fhandler_process::fill_filebuf): Allocate buffer for executable filename with PATH_MAX size. * pinfo.cc: Throughout use PATH_MAX instead of CYG_MAX_PATH. * pinfo.h (class _pinfo): Set progname size to PATH_MAX. * smallprint.cc: Include limits.h. Use PATH_MAX instead of CYG_MAX_PATH for path name buffer size. * strace.cc (strace::vsprntf): Ditto. * include/sys/cygwin.h (EXTERNAL_PINFO_VERSION_32_LP): Define. (EXTERNAL_PINFO_VERSION): Set to EXTERNAL_PINFO_VERSION_32_LP. (struct external_pinfo): Add progname_long member. * include/sys/dirent.h: Correctly include limits.h instead of sys/limits.h.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r--winsup/cygwin/dcrt0.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index bb4a2c1d5..ca4331cf8 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -542,7 +542,7 @@ break_here ()
static void
initial_env ()
{
- char buf[CYG_MAX_PATH];
+ char buf[PATH_MAX];
if (GetEnvironmentVariable ("CYGWIN_TESTING", buf, sizeof (buf) - 1))
_cygwin_testing = 1;
@@ -553,7 +553,7 @@ initial_env ()
{
DWORD ms = atoi (buf);
buf[0] = '\0';
- len = GetModuleFileName (NULL, buf, CYG_MAX_PATH);
+ len = GetModuleFileName (NULL, buf, PATH_MAX);
console_printf ("Sleeping %d, pid %u %s\n", ms, GetCurrentProcessId (), buf);
Sleep (ms);
if (!strace.active () && !dynamically_loaded)
@@ -561,8 +561,8 @@ initial_env ()
}
if (GetEnvironmentVariable ("CYGWIN_DEBUG", buf, sizeof (buf) - 1))
{
- char buf1[CYG_MAX_PATH];
- len = GetModuleFileName (NULL, buf1, CYG_MAX_PATH);
+ char buf1[PATH_MAX];
+ len = GetModuleFileName (NULL, buf1, PATH_MAX);
strlwr (buf1);
strlwr (buf);
char *p = strpbrk (buf, ":=");
@@ -871,7 +871,7 @@ dll_crt0_1 (void *)
win32 style. */
if ((strchr (__argv[0], ':')) || (strchr (__argv[0], '\\')))
{
- char *new_argv0 = (char *) malloc (CYG_MAX_PATH);
+ char *new_argv0 = (char *) malloc (PATH_MAX);
cygwin_conv_to_posix_path (__argv[0], new_argv0);
__argv[0] = (char *) realloc (new_argv0, strlen (new_argv0) + 1);
}