[PATCH] setupapi: change to IMPORTS from DELAYIMPORTS.

Zebediah Figura z.figura12 at gmail.com
Tue Jul 21 14:12:12 CDT 2020


On 7/21/20 2:10 PM, Zebediah Figura wrote:
> Hello Jordan, thanks for the patch! I have some comments inlined.
> 
> On 7/21/20 1:58 PM, Jordan wrote:
>> Using DELAYIMPORTS is breaking startup of some applications.
>> After discussion in #winehackers IRC, it was remarked that
>> there is no good reason to keep setupapi under DELAYIMPORTS,
>> thus I have moved all occurrences of it to IMPORTS instead.
>>
>> Signed-off-by: Jordan <jordan at niau.io>
>>
>> ---
>> Fixes bugs similar to: https://bugs.winehq.org/show_bug.cgi?id=45936
>> however does not address it, this sentence is for semantics.
> 
> Generally it's best to mention what specific application is fixed, if
> possible.
> 
>> ---
>>  dlls/gdi32/Makefile.in        | 4 ++--
>>  dlls/hidclass.sys/Makefile.in | 4 ++--
>>  dlls/ntoskrnl.exe/Makefile.in | 4 ++--
>>  dlls/xinput1_1/Makefile.in    | 3 ++-
>>  dlls/xinput1_2/Makefile.in    | 3 ++-
>>  dlls/xinput1_3/Makefile.in    | 3 ++-
>>  dlls/xinput1_4/Makefile.in    | 3 ++-
>>  dlls/xinput9_1_0/Makefile.in  | 3 ++-
>>  programs/wineboot/Makefile.in | 4 ++--
> 
> Whenever possible patches should affect only one component at time, so
> you'll want to split this up into individual DLLs. (xinput1 can
> reasonably be combined, though).

Sorry, to be clear, that's xinput as a whole, not just xinput1_*.

