diff options
Diffstat (limited to 'winsup/cygwin/globals.cc')
-rw-r--r-- | winsup/cygwin/globals.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc index dfdeec587..c482fae52 100644 --- a/winsup/cygwin/globals.cc +++ b/winsup/cygwin/globals.cc @@ -72,6 +72,31 @@ char NO_COPY almost_null[1]; char *old_title; +/* Heavily-used const UNICODE_STRINGs are defined here once. */ +#define _ROU(_s) \ + { Length: sizeof (_s) - sizeof (WCHAR), \ + MaximumLength: sizeof (_s), \ + Buffer: (PWSTR) (_s) } +#define _RDATA __attribute__ ((section(".rdata"))) +UNICODE_STRING _RDATA ro_u_empty = _ROU (L""); +UNICODE_STRING _RDATA ro_u_lnk = _ROU (L".lnk"); +UNICODE_STRING _RDATA ro_u_exe = _ROU (L".exe"); +UNICODE_STRING _RDATA ro_u_com = _ROU (L".com"); +UNICODE_STRING _RDATA ro_u_proc = _ROU (L"proc"); +UNICODE_STRING _RDATA ro_u_pmem = _ROU (L"\\device\\physicalmemory"); +UNICODE_STRING _RDATA ro_u_mtx = _ROU (L"mtx"); +UNICODE_STRING _RDATA ro_u_fat = _ROU (L"FAT"); +UNICODE_STRING _RDATA ro_u_csc = _ROU (L"CSC-CACHE"); +UNICODE_STRING _RDATA ro_u_ntfs = _ROU (L"NTFS"); +UNICODE_STRING _RDATA ro_u_nfs = _ROU (L"NFS"); +UNICODE_STRING _RDATA ro_u_unixfs = _ROU (L"UNIXFS"); +UNICODE_STRING _RDATA ro_u_sunwnfs = _ROU (L"SUNWNFS"); +UNICODE_STRING _RDATA ro_u_udf = _ROU (L"UDF"); +UNICODE_STRING _RDATA ro_u_natp = _ROU (L"\\??\\"); +UNICODE_STRING _RDATA ro_u_uncp = _ROU (L"\\??\\UNC\\"); +#undef _RDATA +#undef _ROU + extern "C" { /* This is an exported copy of environ which can be used by DLLs |