diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-03-11 11:42:00 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-03-11 11:42:00 +0000 |
commit | becf251f67689f14e1f9f3ba04b4b2ad586fc77e (patch) | |
tree | 268bedae59386c798cab8889834a2dba822d197f /winsup/cygwin/winf.cc | |
parent | ff488124ff455b4fe3271282b1585adea74eb84d (diff) | |
download | cygnal-becf251f67689f14e1f9f3ba04b4b2ad586fc77e.tar.gz cygnal-becf251f67689f14e1f9f3ba04b4b2ad586fc77e.tar.bz2 cygnal-becf251f67689f14e1f9f3ba04b4b2ad586fc77e.zip |
* environ.cc (parse_options): Use tmp_pathbuf to allocate buffer.
(regopt): Take tmp buffer as additional argument.
(environ_init): Alllcate tmpbuf earlier. Use as temporary buffer in
call to regopt.
* tls_pbuf.cc (tmp_pathbuf::c_get): Allocate one additional char.
(tmp_pathbuf::w_get): Allocate one additional WCHAR.
* winf.cc (av::unshift): Use tmp_pathbuf to allocate buffer.
Diffstat (limited to 'winsup/cygwin/winf.cc')
-rw-r--r-- | winsup/cygwin/winf.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/winsup/cygwin/winf.cc b/winsup/cygwin/winf.cc index 924e60403..033de7b1e 100644 --- a/winsup/cygwin/winf.cc +++ b/winsup/cygwin/winf.cc @@ -15,6 +15,7 @@ details. */ #include "fhandler.h" #include "dtable.h" #include "cygheap.h" +#include "tls_pbuf.h" #include "winf.h" #include "sys/cygwin.h" @@ -136,7 +137,8 @@ av::unshift (const char *what, int conv) argv = av; memmove (argv + 1, argv, (argc + 1) * sizeof (char *)); - char buf[CYG_MAX_PATH]; + tmp_pathbuf tp; + char *buf = tp.c_get (); if (conv) { cygwin_conv_to_posix_path (what, buf); |