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:
authorChristopher Faylor <me@cgf.cx>2006-04-13 05:37:00 +0400
committerChristopher Faylor <me@cgf.cx>2006-04-13 05:37:00 +0400
commit2e9d484382fe45ff1dcd325be0992b1857f9498d (patch)
tree7f5255426ee768252260a908ffd9bec6cf87b108 /winsup/cygwin/winf.h
parenta5eaf568177c2d765f704490eb56628e9cec653d (diff)
* spawn.cc (spawn_guts): Revert patch which treated derived cygwin programs
differently from those which are mounted with -X. Pass extra argument to linebuf::fromargv. * winf.h (MAXCYGWINCMDLEN): New define. (linebuf::finish): Add a new argument denoting when command line overflow is ok. (linebuf::fromargv): Ditto. * winf.cc (linebuf::finish): Implement above change. (linebuf::fromargv): Ditto.
Diffstat (limited to 'winsup/cygwin/winf.h')
-rw-r--r--winsup/cygwin/winf.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/winsup/cygwin/winf.h b/winsup/cygwin/winf.h
index 3b7fec23b..209091468 100644
--- a/winsup/cygwin/winf.h
+++ b/winsup/cygwin/winf.h
@@ -9,6 +9,14 @@ details. */
#ifndef _WINF_H
#define _WINF_H
+/* Hack for Cygwin processes. If the Windows command line length gets slightly
+ bigger than this value, the stack position is suddenly moved up by 64K for
+ no apparent reason, which results in subsequent forks failing. Since Cygwin
+ processes get the full command line as argv array anyway, this only affects
+ the maximum command line length of Cygwin applications which non-sensically
+ have a WinMain instead of a main entry point. */
+#define MAXCYGWINCMDLEN 31767
+
#define MAXWINCMDLEN 32767
#define LINE_BUF_CHUNK (CYG_MAX_PATH * 2)
@@ -74,8 +82,8 @@ class linebuf
void add (const char *what, int len) __attribute__ ((regparm (3)));
void add (const char *what) {add (what, strlen (what));}
void prepend (const char *what, int len);
- void finish () __attribute__ ((regparm (1)));
- bool fromargv(av&, char *);
+ void finish (bool) __attribute__ ((regparm (2)));
+ bool fromargv(av&, char *, bool) __attribute__ ((regparm (3)));;
operator char *() {return buf;}
};