winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2020
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
947 discussions
Start a n
N
ew thread
Piotr Caban : msi: Remove ref_count from MSICOLUMNINFO.
by Alexandre Julliard
30 Jun '20
30 Jun '20
Module: wine Branch: master Commit: 7200257d0428b1e9b4da72e8c4e39f9cf27455e6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7200257d0428b1e9b4da72e8…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Jun 30 05:40:25 2020 +0200 msi: Remove ref_count from MSICOLUMNINFO. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/alter.c | 6 +++--- dlls/msi/table.c | 50 ++++++++++++++++---------------------------------- 2 files changed, 19 insertions(+), 37 deletions(-) diff --git a/dlls/msi/alter.c b/dlls/msi/alter.c index 5c5893c824..7922171ae2 100644 --- a/dlls/msi/alter.c +++ b/dlls/msi/alter.c @@ -147,6 +147,9 @@ static UINT ALTER_execute( struct tagMSIVIEW *view, MSIRECORD *record ) TRACE("%p %p\n", av, record); + if (av->colinfo) + return alter_add_column(av); + if (av->hold == 1) av->table->ops->add_ref(av->table); else if (av->hold == -1) @@ -156,9 +159,6 @@ static UINT ALTER_execute( struct tagMSIVIEW *view, MSIRECORD *record ) av->table = NULL; } - if (av->colinfo) - return alter_add_column(av); - return ERROR_SUCCESS; } diff --git a/dlls/msi/table.c b/dlls/msi/table.c index 7fae4ad07a..c617110604 100644 --- a/dlls/msi/table.c +++ b/dlls/msi/table.c @@ -54,7 +54,6 @@ typedef struct tagMSICOLUMNINFO LPCWSTR colname; UINT type; UINT offset; - INT ref_count; BOOL temporary; MSICOLUMNHASHENTRY **hash_table; } MSICOLUMNINFO; @@ -80,14 +79,14 @@ static const WCHAR szNumber[] = {'N','u','m','b','e','r',0}; static const WCHAR szType[] = {'T','y','p','e',0}; static const MSICOLUMNINFO _Columns_cols[4] = { - { szColumns, 1, szTable, MSITYPE_VALID | MSITYPE_STRING | MSITYPE_KEY | 64, 0, 0, 0, NULL }, - { szColumns, 2, szNumber, MSITYPE_VALID | MSITYPE_KEY | 2, 2, 0, 0, NULL }, - { szColumns, 3, szName, MSITYPE_VALID | MSITYPE_STRING | 64, 4, 0, 0, NULL }, - { szColumns, 4, szType, MSITYPE_VALID | 2, 6, 0, 0, NULL }, + { szColumns, 1, szTable, MSITYPE_VALID | MSITYPE_STRING | MSITYPE_KEY | 64, 0, 0, NULL }, + { szColumns, 2, szNumber, MSITYPE_VALID | MSITYPE_KEY | 2, 2, 0, NULL }, + { szColumns, 3, szName, MSITYPE_VALID | MSITYPE_STRING | 64, 4, 0, NULL }, + { szColumns, 4, szType, MSITYPE_VALID | 2, 6, 0, NULL }, }; static const MSICOLUMNINFO _Tables_cols[1] = { - { szTables, 1, szName, MSITYPE_VALID | MSITYPE_STRING | MSITYPE_KEY | 64, 0, 0, 0, NULL }, + { szTables, 1, szName, MSITYPE_VALID | MSITYPE_STRING | MSITYPE_KEY | 64, 0, 0, NULL }, }; #define MAX_STREAM_NAME 0x1f @@ -694,7 +693,6 @@ static UINT get_tablecolumns( MSIDATABASE *db, LPCWSTR szTableName, MSICOLUMNINF colinfo[col - 1].type = read_table_int( table->data, i, table->colinfo[3].offset, sizeof(USHORT) ) - (1 << 15); colinfo[col - 1].offset = 0; - colinfo[col - 1].ref_count = 0; colinfo[col - 1].hash_table = NULL; } n++; @@ -765,7 +763,6 @@ UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info *col_info, table->colinfo[ i ].colname = msi_string_lookup( db->strings, col_id, NULL ); table->colinfo[ i ].type = col->type; table->colinfo[ i ].offset = 0; - table->colinfo[ i ].ref_count = 0; table->colinfo[ i ].hash_table = NULL; table->colinfo[ i ].temporary = col->temporary; } @@ -1949,16 +1946,8 @@ static UINT TABLE_delete( struct tagMSIVIEW *view ) static UINT TABLE_add_ref(struct tagMSIVIEW *view) { MSITABLEVIEW *tv = (MSITABLEVIEW*)view; - UINT i; TRACE("%p %d\n", view, tv->table->ref_count); - - for (i = 0; i < tv->table->col_count; i++) - { - if (tv->table->colinfo[i].type & MSITYPE_TEMPORARY) - InterlockedIncrement(&tv->table->colinfo[i].ref_count); - } - return InterlockedIncrement(&tv->table->ref_count); } @@ -2022,25 +2011,25 @@ static UINT TABLE_release(struct tagMSIVIEW *view) TRACE("%p %d\n", view, ref); - for (i = tv->table->col_count - 1; i >= 0; i--) + ref = InterlockedDecrement(&tv->table->ref_count); + if (ref == 0) { - if (tv->table->colinfo[i].type & MSITYPE_TEMPORARY) + for (i = tv->table->col_count - 1; i >= 0; i--) { - ref = InterlockedDecrement(&tv->table->colinfo[i].ref_count); - if (ref == 0) + if (tv->table->colinfo[i].type & MSITYPE_TEMPORARY) { r = TABLE_remove_column(view, tv->table->colinfo[i].tablename, tv->table->colinfo[i].number); if (r != ERROR_SUCCESS) break; } + else + { + break; + } } - } - ref = InterlockedDecrement(&tv->table->ref_count); - if (ref == 0) - { - if (!tv->table->row_count) + if (!tv->table->col_count) { list_remove(&tv->table->entry); free_table(tv->table); @@ -2057,7 +2046,7 @@ static UINT TABLE_add_column(struct tagMSIVIEW *view, LPCWSTR table, UINT number MSITABLEVIEW *tv = (MSITABLEVIEW*)view; MSITABLE *msitable; MSIRECORD *rec; - UINT r, i; + UINT r; rec = MSI_CreateRecord(4); if (!rec) @@ -2078,14 +2067,7 @@ static UINT TABLE_add_column(struct tagMSIVIEW *view, LPCWSTR table, UINT number goto done; msitable = find_cached_table(tv->db, table); - for (i = 0; i < msitable->col_count; i++) - { - if (!wcscmp( msitable->colinfo[i].colname, column )) - { - InterlockedIncrement(&msitable->colinfo[i].ref_count); - break; - } - } + InterlockedIncrement(&msitable->ref_count); done: msiobj_release(&rec->hdr);
1
0
0
0
Piotr Caban : msi: Fix table ref count on create.
by Alexandre Julliard
30 Jun '20
30 Jun '20
Module: wine Branch: master Commit: 405486fbe6853c78744099fa1ebe07995e07a438 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=405486fbe6853c78744099fa…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Jun 30 05:40:20 2020 +0200 msi: Fix table ref count on create. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/create.c | 2 +- dlls/msi/query.h | 2 +- dlls/msi/table.c | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dlls/msi/create.c b/dlls/msi/create.c index 6133159dce..94c62ec573 100644 --- a/dlls/msi/create.c +++ b/dlls/msi/create.c @@ -68,7 +68,7 @@ static UINT CREATE_execute( struct tagMSIVIEW *view, MSIRECORD *record ) if (cv->bIsTemp && !cv->hold) return ERROR_SUCCESS; - return msi_create_table( cv->db, cv->name, cv->col_info, persist ); + return msi_create_table( cv->db, cv->name, cv->col_info, persist, cv->hold ); } static UINT CREATE_close( struct tagMSIVIEW *view ) diff --git a/dlls/msi/query.h b/dlls/msi/query.h index c0144d3054..5e5f3906f4 100644 --- a/dlls/msi/query.h +++ b/dlls/msi/query.h @@ -149,7 +149,7 @@ int sqliteGetToken(const WCHAR *z, int *tokenType, int *skip) DECLSPEC_HIDDEN; MSIRECORD *msi_query_merge_record( UINT fields, const column_info *vl, MSIRECORD *rec ) DECLSPEC_HIDDEN; UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info *col_info, - MSICONDITION persistent ) DECLSPEC_HIDDEN; + MSICONDITION persistent, BOOL hold ) DECLSPEC_HIDDEN; UINT msi_select_update( MSIVIEW *view, MSIRECORD *rec, UINT row ) DECLSPEC_HIDDEN; diff --git a/dlls/msi/table.c b/dlls/msi/table.c index db4dd59f95..7fae4ad07a 100644 --- a/dlls/msi/table.c +++ b/dlls/msi/table.c @@ -713,7 +713,7 @@ static UINT get_tablecolumns( MSIDATABASE *db, LPCWSTR szTableName, MSICOLUMNINF } UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info *col_info, - MSICONDITION persistent ) + MSICONDITION persistent, BOOL hold ) { UINT r, nField; MSIVIEW *tv = NULL; @@ -733,7 +733,7 @@ UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info *col_info, if( !table ) return ERROR_FUNCTION_FAILED; - table->ref_count = 1; + table->ref_count = 0; table->row_count = 0; table->data = NULL; table->data_persistent = NULL; @@ -742,6 +742,9 @@ UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info *col_info, table->persistent = persistent; lstrcpyW( table->name, name ); + if( hold ) + table->ref_count++; + for( col = col_info; col; col = col->next ) table->col_count++;
1
0
0
0
Piotr Caban : msi: Support removing temporary columns in TABLE_remove_column.
by Alexandre Julliard
30 Jun '20
30 Jun '20
Module: wine Branch: master Commit: 5d568279dc0b842206918ba87a955298e72973ae URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5d568279dc0b842206918ba8…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Jun 30 05:40:06 2020 +0200 msi: Support removing temporary columns in TABLE_remove_column. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/table.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/dlls/msi/table.c b/dlls/msi/table.c index a413808e8a..db4dd59f95 100644 --- a/dlls/msi/table.c +++ b/dlls/msi/table.c @@ -1966,6 +1966,20 @@ static UINT TABLE_remove_column(struct tagMSIVIEW *view, LPCWSTR table, UINT num MSIVIEW *columns = NULL; UINT row, r; + if (tv->table->col_count != number) + return ERROR_BAD_QUERY_SYNTAX; + + if (tv->table->colinfo[number-1].temporary) + { + UINT size = tv->table->colinfo[number-1].offset; + tv->table->col_count--; + tv->table->colinfo = msi_realloc( tv->table->colinfo, sizeof(*tv->table->colinfo) * tv->table->col_count ); + + for (row = 0; row < tv->table->row_count; row++) + tv->table->data[row] = msi_realloc( tv->table->data[row], size ); + return ERROR_SUCCESS; + } + rec = MSI_CreateRecord(2); if (!rec) return ERROR_OUTOFMEMORY; @@ -2000,11 +2014,12 @@ static UINT TABLE_release(struct tagMSIVIEW *view) { MSITABLEVIEW *tv = (MSITABLEVIEW*)view; INT ref = tv->table->ref_count; - UINT i, r; + UINT r; + INT i; TRACE("%p %d\n", view, ref); - for (i = 0; i < tv->table->col_count; i++) + for (i = tv->table->col_count - 1; i >= 0; i--) { if (tv->table->colinfo[i].type & MSITYPE_TEMPORARY) {
1
0
0
0
Alexandre Julliard : ntdll: Use the exported name directly for a few more functions.
by Alexandre Julliard
30 Jun '20
30 Jun '20
Module: wine Branch: master Commit: 3df16c0b70f734f5260bfde0f68239976d6a5842 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3df16c0b70f734f5260bfde0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jun 30 12:08:00 2020 +0200 ntdll: Use the exported name directly for a few more functions. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/misc.c | 50 +++++++++++++++++++++++++------------------------- dlls/ntdll/ntdll.spec | 42 +++++++++++++++++++++--------------------- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c index 0efb8f6afe..6960b52dcb 100644 --- a/dlls/ntdll/misc.c +++ b/dlls/ntdll/misc.c @@ -49,7 +49,7 @@ LPCSTR debugstr_us( const UNICODE_STRING *us ) /********************************************************************* * wine_get_version (NTDLL.@) */ -const char * CDECL NTDLL_wine_get_version(void) +const char * CDECL wine_get_version(void) { return unix_funcs->get_version(); } @@ -57,7 +57,7 @@ const char * CDECL NTDLL_wine_get_version(void) /********************************************************************* * wine_get_build_id (NTDLL.@) */ -const char * CDECL NTDLL_wine_get_build_id(void) +const char * CDECL wine_get_build_id(void) { return unix_funcs->get_build_id(); } @@ -65,7 +65,7 @@ const char * CDECL NTDLL_wine_get_build_id(void) /********************************************************************* * wine_get_host_version (NTDLL.@) */ -void CDECL NTDLL_wine_get_host_version( const char **sysname, const char **release ) +void CDECL wine_get_host_version( const char **sysname, const char **release ) { return unix_funcs->get_host_version( sysname, release ); } @@ -73,7 +73,7 @@ void CDECL NTDLL_wine_get_host_version( const char **sysname, const char **relea /********************************************************************* * abs (NTDLL.@) */ -int CDECL NTDLL_abs( int i ) +int CDECL abs( int i ) { return i >= 0 ? i : -i; } @@ -81,7 +81,7 @@ int CDECL NTDLL_abs( int i ) /********************************************************************* * atan (NTDLL.@) */ -double CDECL NTDLL_atan( double d ) +double CDECL atan( double d ) { return unix_funcs->atan( d ); } @@ -89,7 +89,7 @@ double CDECL NTDLL_atan( double d ) /********************************************************************* * ceil (NTDLL.@) */ -double CDECL NTDLL_ceil( double d ) +double CDECL ceil( double d ) { return unix_funcs->ceil( d ); } @@ -97,7 +97,7 @@ double CDECL NTDLL_ceil( double d ) /********************************************************************* * cos (NTDLL.@) */ -double CDECL NTDLL_cos( double d ) +double CDECL cos( double d ) { return unix_funcs->cos( d ); } @@ -105,7 +105,7 @@ double CDECL NTDLL_cos( double d ) /********************************************************************* * fabs (NTDLL.@) */ -double CDECL NTDLL_fabs( double d ) +double CDECL fabs( double d ) { return unix_funcs->fabs( d ); } @@ -113,7 +113,7 @@ double CDECL NTDLL_fabs( double d ) /********************************************************************* * floor (NTDLL.@) */ -double CDECL NTDLL_floor( double d ) +double CDECL floor( double d ) { return unix_funcs->floor( d ); } @@ -121,7 +121,7 @@ double CDECL NTDLL_floor( double d ) /********************************************************************* * log (NTDLL.@) */ -double CDECL NTDLL_log( double d ) +double CDECL log( double d ) { return unix_funcs->log( d ); } @@ -129,7 +129,7 @@ double CDECL NTDLL_log( double d ) /********************************************************************* * pow (NTDLL.@) */ -double CDECL NTDLL_pow( double x, double y ) +double CDECL pow( double x, double y ) { return unix_funcs->pow( x, y ); } @@ -137,7 +137,7 @@ double CDECL NTDLL_pow( double x, double y ) /********************************************************************* * sin (NTDLL.@) */ -double CDECL NTDLL_sin( double d ) +double CDECL sin( double d ) { return unix_funcs->sin( d ); } @@ -145,7 +145,7 @@ double CDECL NTDLL_sin( double d ) /********************************************************************* * sqrt (NTDLL.@) */ -double CDECL NTDLL_sqrt( double d ) +double CDECL sqrt( double d ) { return unix_funcs->sqrt( d ); } @@ -153,7 +153,7 @@ double CDECL NTDLL_sqrt( double d ) /********************************************************************* * tan (NTDLL.@) */ -double CDECL NTDLL_tan( double d ) +double CDECL tan( double d ) { return unix_funcs->tan( d ); } @@ -169,52 +169,52 @@ double CDECL NTDLL_tan( double d ) /********************************************************************* * _CIcos (NTDLL.@) */ -double CDECL NTDLL__CIcos(void) +double CDECL _CIcos(void) { FPU_DOUBLE(x); - return NTDLL_cos(x); + return cos(x); } /********************************************************************* * _CIlog (NTDLL.@) */ -double CDECL NTDLL__CIlog(void) +double CDECL _CIlog(void) { FPU_DOUBLE(x); - return NTDLL_log(x); + return log(x); } /********************************************************************* * _CIpow (NTDLL.@) */ -double CDECL NTDLL__CIpow(void) +double CDECL _CIpow(void) { FPU_DOUBLES(x,y); - return NTDLL_pow(x,y); + return pow(x,y); } /********************************************************************* * _CIsin (NTDLL.@) */ -double CDECL NTDLL__CIsin(void) +double CDECL _CIsin(void) { FPU_DOUBLE(x); - return NTDLL_sin(x); + return sin(x); } /********************************************************************* * _CIsqrt (NTDLL.@) */ -double CDECL NTDLL__CIsqrt(void) +double CDECL _CIsqrt(void) { FPU_DOUBLE(x); - return NTDLL_sqrt(x); + return sqrt(x); } /********************************************************************* * _ftol (NTDLL.@) */ -LONGLONG CDECL NTDLL__ftol(void) +LONGLONG CDECL _ftol(void) { FPU_DOUBLE(x); return (LONGLONG)x; diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 9009f02c45..0b1e91ddc9 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -1417,11 +1417,11 @@ @ stub ZwWriteRequestData @ stdcall -private ZwWriteVirtualMemory(long ptr ptr long ptr) NtWriteVirtualMemory @ stdcall -private ZwYieldExecution() NtYieldExecution -@ cdecl -private -arch=i386 _CIcos() NTDLL__CIcos -@ cdecl -private -arch=i386 _CIlog() NTDLL__CIlog -@ cdecl -private -arch=i386 _CIpow() NTDLL__CIpow -@ cdecl -private -arch=i386 _CIsin() NTDLL__CIsin -@ cdecl -private -arch=i386 _CIsqrt() NTDLL__CIsqrt +@ cdecl -private -arch=i386 _CIcos() +@ cdecl -private -arch=i386 _CIlog() +@ cdecl -private -arch=i386 _CIpow() +@ cdecl -private -arch=i386 _CIsin() +@ cdecl -private -arch=i386 _CIsqrt() @ stdcall -arch=x86_64 __C_specific_handler(ptr long ptr ptr) @ cdecl -arch=arm,x86_64 -norelay __chkstk() @ cdecl __isascii(long) @@ -1442,7 +1442,7 @@ @ stdcall -arch=i386 -ret64 _aullshr(int64 long) @ cdecl -arch=i386 -norelay _chkstk() @ stub _fltused -@ cdecl -arch=i386 -ret64 _ftol() NTDLL__ftol +@ cdecl -arch=i386 -ret64 _ftol() @ cdecl _i64toa(int64 ptr long) @ cdecl _i64tow(int64 ptr long) @ cdecl _itoa(long ptr long) @@ -1482,15 +1482,15 @@ @ cdecl _wtoi(wstr) @ cdecl -ret64 _wtoi64(wstr) @ cdecl _wtol(wstr) -@ cdecl abs(long) NTDLL_abs -@ cdecl atan(double) NTDLL_atan +@ cdecl abs(long) +@ cdecl atan(double) @ cdecl atoi(str) @ cdecl atol(str) @ cdecl bsearch(ptr ptr long long ptr) -@ cdecl ceil(double) NTDLL_ceil -@ cdecl cos(double) NTDLL_cos -@ cdecl fabs(double) NTDLL_fabs -@ cdecl floor(double) NTDLL_floor +@ cdecl ceil(double) +@ cdecl cos(double) +@ cdecl fabs(double) +@ cdecl floor(double) @ cdecl isalnum(long) @ cdecl isalpha(long) @ cdecl iscntrl(long) @@ -1508,20 +1508,20 @@ @ cdecl iswspace(long) @ cdecl iswxdigit(long) @ cdecl isxdigit(long) -@ cdecl labs(long) NTDLL_abs -@ cdecl log(double) NTDLL_log +@ cdecl labs(long) abs +@ cdecl log(double) @ cdecl mbstowcs(ptr str long) @ cdecl memchr(ptr long long) @ cdecl memcmp(ptr ptr long) @ cdecl memcpy(ptr ptr long) @ cdecl memmove(ptr ptr long) @ cdecl memset(ptr long long) -@ cdecl pow(double double) NTDLL_pow +@ cdecl pow(double double) @ cdecl qsort(ptr long long ptr) -@ cdecl sin(double) NTDLL_sin +@ cdecl sin(double) @ varargs sprintf(ptr str) NTDLL_sprintf @ varargs sprintf_s(ptr long str) -@ cdecl sqrt(double) NTDLL_sqrt +@ cdecl sqrt(double) @ varargs sscanf(str str) @ cdecl strcat(str str) @ cdecl strchr(str long) @@ -1541,7 +1541,7 @@ @ cdecl strtoul(str ptr long) @ varargs swprintf(ptr wstr) NTDLL_swprintf @ varargs swprintf_s(ptr long wstr) -@ cdecl tan(double) NTDLL_tan +@ cdecl tan(double) @ cdecl tolower(long) @ cdecl toupper(long) @ cdecl towlower(long) @@ -1595,9 +1595,9 @@ @ cdecl __wine_locked_recvmsg(long ptr long) # Version -@ cdecl wine_get_version() NTDLL_wine_get_version -@ cdecl wine_get_build_id() NTDLL_wine_get_build_id -@ cdecl wine_get_host_version(ptr ptr) NTDLL_wine_get_host_version +@ cdecl wine_get_version() +@ cdecl wine_get_build_id() +@ cdecl wine_get_host_version(ptr ptr) # Codepages @ cdecl __wine_get_unix_codepage()
1
0
0
0
Alexandre Julliard : ntdll: Use the standard C library names for the wide char functions.
by Alexandre Julliard
30 Jun '20
30 Jun '20
Module: wine Branch: master Commit: 70fceaa2fe581ed41408faa368ff3f6833fd463c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=70fceaa2fe581ed41408faa3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jun 30 12:07:01 2020 +0200 ntdll: Use the standard C library names for the wide char functions. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/locale.c | 4 +-- dlls/ntdll/ntdll.spec | 60 ++++++++++++++++++------------------- dlls/ntdll/ntdll_misc.h | 41 ------------------------- dlls/ntdll/wcstring.c | 80 ++++++++++++++++++++++++------------------------- 4 files changed, 72 insertions(+), 113 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=70fceaa2fe581ed41408…
1
0
0
0
Alexandre Julliard : ntdll: Use the standard C library names for the string functions.
by Alexandre Julliard
30 Jun '20
30 Jun '20
Module: wine Branch: master Commit: cfc9da22f58659e57d20d76c1c45b91da9dca789 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cfc9da22f58659e57d20d76c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jun 30 12:06:01 2020 +0200 ntdll: Use the standard C library names for the string functions. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/ntdll.spec | 78 ++++++++++++++++----------------- dlls/ntdll/ntdll_misc.h | 21 --------- dlls/ntdll/string.c | 114 ++++++++++++++++++++++++------------------------ 3 files changed, 96 insertions(+), 117 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=cfc9da22f58659e57d20…
1
0
0
0
Alexandre Julliard : ntdll: Use the standard C library names for the printf functions.
by Alexandre Julliard
30 Jun '20
30 Jun '20
Module: wine Branch: master Commit: 4478ba258e45559ac97353ab27951e84dd9865c1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4478ba258e45559ac97353ab…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jun 30 12:04:42 2020 +0200 ntdll: Use the standard C library names for the printf functions. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/actctx.c | 21 +++++++++------------ dlls/ntdll/atom.c | 2 +- dlls/ntdll/locale.c | 17 +++++++++-------- dlls/ntdll/ntdll.spec | 8 ++++---- dlls/ntdll/ntdll_misc.h | 1 - dlls/ntdll/printf.c | 16 ++++++++-------- dlls/ntdll/process.c | 12 ++++++------ dlls/ntdll/rtl.c | 4 ++-- dlls/ntdll/rtlstr.c | 2 +- dlls/ntdll/sec.c | 13 +++++++------ 10 files changed, 47 insertions(+), 49 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=4478ba258e45559ac973…
1
0
0
0
Alexandre Julliard : ntdll: Build with msvcrt.
by Alexandre Julliard
30 Jun '20
30 Jun '20
Module: wine Branch: master Commit: 8a169390c9ef4d8a43b604558c4194a052473c0c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8a169390c9ef4d8a43b60455…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jun 30 12:01:37 2020 +0200 ntdll: Build with msvcrt. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/loader.c | 32 +++++++++++++++++--------------- dlls/ntdll/Makefile.in | 4 ++-- dlls/ntdll/actctx.c | 3 --- dlls/ntdll/atom.c | 3 --- dlls/ntdll/critsection.c | 3 --- dlls/ntdll/debugbuffer.c | 3 --- dlls/ntdll/directory.c | 3 --- dlls/ntdll/env.c | 11 ----------- dlls/ntdll/error.c | 2 -- dlls/ntdll/exception.c | 14 +++++++++++--- dlls/ntdll/file.c | 3 --- dlls/ntdll/heap.c | 10 ++-------- dlls/ntdll/large_int.c | 13 +++++-------- dlls/ntdll/loader.c | 15 +++++---------- dlls/ntdll/loadorder.c | 5 +---- dlls/ntdll/locale.c | 15 +-------------- dlls/ntdll/misc.c | 11 ++++------- dlls/ntdll/nt.c | 3 --- dlls/ntdll/ntdll.spec | 14 +++++++------- dlls/ntdll/ntdll_misc.h | 5 ----- dlls/ntdll/om.c | 5 ----- dlls/ntdll/path.c | 4 ---- dlls/ntdll/printf.c | 27 ++++++++++++--------------- dlls/ntdll/process.c | 3 --- dlls/ntdll/reg.c | 4 ---- dlls/ntdll/relay.c | 3 --- dlls/ntdll/resource.c | 3 --- dlls/ntdll/rtl.c | 17 ++++------------- dlls/ntdll/rtlbitmap.c | 2 +- dlls/ntdll/rtlstr.c | 2 -- dlls/ntdll/sec.c | 7 ------- dlls/ntdll/server.c | 3 --- dlls/ntdll/signal_arm.c | 3 --- dlls/ntdll/signal_arm64.c | 6 ------ dlls/ntdll/signal_i386.c | 9 --------- dlls/ntdll/signal_x86_64.c | 3 --- dlls/ntdll/string.c | 21 ++++++--------------- dlls/ntdll/sync.c | 3 --- dlls/ntdll/thread.c | 3 --- dlls/ntdll/threadpool.c | 3 --- dlls/ntdll/time.c | 6 ------ dlls/ntdll/unix/loader.c | 1 - dlls/ntdll/version.c | 3 --- dlls/ntdll/virtual.c | 7 ------- dlls/ntdll/wcstring.c | 14 +++----------- 45 files changed, 81 insertions(+), 253 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=8a169390c9ef4d8a43b6…
1
0
0
0
Alexandre Julliard : ntdll: Support loading a PE-format ntdll.
by Alexandre Julliard
30 Jun '20
30 Jun '20
Module: wine Branch: master Commit: f89f7a54c25eb202e70225713ed39687be048e26 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f89f7a54c25eb202e7022571…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jun 30 12:00:57 2020 +0200 ntdll: Support loading a PE-format ntdll. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/loader.c | 17 +++++++------- dlls/ntdll/unix/loader.c | 18 +++++++++++--- dlls/ntdll/unix/unix_private.h | 2 +- dlls/ntdll/unix/virtual.c | 53 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 78 insertions(+), 12 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index efacc0c081..4657745a28 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -1956,12 +1956,12 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name, /************************************************************************* - * build_so_dll_module + * build_builtin_module * - * Build the module for a .so builtin library. + * Build the module for a builtin library. */ -static NTSTATUS build_so_dll_module( const WCHAR *load_path, const UNICODE_STRING *nt_name, - void *module, DWORD flags, WINE_MODREF **pwm ) +static NTSTATUS build_builtin_module( const WCHAR *load_path, const UNICODE_STRING *nt_name, + void *module, DWORD flags, WINE_MODREF **pwm ) { NTSTATUS status; pe_image_info_t image_info = { 0 }; @@ -2337,7 +2337,7 @@ static NTSTATUS load_so_dll( LPCWSTR load_path, const UNICODE_STRING *nt_name, } else { - if ((status = build_so_dll_module( load_path, &win_name, module, flags, &wm ))) return status; + if ((status = build_builtin_module( load_path, &win_name, module, flags, &wm ))) return status; TRACE_(loaddll)( "Loaded %s at %p: builtin\n", debugstr_us(nt_name), module ); } *pwm = wm; @@ -3919,7 +3919,6 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ) */ void __wine_process_init(void) { - extern IMAGE_NT_HEADERS __wine_spec_nt_header; static const WCHAR ntdllW[] = {'\\','?','?','\\','C',':','\\','w','i','n','d','o','w','s','\\', 's','y','s','t','e','m','3','2','\\', 'n','t','d','l','l','.','d','l','l',0}; @@ -3932,7 +3931,7 @@ void __wine_process_init(void) NTSTATUS status; ANSI_STRING func_name; UNICODE_STRING nt_name; - HMODULE ntdll_module = (HMODULE)((__wine_spec_nt_header.OptionalHeader.ImageBase + 0xffff) & ~0xffff); + MEMORY_BASIC_INFORMATION meminfo; INITIAL_TEB stack; ULONG_PTR val; TEB *teb = NtCurrentTeb(); @@ -3976,7 +3975,9 @@ void __wine_process_init(void) /* setup the load callback and create ntdll modref */ RtlInitUnicodeString( &nt_name, ntdllW ); - status = build_so_dll_module( params->DllPath.Buffer, &nt_name, ntdll_module, 0, &wm ); + NtQueryVirtualMemory( GetCurrentProcess(), __wine_process_init, MemoryBasicInformation, + &meminfo, sizeof(meminfo), NULL ); + status = build_builtin_module( params->DllPath.Buffer, &nt_name, meminfo.AllocationBase, 0, &wm ); assert( !status ); RtlInitUnicodeString( &nt_name, kernel32W ); diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index f6004c6081..b47efcd0e5 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -124,7 +124,7 @@ const char *build_dir = NULL; const char *config_dir = NULL; const char **dll_paths = NULL; const char *user_name = NULL; -HMODULE ntdll_module = NULL; +static HMODULE ntdll_module; struct file_id { @@ -1295,10 +1295,22 @@ found: */ static HMODULE load_ntdll(void) { + NTSTATUS status; void *module; - char *name = build_path( dll_dir, "ntdll.dll.so" ); - NTSTATUS status = dlopen_dll( name, &module ); + int fd; + char *name = build_path( dll_dir, "ntdll.dll" ); + if ((fd = open( name, O_RDONLY )) != -1) + { + status = virtual_map_ntdll( fd, &module ); + close( fd ); + } + else + { + free( name ); + name = build_path( dll_dir, "ntdll.dll.so" ); + status = dlopen_dll( name, &module ); + } if (status) fatal_error( "failed to load %s error %x\n", name, status ); free( name ); return module; diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h index 6971e6fe91..71d6ee7d4f 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h @@ -134,7 +134,6 @@ extern const char *build_dir DECLSPEC_HIDDEN; extern const char *config_dir DECLSPEC_HIDDEN; extern const char *user_name DECLSPEC_HIDDEN; extern const char **dll_paths DECLSPEC_HIDDEN; -extern HMODULE ntdll_module DECLSPEC_HIDDEN; extern USHORT *uctable DECLSPEC_HIDDEN; extern USHORT *lctable DECLSPEC_HIDDEN; extern SIZE_T startup_info_size DECLSPEC_HIDDEN; @@ -190,6 +189,7 @@ extern NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct o data_size_t *ret_len ) DECLSPEC_HIDDEN; extern void virtual_init(void) DECLSPEC_HIDDEN; +extern NTSTATUS virtual_map_ntdll( int fd, void **module ) DECLSPEC_HIDDEN; extern ULONG_PTR get_system_affinity_mask(void) DECLSPEC_HIDDEN; extern void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info ) DECLSPEC_HIDDEN; extern NTSTATUS virtual_create_builtin_view( void *module ) DECLSPEC_HIDDEN; diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index 2fe46c400a..d998966b5f 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -2413,6 +2413,59 @@ void virtual_init(void) } +/*********************************************************************** + * virtual_map_ntdll + * + * Map ntdll, used instead of virtual_map_section() because some things are not initialized yet. + */ +NTSTATUS virtual_map_ntdll( int fd, void **module ) +{ + IMAGE_DOS_HEADER dos; + IMAGE_NT_HEADERS nt; + NTSTATUS status; + SIZE_T size; + void *base; + unsigned int vprot; + struct file_view *view; + + /* load the headers */ + + size = pread( fd, &dos, sizeof(dos), 0 ); + if (size < sizeof(dos)) return STATUS_INVALID_IMAGE_FORMAT; + if (dos.e_magic != IMAGE_DOS_SIGNATURE) return STATUS_INVALID_IMAGE_FORMAT; + + size = pread( fd, &nt, sizeof(nt), dos.e_lfanew ); + if (size < sizeof(nt)) return STATUS_INVALID_IMAGE_PROTECT; + if (nt.Signature != IMAGE_NT_SIGNATURE) return STATUS_INVALID_IMAGE_FORMAT; + if (nt.OptionalHeader.Magic != IMAGE_NT_OPTIONAL_HDR_MAGIC) return STATUS_INVALID_IMAGE_FORMAT; +#ifdef __i386__ + if (nt.FileHeader.Machine != IMAGE_FILE_MACHINE_I386) return STATUS_INVALID_IMAGE_FORMAT; +#elif defined(__x86_64__) + if (nt.FileHeader.Machine != IMAGE_FILE_MACHINE_AMD64) return STATUS_INVALID_IMAGE_FORMAT; +#elif defined(__arm__) + if (nt.FileHeader.Machine != IMAGE_FILE_MACHINE_ARM && + nt.FileHeader.Machine != IMAGE_FILE_MACHINE_THUMB && + nt.FileHeader.Machine != IMAGE_FILE_MACHINE_ARMNT) return STATUS_INVALID_IMAGE_FORMAT; +#elif defined(__aarch64__) + if (nt.FileHeader.Machine != IMAGE_FILE_MACHINE_ARM64) return STATUS_INVALID_IMAGE_FORMAT; +#endif + + base = (void *)nt.OptionalHeader.ImageBase; + size = ROUND_SIZE( 0, nt.OptionalHeader.SizeOfImage ); + vprot = SEC_IMAGE | SEC_FILE | VPROT_COMMITTED | VPROT_READ | VPROT_EXEC | VPROT_WRITECOPY; + + status = map_view( &view, base, size, FALSE, vprot, 0 ); + if (status == STATUS_CONFLICTING_ADDRESSES) + ERR( "couldn't load ntdll at preferred address %p\n", base ); + if (status) return status; + *module = view->base; + return map_image_into_view( view, fd, base, nt.OptionalHeader.SizeOfHeaders, 0, -1, FALSE ); +} + + +/*********************************************************************** + * get_system_affinity_mask + */ ULONG_PTR get_system_affinity_mask(void) { ULONG num_cpus = NtCurrentTeb()->Peb->NumberOfProcessors;
1
0
0
0
Alexandre Julliard : ntdll: Move part of the PE image mapping code into virtual_map_section().
by Alexandre Julliard
30 Jun '20
30 Jun '20
Module: wine Branch: master Commit: 4fcf20d1d120985a6056ef8e1861738c2e903660 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4fcf20d1d120985a6056ef8e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jun 30 12:00:08 2020 +0200 ntdll: Move part of the PE image mapping code into virtual_map_section(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/virtual.c | 209 ++++++++++++++++++---------------------------- server/mapping.c | 6 +- server/trace.c | 1 + 3 files changed, 88 insertions(+), 128 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=4fcf20d1d120985a6056…
1
0
0
0
← Newer
1
2
3
4
5
6
...
95
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Results per page:
10
25
50
100
200