mirror of
https://github.com/openRuyi-Project/gcc.git
synced 2026-09-07 06:22:00 +00:00
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.
169 lines
6.5 KiB
D
169 lines
6.5 KiB
D
/**
|
|
* Windows API header module
|
|
*
|
|
* Translated from MinGW Windows headers
|
|
*
|
|
* License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
|
|
* Source: $(DRUNTIMESRC core/sys/windows/_odbcinst.d)
|
|
*/
|
|
module core.sys.windows.odbcinst;
|
|
version (Windows):
|
|
|
|
version (ANSI) {} else version = Unicode;
|
|
|
|
import core.sys.windows.sql;
|
|
import core.sys.windows.windef;
|
|
|
|
/* FIXME: The Unicode/Ansi functions situation is a mess. How do the xxxA
|
|
* versions of these functions fit into the scheme?
|
|
*/
|
|
|
|
// SQLConfigDataSource()
|
|
enum : WORD {
|
|
ODBC_ADD_DSN = 1,
|
|
ODBC_CONFIG_DSN = 2,
|
|
ODBC_REMOVE_DSN = 3,
|
|
ODBC_ADD_SYS_DSN = 4,
|
|
ODBC_CONFIG_SYS_DSN = 5,
|
|
ODBC_REMOVE_SYS_DSN = 6,
|
|
ODBC_REMOVE_DEFAULT_DSN = 7
|
|
}
|
|
|
|
// ODBC 3.0+
|
|
enum : WORD {
|
|
ODBC_INSTALL_INQUIRY = 1,
|
|
ODBC_INSTALL_COMPLETE = 2
|
|
}
|
|
|
|
// ODBC 2.5+
|
|
enum : WORD {
|
|
ODBC_INSTALL_DRIVER = 1,
|
|
ODBC_REMOVE_DRIVER = 2,
|
|
ODBC_CONFIG_DRIVER = 3,
|
|
ODBC_CONFIG_DRIVER_MAX = 100
|
|
}
|
|
|
|
// ODBC 3.0+
|
|
// SQLSetConfigMode()
|
|
enum : UWORD {
|
|
ODBC_BOTH_DSN = 0,
|
|
ODBC_USER_DSN = 1,
|
|
ODBC_SYSTEM_DSN = 2
|
|
}
|
|
|
|
enum : DWORD {
|
|
ODBC_ERROR_GENERAL_ERR = 1,
|
|
ODBC_ERROR_INVALID_BUFF_LEN = 2,
|
|
ODBC_ERROR_INVALID_HWND = 3,
|
|
ODBC_ERROR_INVALID_STR = 4,
|
|
ODBC_ERROR_INVALID_REQUEST_TYPE = 5,
|
|
ODBC_ERROR_COMPONENT_NOT_FOUND = 6,
|
|
ODBC_ERROR_INVALID_NAME = 7,
|
|
ODBC_ERROR_INVALID_KEYWORD_VALUE = 8,
|
|
ODBC_ERROR_INVALID_DSN = 9,
|
|
ODBC_ERROR_INVALID_INF = 10,
|
|
ODBC_ERROR_REQUEST_FAILED = 11,
|
|
ODBC_ERROR_INVALID_PATH = 12,
|
|
ODBC_ERROR_LOAD_LIB_FAILED = 13,
|
|
ODBC_ERROR_INVALID_PARAM_SEQUENCE = 14,
|
|
ODBC_ERROR_INVALID_LOG_FILE = 15,
|
|
ODBC_ERROR_USER_CANCELED = 16,
|
|
ODBC_ERROR_USAGE_UPDATE_FAILED = 17,
|
|
ODBC_ERROR_CREATE_DSN_FAILED = 18,
|
|
ODBC_ERROR_WRITING_SYSINFO_FAILED = 19,
|
|
ODBC_ERROR_REMOVE_DSN_FAILED = 20,
|
|
ODBC_ERROR_OUT_OF_MEM = 21,
|
|
ODBC_ERROR_OUTPUT_STRING_TRUNCATED = 22
|
|
}
|
|
|
|
extern (Windows):
|
|
BOOL ConfigDSN(HWND,WORD,LPCSTR,LPCSTR);
|
|
BOOL ConfigDSNW(HWND,WORD,LPCWSTR,LPCWSTR);
|
|
BOOL ConfigTranslator(HWND,DWORD*);
|
|
BOOL SQLConfigDataSource(HWND,WORD,LPCSTR,LPCSTR);
|
|
BOOL SQLConfigDataSourceW(HWND,WORD,LPCWSTR,LPCWSTR);
|
|
BOOL SQLCreateDataSource(HWND,LPCSTR);
|
|
BOOL SQLCreateDataSourceW(HWND,LPCWSTR);
|
|
BOOL SQLGetAvailableDrivers(LPCSTR,LPSTR,WORD,WORD*);
|
|
BOOL SQLGetAvailableDriversW(LPCWSTR,LPWSTR,WORD,WORD*);
|
|
BOOL SQLGetInstalledDrivers(LPSTR,WORD,WORD*);
|
|
BOOL SQLGetInstalledDriversW(LPWSTR,WORD,WORD*);
|
|
int SQLGetPrivateProfileString(LPCSTR,LPCSTR,LPCSTR,LPSTR,int,LPCSTR);
|
|
int SQLGetPrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,int,LPCWSTR);
|
|
BOOL SQLGetTranslator(HWND,LPSTR,WORD,WORD*,LPSTR,WORD,WORD*,DWORD*);
|
|
BOOL SQLGetTranslatorW(HWND,LPWSTR,WORD,WORD*,LPWSTR,WORD,WORD*,DWORD*);
|
|
BOOL SQLInstallDriver(LPCSTR,LPCSTR,LPSTR,WORD,WORD*);
|
|
BOOL SQLInstallDriverManager(LPSTR,WORD,WORD*);
|
|
BOOL SQLInstallDriverManagerW(LPWSTR,WORD,WORD*);
|
|
BOOL SQLInstallDriverW(LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*);
|
|
BOOL SQLInstallODBC(HWND,LPCSTR,LPCSTR,LPCSTR);
|
|
BOOL SQLInstallODBCW(HWND,LPCWSTR,LPCWSTR,LPCWSTR);
|
|
BOOL SQLManageDataSources(HWND);
|
|
BOOL SQLRemoveDefaultDataSource();
|
|
BOOL SQLRemoveDSNFromIni(LPCSTR);
|
|
BOOL SQLRemoveDSNFromIniW(LPCWSTR);
|
|
BOOL SQLValidDSN(LPCSTR);
|
|
BOOL SQLValidDSNW(LPCWSTR);
|
|
BOOL SQLWriteDSNToIni(LPCSTR,LPCSTR);
|
|
BOOL SQLWriteDSNToIniW(LPCWSTR,LPCWSTR);
|
|
BOOL SQLWritePrivateProfileString(LPCSTR,LPCSTR,LPCSTR,LPCSTR);
|
|
BOOL SQLWritePrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
|
|
|
|
static if (ODBCVER >= 0x0250) {
|
|
BOOL ConfigDriver(HWND,WORD,LPCSTR,LPCSTR,LPSTR,WORD,WORD*);
|
|
BOOL ConfigDriverW(HWND,WORD,LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*);
|
|
BOOL SQLConfigDriver(HWND,WORD,LPCSTR,LPCSTR,LPSTR,WORD,WORD*);
|
|
BOOL SQLConfigDriverW(HWND,WORD,LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*);
|
|
deprecated ("Use SQLInstallTranslatorExW instead") {
|
|
BOOL SQLInstallTranslator(LPCSTR,LPCSTR,LPCSTR,LPSTR,WORD,WORD*,WORD,LPDWORD);
|
|
BOOL SQLInstallTranslatorW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*,WORD,LPDWORD);
|
|
}
|
|
BOOL SQLRemoveDriver(LPCSTR,BOOL,LPDWORD);
|
|
BOOL SQLRemoveDriverManager(LPDWORD);
|
|
BOOL SQLRemoveDriverW(LPCWSTR,BOOL,LPDWORD);
|
|
BOOL SQLRemoveTranslator(LPCSTR,LPDWORD);
|
|
BOOL SQLRemoveTranslatorW(LPCWSTR,LPDWORD);
|
|
}
|
|
static if (ODBCVER >= 0x0300) {
|
|
BOOL SQLGetConfigMode(UWORD*);
|
|
BOOL SQLInstallDriverEx(LPCSTR,LPCSTR,LPSTR,WORD,WORD*,WORD,LPDWORD);
|
|
BOOL SQLInstallDriverExW(LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*,WORD,LPDWORD);
|
|
SQLRETURN SQLInstallerError(WORD,DWORD*,LPSTR,WORD,WORD*);
|
|
SQLRETURN SQLInstallerErrorW(WORD,DWORD*,LPWSTR,WORD,WORD*);
|
|
BOOL SQLInstallTranslatorEx(LPCSTR,LPCSTR,LPSTR,WORD,WORD*,WORD,LPDWORD);
|
|
BOOL SQLInstallTranslatorExW(LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*,WORD,LPDWORD);
|
|
SQLRETURN SQLPostInstallerError(DWORD,LPCSTR);
|
|
SQLRETURN SQLPostInstallerErrorW(DWORD,LPCWSTR);
|
|
BOOL SQLReadFileDSN(LPCSTR,LPCSTR,LPCSTR,LPSTR,WORD,WORD*);
|
|
BOOL SQLReadFileDSNW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*);
|
|
BOOL SQLSetConfigMode(UWORD);
|
|
BOOL SQLWriteFileDSN(LPCSTR,LPCSTR,LPCSTR,LPCSTR);
|
|
BOOL SQLWriteFileDSNW(LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
|
|
}
|
|
|
|
version (Unicode) {
|
|
alias SQLConfigDataSourceW SQLConfigDataSource;
|
|
alias SQLConfigDriverW SQLConfigDriver;
|
|
alias SQLCreateDataSourceW SQLCreateDataSource;
|
|
alias SQLGetAvailableDriversW SQLGetAvailableDrivers;
|
|
alias SQLGetInstalledDriversW SQLGetInstalledDrivers;
|
|
alias SQLGetPrivateProfileStringW SQLGetPrivateProfileString;
|
|
alias SQLGetTranslatorW SQLGetTranslator;
|
|
alias SQLInstallDriverW SQLInstallDriver;
|
|
alias SQLInstallDriverExW SQLInstallDriverEx;
|
|
alias SQLInstallDriverManagerW SQLInstallDriverManager;
|
|
alias SQLInstallerErrorW SQLInstallerError;
|
|
alias SQLInstallODBCW SQLInstallODBC;
|
|
deprecated alias SQLInstallTranslatorW SQLInstallTranslator;
|
|
alias SQLInstallTranslatorExW SQLInstallTranslatorEx;
|
|
alias SQLPostInstallerErrorW SQLPostInstallerError;
|
|
alias SQLReadFileDSNW SQLReadFileDSN;
|
|
alias SQLRemoveDriverW SQLRemoveDriver;
|
|
alias SQLRemoveDSNFromIniW SQLRemoveDSNFromIni;
|
|
alias SQLRemoveTranslatorW SQLRemoveTranslator;
|
|
alias SQLValidDSNW SQLValidDSN;
|
|
alias SQLWriteDSNToIniW SQLWriteDSNToIni;
|
|
alias SQLWriteFileDSNW SQLWriteFileDSN;
|
|
alias SQLWritePrivateProfileStringW SQLWritePrivateProfileString;
|
|
}
|