widl: Updated to current Wine version git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@5095 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-tools/widl/include/winbase.h b/mingw-w64-tools/widl/include/winbase.h index 2cb3d1a..8b5805c 100644 --- a/mingw-w64-tools/widl/include/winbase.h +++ b/mingw-w64-tools/widl/include/winbase.h
@@ -1634,6 +1634,8 @@ WINADVAPI BOOL WINAPI GetCurrentHwProfileW(LPHW_PROFILE_INFOW); #define GetCurrentHwProfile WINELIB_NAME_AW(GetCurrentHwProfile) WINBASEAPI HANDLE WINAPI GetCurrentProcess(void); +WINBASEAPI DWORD WINAPI GetCurrentProcessorNumber(void); +WINBASEAPI VOID WINAPI GetCurrentProcessorNumberEx(PPROCESSOR_NUMBER); WINBASEAPI HANDLE WINAPI GetCurrentThread(void); #define GetCurrentTime() GetTickCount() WINBASEAPI BOOL WINAPI GetDefaultCommConfigA(LPCSTR,LPCOMMCONFIG,LPDWORD);
diff --git a/mingw-w64-tools/widl/include/wine/wpp.h b/mingw-w64-tools/widl/include/wine/wpp.h index 2d284f1..ac180be 100644 --- a/mingw-w64-tools/widl/include/wine/wpp.h +++ b/mingw-w64-tools/widl/include/wine/wpp.h
@@ -29,12 +29,12 @@ /* I/O callbacks */ /* Looks for a file to include, returning the path where it is found */ - /* parent_name is the directory of the parent source file (for local - * includes), includepath is an array of additional include paths */ - char *(*lookup)( const char *filename, const char *parent_name, + /* The type param is true for local (#include "filename.h") includes */ + /* parent_name is the directory of the parent source file, includepath + * is an array of additional include paths */ + char *(*lookup)( const char *filename, int type, const char *parent_name, char **include_path, int include_path_count ); /* Opens an include file */ - /* The type param is true if it is a local ("...") include */ void *(*open)( const char *filename, int type ); /* Closes a previously opened file */ void (*close)( void *file );
diff --git a/mingw-w64-tools/widl/include/winnls.h b/mingw-w64-tools/widl/include/winnls.h index c7da119..b52209c 100644 --- a/mingw-w64-tools/widl/include/winnls.h +++ b/mingw-w64-tools/widl/include/winnls.h
@@ -667,6 +667,19 @@ DECL_WINELIB_TYPE_AW(CURRENCYFMT) DECL_WINELIB_TYPE_AW(LPCURRENCYFMT) +typedef struct _nlsversioninfo { + DWORD dwNLSVersionInfoSize; + DWORD dwNLSVersion; + DWORD dwDefinedVersion; +} NLSVERSIONINFO, *LPNLSVERSIONINFO; + +typedef struct _nlsversioninfoex { + DWORD dwNLSVersionInfoSize; + DWORD dwNLSVersion; + DWORD dwDefinedVersion; + DWORD dwEffectiveId; + GUID guidCustomVersion; +} NLSVERSIONINFOEX, *LPNLSVERSIONINFOEX; /* Define a bunch of callback types */ @@ -849,6 +862,7 @@ WINBASEAPI INT WINAPI LCMapStringA(LCID,DWORD,LPCSTR,INT,LPSTR,INT); WINBASEAPI INT WINAPI LCMapStringW(LCID,DWORD,LPCWSTR,INT,LPWSTR,INT); #define LCMapString WINELIB_NAME_AW(LCMapString) +WINBASEAPI INT WINAPI LCMapStringEx(LPCWSTR,DWORD,LPCWSTR,INT,LPWSTR,INT,LPNLSVERSIONINFO,LPVOID,LPARAM); WINBASEAPI LCID WINAPI LocaleNameToLCID(LPCWSTR,DWORD); WINBASEAPI INT WINAPI MultiByteToWideChar(UINT,DWORD,LPCSTR,INT,LPWSTR,INT); WINNORMALIZEAPI INT WINAPI NormalizeString(NORM_FORM,LPCWSTR,INT,LPWSTR,INT);
diff --git a/mingw-w64-tools/widl/include/winnt.h b/mingw-w64-tools/widl/include/winnt.h index 9bde031..6903d34 100644 --- a/mingw-w64-tools/widl/include/winnt.h +++ b/mingw-w64-tools/widl/include/winnt.h
@@ -1969,46 +1969,92 @@ /* * Product types */ -#define PRODUCT_UNLICENSED 0xABCDABCD -#define PRODUCT_BUSINESS 0x00000006 -#define PRODUCT_BUSINESS_N 0x00000010 -#define PRODUCT_CLUSTER_SERVER 0x00000012 -#define PRODUCT_DATACENTER_SERVER 0x00000008 -#define PRODUCT_DATACENTER_SERVER_CORE 0x0000000C -#define PRODUCT_DATACENTER_SERVER_CORE_V 0x00000027 -#define PRODUCT_SERVER_V 0x00000025 -#define PRODUCT_ENTERPRISE 0x00000004 -#define PRODUCT_ENTERPRISE_N 0x0000001B -#define PRODUCT_ENTERPRISE_SERVER 0x0000000A -#define PRODUCT_ENTERPRISE_SERVER_CORE 0x0000000E -#define PRODUCT_ENTERPRISE_SERVER_CORE_V 0x00000029 -#define PRODUCT_ENTERPRISE_SERVER_IA64 0x0000000F -#define PRODUCT_ENTERPRISE_SERVER_V 0x00000026 +#define PRODUCT_UNDEFINED 0x00000000 +#define PRODUCT_ULTIMATE 0x00000001 #define PRODUCT_HOME_BASIC 0x00000002 -#define PRODUCT_HOME_BASIC_N 0x00000005 #define PRODUCT_HOME_PREMIUM 0x00000003 -#define PRODUCT_HOME_PREMIUM_N 0x0000001A -#define PRODUCT_HYPERV 0x0000002A -#define PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT 0x0000001E -#define PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING 0x00000020 -#define PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY 0x0000001F -#define PRODUCT_SERVER_FOR_SMALLBUSINESS 0x00000018 -#define PRODUCT_SERVER_FOR_SMALLBUSINESS_V 0x00000023 -#define PRODUCT_SMALLBUSINESS_SERVER 0x00000009 +#define PRODUCT_ENTERPRISE 0x00000004 +#define PRODUCT_HOME_BASIC_N 0x00000005 +#define PRODUCT_BUSINESS 0x00000006 #define PRODUCT_STANDARD_SERVER 0x00000007 -#define PRODUCT_STANDARD_SERVER_CORE 0x0000000D -#define PRODUCT_STANDARD_SERVER_CORE_V 0x00000028 -#define PRODUCT_STANDARD_SERVER_V 0x00000024 +#define PRODUCT_DATACENTER_SERVER 0x00000008 +#define PRODUCT_SMALLBUSINESS_SERVER 0x00000009 +#define PRODUCT_ENTERPRISE_SERVER 0x0000000A #define PRODUCT_STARTER 0x0000000B -#define PRODUCT_STORAGE_ENTERPRISE_SERVER 0x00000017 +#define PRODUCT_DATACENTER_SERVER_CORE 0x0000000C +#define PRODUCT_STANDARD_SERVER_CORE 0x0000000D +#define PRODUCT_ENTERPRISE_SERVER_CORE 0x0000000E +#define PRODUCT_ENTERPRISE_SERVER_IA64 0x0000000F +#define PRODUCT_BUSINESS_N 0x00000010 +#define PRODUCT_WEB_SERVER 0x00000011 +#define PRODUCT_CLUSTER_SERVER 0x00000012 +#define PRODUCT_HOME_SERVER 0x00000013 #define PRODUCT_STORAGE_EXPRESS_SERVER 0x00000014 #define PRODUCT_STORAGE_STANDARD_SERVER 0x00000015 #define PRODUCT_STORAGE_WORKGROUP_SERVER 0x00000016 -#define PRODUCT_UNDEFINED 0x00000000 -#define PRODUCT_ULTIMATE 0x00000001 +#define PRODUCT_STORAGE_ENTERPRISE_SERVER 0x00000017 +#define PRODUCT_SERVER_FOR_SMALLBUSINESS 0x00000018 +#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM 0x00000019 +#define PRODUCT_HOME_PREMIUM_N 0x0000001A +#define PRODUCT_ENTERPRISE_N 0x0000001B #define PRODUCT_ULTIMATE_N 0x0000001C -#define PRODUCT_WEB_SERVER 0x00000011 #define PRODUCT_WEB_SERVER_CORE 0x0000001D +#define PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT 0x0000001E +#define PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY 0x0000001F +#define PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING 0x00000020 +#define PRODUCT_SERVER_FOUNDATION 0x00000021 +#define PRODUCT_HOME_PREMIUM_SERVER 0x00000022 +#define PRODUCT_SERVER_FOR_SMALLBUSINESS_V 0x00000023 +#define PRODUCT_STANDARD_SERVER_V 0x00000024 +#define PRODUCT_DATACENTER_SERVER_V 0x00000025 +#define PRODUCT_SERVER_V 0x00000025 +#define PRODUCT_ENTERPRISE_SERVER_V 0x00000026 +#define PRODUCT_DATACENTER_SERVER_CORE_V 0x00000027 +#define PRODUCT_STANDARD_SERVER_CORE_V 0x00000028 +#define PRODUCT_ENTERPRISE_SERVER_CORE_V 0x00000029 +#define PRODUCT_HYPERV 0x0000002A +#define PRODUCT_STORAGE_EXPRESS_SERVER_CORE 0x0000002B +#define PRODUCT_STORAGE_STANDARD_SERVER_CORE 0x0000002C +#define PRODUCT_STORAGE_WORKGROUP_SERVER_CORE 0x0000002D +#define PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE 0x0000002E +#define PRODUCT_STARTER_N 0x0000002F +#define PRODUCT_PROFESSIONAL 0x00000030 +#define PRODUCT_PROFESSIONAL_N 0x00000031 +#define PRODUCT_SB_SOLUTION_SERVER 0x00000032 +#define PRODUCT_SERVER_FOR_SB_SOLUTIONS 0x00000033 +#define PRODUCT_STANDARD_SERVER_SOLUTIONS 0x00000034 +#define PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE 0x00000035 +#define PRODUCT_SB_SOLUTION_SERVER_EM 0x00000036 +#define PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM 0x00000037 +#define PRODUCT_SOLUTION_EMBEDDEDSERVER 0x00000038 +#define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT 0x0000003B +#define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL 0x0000003C +#define PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC 0x0000003D +#define PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC 0x0000003E +#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE 0x0000003F +#define PRODUCT_CLUSTER_SERVER_V 0x00000040 +#define PRODUCT_EMBEDDED 0x00000041 +#define PRODUCT_STARTER_E 0x00000042 +#define PRODUCT_HOME_BASIC_E 0x00000043 +#define PRODUCT_HOME_PREMIUM_E 0x00000044 +#define PRODUCT_PROFESSIONAL_E 0x00000045 +#define PRODUCT_ENTERPRISE_E 0x00000046 +#define PRODUCT_ULTIMATE_E 0x00000047 +#define PRODUCT_ENTERPRISE_EVALUATION 0x00000048 +#define PRODUCT_MULTIPOINT_STANDARD_SERVER 0x0000004C +#define PRODUCT_MULTIPOINT_PREMIUM_SERVER 0x0000004D +#define PRODUCT_STANDARD_EVALUATION_SERVER 0x0000004F +#define PRODUCT_DATACENTER_EVALUATION_SERVER 0x00000050 +#define PRODUCT_ENTERPRISE_N_EVALUATION 0x00000054 +#define PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER 0x0000005F +#define PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER 0x00000060 +#define PRODUCT_CORE_ARM 0x00000061 +#define PRODUCT_CORE_N 0x00000062 +#define PRODUCT_CORE_COUNTRYSPECIFIC 0x00000063 +#define PRODUCT_CORE_LANGUAGESPECIFIC 0x00000064 +#define PRODUCT_CORE 0x00000065 +#define PRODUCT_PROFESSIONAL_WMC 0x00000067 +#define PRODUCT_UNLICENSED 0xABCDABCD /* @@ -5286,6 +5332,13 @@ WORD Reserved[3]; } GROUP_AFFINITY, *PGROUP_AFFINITY; +typedef struct _PROCESSOR_NUMBER +{ + WORD Group; + BYTE Number; + BYTE Reserved; +} PROCESSOR_NUMBER, *PPROCESSOR_NUMBER; + typedef struct _PROCESSOR_RELATIONSHIP { BYTE Flags;
diff --git a/mingw-w64-tools/widl/src/widl.c b/mingw-w64-tools/widl/src/widl.c index b0e2b67..85d66d7 100644 --- a/mingw-w64-tools/widl/src/widl.c +++ b/mingw-w64-tools/widl/src/widl.c
@@ -56,6 +56,7 @@ " -d n Set debug level to 'n'\n" " -D id[=val] Define preprocessor identifier id=val\n" " -E Preprocess only\n" +" --help Display this help and exit\n" " -h Generate headers\n" " -H file Name of header file (default is infile.h)\n" " -I path Set include search dir to path (multiple -I allowed)\n" @@ -149,6 +150,7 @@ PREFIX_ALL_OPTION, PREFIX_CLIENT_OPTION, PREFIX_SERVER_OPTION, + PRINT_HELP, WIN32_OPTION, WIN64_OPTION, WIN32_ALIGN_OPTION, @@ -160,6 +162,7 @@ static const struct option long_options[] = { { "dlldata", 1, NULL, DLLDATA_OPTION }, { "dlldata-only", 0, NULL, DLLDATA_ONLY_OPTION }, + { "help", 0, NULL, PRINT_HELP }, { "local-stubs", 1, NULL, LOCAL_STUBS_OPTION }, { "oldnames", 0, NULL, OLDNAMES_OPTION }, { "output", 0, NULL, 'o' }, @@ -526,6 +529,9 @@ case PREFIX_SERVER_OPTION: prefix_server = xstrdup(optarg); break; + case PRINT_HELP: + fprintf(stderr, "%s", usage); + return 0; case WIN32_OPTION: do_win32 = 1; do_win64 = 0;
diff --git a/mingw-w64-tools/widl/src/wpp/ppl.l b/mingw-w64-tools/widl/src/wpp/ppl.l index 8d979dc..70bd213 100644 --- a/mingw-w64-tools/widl/src/wpp/ppl.l +++ b/mingw-w64-tools/widl/src/wpp/ppl.l
@@ -1601,7 +1601,7 @@ /* Undo the effect of the quotation */ fname[n-1] = '\0'; - if((fp = pp_open_include(fname+1, type ? pp_status.input : NULL, &newpath)) == NULL) + if((fp = pp_open_include(fname+1, type, pp_status.input, &newpath)) == NULL) { ppy_error("Unable to open include file %s", fname+1); return;
diff --git a/mingw-w64-tools/widl/src/wpp/ppl.yy.c b/mingw-w64-tools/widl/src/wpp/ppl.yy.c index 524edec..50f00af 100644 --- a/mingw-w64-tools/widl/src/wpp/ppl.yy.c +++ b/mingw-w64-tools/widl/src/wpp/ppl.yy.c
@@ -4553,7 +4553,7 @@ /* Undo the effect of the quotation */ fname[n-1] = '\0'; - if((fp = pp_open_include(fname+1, type ? pp_status.input : NULL, &newpath)) == NULL) + if((fp = pp_open_include(fname+1, type, pp_status.input, &newpath)) == NULL) { ppy_error("Unable to open include file %s", fname+1); return;
diff --git a/mingw-w64-tools/widl/src/wpp/preproc.c b/mingw-w64-tools/widl/src/wpp/preproc.c index 99934d6..233d260 100644 --- a/mingw-w64-tools/widl/src/wpp/preproc.c +++ b/mingw-w64-tools/widl/src/wpp/preproc.c
@@ -115,7 +115,7 @@ return memcpy(s, str, len); } -static char *wpp_default_lookup(const char *name, const char *parent_name, +static char *wpp_default_lookup(const char *name, int type, const char *parent_name, char **include_path, int include_path_count) { char *cpy; @@ -144,7 +144,7 @@ } *cptr = '\0'; - if(parent_name) + if(type && parent_name) { /* Search directory of parent include and then -I path */ const char *p; @@ -507,17 +507,17 @@ char *wpp_find_include(const char *name, const char *parent_name) { - return wpp_default_lookup(name, parent_name, includepath, nincludepath); + return wpp_default_lookup(name, !!parent_name, parent_name, includepath, nincludepath); } -void *pp_open_include(const char *name, const char *parent_name, char **newpath) +void *pp_open_include(const char *name, int type, const char *parent_name, char **newpath) { char *path; void *fp; - if (!(path = wpp_callbacks->lookup(name, parent_name, includepath, + if (!(path = wpp_callbacks->lookup(name, type, parent_name, includepath, nincludepath))) return NULL; - fp = wpp_callbacks->open(path, parent_name == NULL ? 1 : 0); + fp = wpp_callbacks->open(path, type); if (fp) {
diff --git a/mingw-w64-tools/widl/src/wpp/wpp_private.h b/mingw-w64-tools/widl/src/wpp/wpp_private.h index 288d709..4e2aa5b 100644 --- a/mingw-w64-tools/widl/src/wpp/wpp_private.h +++ b/mingw-w64-tools/widl/src/wpp/wpp_private.h
@@ -207,7 +207,7 @@ pp_entry_t *pp_add_define(const char *def, const char *text); pp_entry_t *pp_add_macro(char *ident, marg_t *args[], int nargs, mtext_t *exp); void pp_del_define(const char *name); -void *pp_open_include(const char *name, const char *parent_name, char **newpath); +void *pp_open_include(const char *name, int type, const char *parent_name, char **newpath); void pp_push_if(pp_if_state_t s); void pp_next_if_state(int); pp_if_state_t pp_pop_if(void);