* 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.
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user