diff options
Diffstat (limited to 'winsup/cygwin/tls_pbuf.h')
-rw-r--r-- | winsup/cygwin/tls_pbuf.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/winsup/cygwin/tls_pbuf.h b/winsup/cygwin/tls_pbuf.h index b4a2a7a37..d4143aaf1 100644 --- a/winsup/cygwin/tls_pbuf.h +++ b/winsup/cygwin/tls_pbuf.h @@ -17,4 +17,11 @@ public: char *c_get (); /* Create temporary TLS path buf of size NT_MAX_PATH. */ PWCHAR w_get (); /* Create temporary TLS path buf of size 2 * NT_MAX_PATH. */ inline char *t_get () { return (char *) w_get (); } + inline PUNICODE_STRING u_get (PUNICODE_STRING up) + { + up->Length = 0; + up->MaximumLength = (NT_MAX_PATH - 1) * sizeof (WCHAR); + up->Buffer = w_get (); + return up; + } }; |