> 
>>  9 files changed, 18 insertions(+), 13 deletions(-)
>>
>> diff --git a/dlls/gdi32/Makefile.in b/dlls/gdi32/Makefile.in
>> index 32b2e6959c..5f34a56478 100644
>> --- a/dlls/gdi32/Makefile.in
>> +++ b/dlls/gdi32/Makefile.in
>> @@ -1,10 +1,10 @@
>>  EXTRADEFS = -D_GDI32_
>>  MODULE    = gdi32.dll
>>  IMPORTLIB = gdi32
>> -IMPORTS   = advapi32
>> +IMPORTS   = advapi32 setupapi
>>  EXTRAINCL = $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS)
>>  EXTRALIBS = $(CARBON_LIBS) $(APPKIT_LIBS)
>> -DELAYIMPORTS = usp10 setupapi
>> +DELAYIMPORTS = usp10
>>  
>>  C_SRCS = \
>>  	bidi.c \
>> diff --git a/dlls/hidclass.sys/Makefile.in b/dlls/hidclass.sys/Makefile.in
>> index be4af74785..32ed254025 100644
>> --- a/dlls/hidclass.sys/Makefile.in
>> +++ b/dlls/hidclass.sys/Makefile.in
>> @@ -1,7 +1,7 @@
>>  MODULE    = hidclass.sys
>>  IMPORTLIB = hidclass
>> -IMPORTS   = hal ntoskrnl
>> -DELAYIMPORTS = setupapi hid
>> +IMPORTS   = hal ntoskrnl setupapi
>> +DELAYIMPORTS = hid
>>  
>>  EXTRADLLFLAGS = -mno-cygwin
>>  
> 
> I don't think there's a good reason to delay-import hid here, either.
> 
>> diff --git a/dlls/ntoskrnl.exe/Makefile.in b/dlls/ntoskrnl.exe/Makefile.in
>> index df48e44ede..10e5b7951e 100644
>> --- a/dlls/ntoskrnl.exe/Makefile.in
>> +++ b/dlls/ntoskrnl.exe/Makefile.in
>> @@ -1,7 +1,7 @@
>>  MODULE    = ntoskrnl.exe
>>  IMPORTLIB = ntoskrnl
>> -IMPORTS   = advapi32 hal msvcrt
>> -DELAYIMPORTS = rpcrt4 setupapi
>> +IMPORTS   = advapi32 hal msvcrt setupapi
>> +DELAYIMPORTS = rpcrt4
>>  
>>  EXTRADLLFLAGS = -mno-cygwin
>>  
>> diff --git a/dlls/xinput1_1/Makefile.in b/dlls/xinput1_1/Makefile.in
>> index a2b17a248c..9300d2e120 100644
>> --- a/dlls/xinput1_1/Makefile.in
>> +++ b/dlls/xinput1_1/Makefile.in
>> @@ -1,6 +1,7 @@
>>  MODULE    = xinput1_1.dll
>>  PARENTSRC = ../xinput1_3
>> -DELAYIMPORTS = hid setupapi
>> +IMPORTS   = setupapi
>> +DELAYIMPORTS = hid
>>  
>>  EXTRADLLFLAGS = -mno-cygwin
>>  
> 
> Same with xinput; no reason to delay-import hid.
> 
>> diff --git a/dlls/xinput1_2/Makefile.in b/dlls/xinput1_2/Makefile.in
>> index fd38c6f6cc..d4f042e3c1 100644
>> --- a/dlls/xinput1_2/Makefile.in
>> +++ b/dlls/xinput1_2/Makefile.in
>> @@ -1,6 +1,7 @@
>>  MODULE    = xinput1_2.dll
>>  PARENTSRC = ../xinput1_3
>> -DELAYIMPORTS = hid setupapi
>> +IMPORTS   = setupapi
>> +DELAYIMPORTS = hid
>>  
>>  EXTRADLLFLAGS = -mno-cygwin
>>  
>> diff --git a/dlls/xinput1_3/Makefile.in b/dlls/xinput1_3/Makefile.in
>> index 3b4968fb6d..cf9d64c073 100644
>> --- a/dlls/xinput1_3/Makefile.in
>> +++ b/dlls/xinput1_3/Makefile.in
>> @@ -1,6 +1,7 @@
>>  MODULE    = xinput1_3.dll
>>  IMPORTLIB = xinput
>> -DELAYIMPORTS = hid setupapi
>> +IMPORTS   = setupapi
>> +DELAYIMPORTS = hid
>>  
>>  EXTRADLLFLAGS = -mno-cygwin
>>  
>> diff --git a/dlls/xinput1_4/Makefile.in b/dlls/xinput1_4/Makefile.in
>> index cdf4b4fed0..517fde300b 100644
>> --- a/dlls/xinput1_4/Makefile.in
>> +++ b/dlls/xinput1_4/Makefile.in
>> @@ -1,6 +1,7 @@
>>  MODULE    = xinput1_4.dll
>>  PARENTSRC = ../xinput1_3
>> -DELAYIMPORTS = hid setupapi
>> +IMPORTS = setupapi
>> +DELAYIMPORTS = hid
>>  
>>  EXTRADLLFLAGS = -mno-cygwin
>>  
>> diff --git a/dlls/xinput9_1_0/Makefile.in b/dlls/xinput9_1_0/Makefile.in
>> index dc8739c464..cebb3523b9 100644
>> --- a/dlls/xinput9_1_0/Makefile.in
>> +++ b/dlls/xinput9_1_0/Makefile.in
>> @@ -1,6 +1,7 @@
>>  MODULE    = xinput9_1_0.dll
>>  PARENTSRC = ../xinput1_3
>> -DELAYIMPORTS = hid setupapi
>> +IMPORTS = setupapi
>> +DELAYIMPORTS = hid
>>  
>>  EXTRADLLFLAGS = -mno-cygwin
>>  
>> diff --git a/programs/wineboot/Makefile.in b/programs/wineboot/Makefile.in
>> index 3921fa9644..f6fabf5990 100644
>> --- a/programs/wineboot/Makefile.in
>> +++ b/programs/wineboot/Makefile.in
>> @@ -1,7 +1,7 @@
>>  MODULE    = wineboot.exe
>>  APPMODE   = -mconsole
>> -IMPORTS   = uuid advapi32
>> -DELAYIMPORTS = shell32 shlwapi version user32 setupapi newdev
>> +IMPORTS   = uuid advapi32 setupapi
>> +DELAYIMPORTS = shell32 shlwapi version user32 newdev
>>  
>>  EXTRADLLFLAGS = -mno-cygwin
>>  
>>
> 
> I think this delay-import still makes sense. If wineboot doesn't update
> the prefix, it won't need to load setupapi.
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20200721/16b238d7/attachment.sig>


More information about the wine-devel mailing list