
D front-end changes: - Import dmd v2.101.0-beta.1. - Add predefined version `D_Optimized' when compiling with `-O'. - Shortened method syntax (DIP1043) is now enabled by default. - Array literals assigned to `scope' array variables are now allocated on the stack. - Implement `@system' variables (DIP1035), available behind the preview feature flag `-fpreview=systemvariables'. D runtime changes: - Import druntime v2.101.0-beta.1. Phobos changes: - Import phobos v2.101.0-beta.1. - Added `std.typecons.SafeRefCounted', that can be used in `@safe' code with `-fpreview=dip1000'. gcc/d/ChangeLog: * d-attribs.cc (apply_user_attributes): Update for new front-end interface. * d-builtins.cc (d_init_versions): Predefine `D_Optimized' with compiling with optimizations enabled. * d-lang.cc (d_handle_option): Update for new front-end interface. Handle new option `-fpreview=systemvariables'. * dmd/MERGE: Merge upstream dmd e4f8919591. * dmd/VERSION: Bump version to v2.101.0-beta.1. * expr.cc (ExprVisitor::visit (AssignExp *)): Treat construction of static arrays from a call expression as a simple assignment. (ExprVisitor::visit (ArrayLiteralExp *)): Handle array literals with `scope' storage. * gdc.texi: Update documentation of `-fpreview=' options. * lang.opt (fpreview=shortenedmethods): Remove. (fpreview=systemvariables): New option. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime e4f8919591. * src/MERGE: Merge upstream phobos 3ad507b51. gcc/testsuite/ChangeLog: * gdc.dg/simd19630.d: Move tests with errors to ... * gdc.dg/simd19630b.d: ... here. New test. * gdc.dg/simd19630c.d: New test. * gdc.dg/simd_ctfe.d: Removed. * gdc.dg/simd18867.d: New test. * gdc.dg/simd19788.d: New test. * gdc.dg/simd21469.d: New test. * gdc.dg/simd21672.d: New test. * gdc.dg/simd23077.d: New test. * gdc.dg/simd23084.d: New test. * gdc.dg/simd23085.d: New test. * gdc.dg/torture/simd19632.d: New test. * gdc.dg/torture/simd20041.d: New test. * gdc.dg/torture/simd21673.d: New test. * gdc.dg/torture/simd21676.d: New test. * gdc.dg/torture/simd22438.d: New test. * gdc.dg/torture/simd23009.d: New test. * gdc.dg/torture/simd23077.d: New test. * gdc.dg/torture/simd8.d: New test. * gdc.dg/torture/simd9.d: New test. * gdc.dg/torture/simd_prefetch.d: New test.
164 lines
5.3 KiB
D
164 lines
5.3 KiB
D
/**
|
|
* Windows API header module
|
|
*
|
|
* Translated from MinGW Windows headers
|
|
*
|
|
* Authors: Stewart Gordon
|
|
* License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
|
|
* Source: $(DRUNTIMESRC core/sys/windows/_nddeapi.d)
|
|
*/
|
|
module core.sys.windows.nddeapi;
|
|
version (Windows):
|
|
|
|
version (ANSI) {} else version = Unicode;
|
|
|
|
import core.sys.windows.windef;
|
|
|
|
// FIXME: check types and grouping of constants
|
|
|
|
/+
|
|
#ifndef CNLEN /* also in lmcons.h */
|
|
#define CNLEN 15
|
|
#define UNCLEN (CNLEN + 2)
|
|
#endif
|
|
+/
|
|
|
|
enum char SEP_CHAR = ',';
|
|
const char[] BAR_CHAR = "|";
|
|
enum wchar SEP_WCHAR = ',';
|
|
const wchar[] BAR_WCHAR = "|";
|
|
|
|
enum {
|
|
NDDE_NO_ERROR,
|
|
NDDE_ACCESS_DENIED,
|
|
NDDE_BUF_TOO_SMALL,
|
|
NDDE_ERROR_MORE_DATA,
|
|
NDDE_INVALID_SERVER,
|
|
NDDE_INVALID_SHARE,
|
|
NDDE_INVALID_PARAMETER,
|
|
NDDE_INVALID_LEVEL,
|
|
NDDE_INVALID_PASSWORD,
|
|
NDDE_INVALID_ITEMNAME,
|
|
NDDE_INVALID_TOPIC,
|
|
NDDE_INTERNAL_ERROR,
|
|
NDDE_OUT_OF_MEMORY,
|
|
NDDE_INVALID_APPNAME,
|
|
NDDE_NOT_IMPLEMENTED,
|
|
NDDE_SHARE_ALREADY_EXIST,
|
|
NDDE_SHARE_NOT_EXIST,
|
|
NDDE_INVALID_FILENAME,
|
|
NDDE_NOT_RUNNING,
|
|
NDDE_INVALID_WINDOW,
|
|
NDDE_INVALID_SESSION,
|
|
NDDE_INVALID_ITEM_LIST,
|
|
NDDE_SHARE_DATA_CORRUPTED,
|
|
NDDE_REGISTRY_ERROR,
|
|
NDDE_CANT_ACCESS_SERVER,
|
|
NDDE_INVALID_SPECIAL_COMMAND,
|
|
NDDE_INVALID_SECURITY_DESC,
|
|
NDDE_TRUST_SHARE_FAIL
|
|
}
|
|
|
|
enum size_t
|
|
MAX_NDDESHARENAME = 256,
|
|
MAX_DOMAINNAME = 15,
|
|
MAX_USERNAME = 15,
|
|
MAX_APPNAME = 255,
|
|
MAX_TOPICNAME = 255,
|
|
MAX_ITEMNAME = 255;
|
|
|
|
enum NDDEF_NOPASSWORDPROMPT = 1;
|
|
enum NDDEF_NOCACHELOOKUP = 2;
|
|
enum NDDEF_STRIP_NDDE = 4;
|
|
|
|
enum SHARE_TYPE_OLD = 1;
|
|
enum SHARE_TYPE_NEW = 2;
|
|
enum SHARE_TYPE_STATIC = 4;
|
|
|
|
enum uint
|
|
NDDE_CMD_SHOW_MASK = 0x0000FFFF,
|
|
NDDE_TRUST_CMD_SHOW = 0x10000000,
|
|
NDDE_TRUST_SHARE_DEL = 0x20000000,
|
|
NDDE_TRUST_SHARE_INIT = 0x40000000,
|
|
NDDE_TRUST_SHARE_START = 0x80000000;
|
|
|
|
struct NDdeShareInfo_tag {
|
|
LONG lRevision;
|
|
LPTSTR lpszShareName;
|
|
LONG lShareType;
|
|
LPTSTR lpszAppTopicList;
|
|
LONG fSharedFlag;
|
|
LONG fService;
|
|
LONG fStartAppFlag;
|
|
LONG nCmdShow;
|
|
LONG[2] qModifyId;
|
|
LONG cNumItems;
|
|
LPTSTR lpszItemList;
|
|
}
|
|
extern (C) { // huh?
|
|
NDdeShareInfo_tag NDDESHAREINFO;
|
|
NDdeShareInfo_tag* PNDDESHAREINFO;
|
|
}
|
|
|
|
extern (Windows) {
|
|
UINT NDdeGetErrorStringA(UINT, LPSTR, DWORD);
|
|
UINT NDdeGetErrorStringW(UINT, LPWSTR, DWORD);
|
|
UINT NDdeGetShareSecurityA(LPSTR, LPSTR, SECURITY_INFORMATION,
|
|
PSECURITY_DESCRIPTOR, DWORD, PDWORD);
|
|
UINT NDdeGetShareSecurityW(LPWSTR, LPWSTR, SECURITY_INFORMATION,
|
|
PSECURITY_DESCRIPTOR, DWORD, PDWORD);
|
|
UINT NDdeGetTrustedShareA(LPSTR, LPSTR, PDWORD, PDWORD, PDWORD);
|
|
UINT NDdeGetTrustedShareW(LPWSTR, LPWSTR, PDWORD, PDWORD, PDWORD);
|
|
BOOL NDdeIsValidShareNameA(LPSTR);
|
|
BOOL NDdeIsValidShareNameW(LPWSTR);
|
|
BOOL NDdeIsValidAppTopicListA(LPSTR);
|
|
BOOL NDdeIsValidAppTopicListW(LPWSTR);
|
|
UINT NDdeSetShareSecurityA(LPSTR, LPSTR, SECURITY_INFORMATION,
|
|
PSECURITY_DESCRIPTOR);
|
|
UINT NDdeSetShareSecurityW(LPWSTR, LPWSTR, SECURITY_INFORMATION,
|
|
PSECURITY_DESCRIPTOR);
|
|
UINT NDdeSetTrustedShareA(LPSTR, LPSTR, DWORD);
|
|
UINT NDdeSetTrustedShareW(LPWSTR, LPWSTR, DWORD);
|
|
UINT NDdeShareAddA(LPSTR, UINT, PSECURITY_DESCRIPTOR, PBYTE, DWORD);
|
|
UINT NDdeShareAddW(LPWSTR, UINT, PSECURITY_DESCRIPTOR, PBYTE, DWORD);
|
|
UINT NDdeShareDelA(LPSTR, LPSTR, UINT);
|
|
UINT NDdeShareDelW(LPWSTR, LPWSTR, UINT);
|
|
UINT NDdeShareEnumA(LPSTR, UINT, PBYTE, DWORD, PDWORD, PDWORD);
|
|
UINT NDdeShareEnumW(LPWSTR, UINT, PBYTE, DWORD, PDWORD, PDWORD);
|
|
UINT NDdeShareGetInfoA(LPSTR, LPSTR, UINT, PBYTE, DWORD, PDWORD, PWORD);
|
|
UINT NDdeShareGetInfoW(LPWSTR, LPWSTR, UINT, PBYTE, DWORD, PDWORD, PWORD);
|
|
UINT NDdeShareSetInfoA(LPSTR, LPSTR, UINT, PBYTE, DWORD, WORD);
|
|
UINT NDdeShareSetInfoW(LPWSTR, LPWSTR, UINT, PBYTE, DWORD, WORD);
|
|
UINT NDdeTrustedShareEnumA(LPSTR, UINT, PBYTE, DWORD, PDWORD, PDWORD);
|
|
UINT NDdeTrustedShareEnumW(LPWSTR, UINT, PBYTE, DWORD, PDWORD, PDWORD);
|
|
}
|
|
|
|
version (Unicode) {
|
|
alias NDdeShareAddW NDdeShareAdd;
|
|
alias NDdeShareDelW NDdeShareDel;
|
|
alias NDdeSetShareSecurityW NDdeSetShareSecurity;
|
|
alias NDdeGetShareSecurityW NDdeGetShareSecurity;
|
|
alias NDdeShareEnumW NDdeShareEnum;
|
|
alias NDdeShareGetInfoW NDdeShareGetInfo;
|
|
alias NDdeShareSetInfoW NDdeShareSetInfo;
|
|
alias NDdeGetErrorStringW NDdeGetErrorString;
|
|
alias NDdeIsValidShareNameW NDdeIsValidShareName;
|
|
alias NDdeIsValidAppTopicListW NDdeIsValidAppTopicList;
|
|
alias NDdeSetTrustedShareW NDdeSetTrustedShare;
|
|
alias NDdeGetTrustedShareW NDdeGetTrustedShare;
|
|
alias NDdeTrustedShareEnumW NDdeTrustedShareEnum;
|
|
} else {
|
|
alias NDdeShareAddA NDdeShareAdd;
|
|
alias NDdeShareDelA NDdeShareDel;
|
|
alias NDdeSetShareSecurityA NDdeSetShareSecurity;
|
|
alias NDdeGetShareSecurityA NDdeGetShareSecurity;
|
|
alias NDdeShareEnumA NDdeShareEnum;
|
|
alias NDdeShareGetInfoA NDdeShareGetInfo;
|
|
alias NDdeShareSetInfoA NDdeShareSetInfo;
|
|
alias NDdeGetErrorStringA NDdeGetErrorString;
|
|
alias NDdeIsValidShareNameA NDdeIsValidShareName;
|
|
alias NDdeIsValidAppTopicListA NDdeIsValidAppTopicList;
|
|
alias NDdeSetTrustedShareA NDdeSetTrustedShare;
|
|
alias NDdeGetTrustedShareA NDdeGetTrustedShare;
|
|
alias NDdeTrustedShareEnumA NDdeTrustedShareEnum;
|
|
}
|