Send MinGW-Notify mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.osdn.me/mailman/listinfo/mingw-notify
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of MinGW-Notify digest..."


Please do not reply to this notification; the sender address is unable to 
accept incoming e-mail.  If you wish to unsubscribe you can do so at 
https://lists.osdn.me/mailman/listinfo/mingw-notify.



Today's Topics:

   1. [SCM] mingw-org-wsl (mingw) branch, 5.5-trunk, updated.
      475f0b6dd1ccc2714a75aa2a36a73c95e73c15c0 (MinGW Notification List)
   2. [mingw] #42344: Implement a generic infrastructure to
      facilitate run-time linking of API functions (MinGW Notification List)
   3. [mingw] #42383: Implement a "legacy-safe" emulation of
      Microsoft's "versionhelpers" API. (MinGW Notification List)


----------------------------------------------------------------------

Message: 1
Date: Wed, 26 May 2021 00:08:37 +0900
From: MinGW Notification List <[email protected]>
To: [email protected]
Subject: [MinGW-Notify] [SCM] mingw-org-wsl (mingw) branch, 5.5-trunk,
        updated. 475f0b6dd1ccc2714a75aa2a36a73c95e73c15c0
Message-ID: <[email protected]>

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to "mingw-org-wsl" repository
containing the "mingw" project.

The branch, 5.5-trunk has been updated
       via  475f0b6dd1ccc2714a75aa2a36a73c95e73c15c0 (commit)
       via  e5e5f0625a26ec0902f0f23cea7e1be098f8ee39 (commit)
      from  7b37e9a66a0faf14dc59b7f3bc7dda51db1e9703 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 475f0b6dd1ccc2714a75aa2a36a73c95e73c15c0
Author: Keith Marshall <[email protected]>
Date:   Tue May 25 16:06:58 2021 +0100

    Add "legacy-safe" emulation of Microsoft's version helpers API.

commit e5e5f0625a26ec0902f0f23cea7e1be098f8ee39
Author: Keith Marshall <[email protected]>
Date:   Tue May 25 15:28:11 2021 +0100

    Correct an entry-point look-up logic defect.

-----------------------------------------------------------------------

Summary of changes:
 w32api/ChangeLog                |  23 ++++++
 w32api/Makefile.in              |   2 +-
 w32api/include/versionhelpers.h | 103 +++++++++++++++++++++++
 w32api/lib/availapi.c           |   2 +-
 w32api/lib/osvercmp.c           | 178 ++++++++++++++++++++++++++++++++++++++++
 5 files changed, 306 insertions(+), 2 deletions(-)
 create mode 100644 w32api/include/versionhelpers.h
 create mode 100644 w32api/lib/osvercmp.c


hooks/post-receive
-- 
mingw-org-wsl (mingw)



------------------------------

Message: 2
Date: Tue, 25 May 2021 16:48:05 +0100
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #42344: Implement a generic
        infrastructure to facilitate run-time linking of API functions
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

#42344: Implement a generic infrastructure to facilitate run-time linking of 
API functions

  Open Date: 2021-05-21 20:46
Last Update: 2021-05-25 16:48

URL for this Ticket:
    https://osdn.net//projects/mingw/ticket/42344
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=42344

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2021-05-25 16:48 Updated by: keith
 * Resolution Update from None to Accepted

Comment:

Well it appeared to be working, so I committed 7b37e9a.  I then moved on to 
ticket #42383, which unfortunately revealed a careless logic error ... 
corrected by commit e5e5f06.

---------------------------------------------------------------------
Ticket Status:

      Reporter: keith
         Owner: keith
          Type: Feature Request
        Status: Open [Owner assigned]
      Priority: 5 - Medium
     MileStone: (None)
     Component: WSL
      Severity: 5 - Medium
    Resolution: Accepted
---------------------------------------------------------------------

Ticket details:

As support for new (Windows version-dependent) APIs is added to MinGW, there is 
increased potential for creating an application which will not load, much less 
run, on legacy Windows versions; the typical manifestation of such a load 
failure is that the process crashes with an "entry point not found" exception, 
for the unsupported DLL function, before the main() function even gets control, 
so there's no opportunity to handle the exception.
The only way to mitigate such exceptions, such that the application retains 
control, is to always link potentially unsupported API functions dynamically, 
at run-time, by retrieval of an entry-point reference, using GetProcAddress(), 
and to always invoke the function via the reference pointer, (and never call it 
directly, by name).  The mechanism for dynamically linking such functions is 
mostly the same, in each case, often resulting in significant repetitive 
coding; it would be a great convenience, if MinGW were to implement a generic 
API infrastructure, to encapsulate the common features of the required run-time 
linking interface.

-- 
Ticket information of MinGW - Minimalist GNU for Windows project
MinGW - Minimalist GNU for Windows Project is hosted on OSDN

Project URL: https://osdn.net/projects/mingw/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/mingw/ticket/42344
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=42344


------------------------------

Message: 3
Date: Tue, 25 May 2021 17:14:12 +0100
From: MinGW Notification List <[email protected]>
To: OSDN Ticket System <[email protected]>
Subject: [MinGW-Notify] [mingw] #42383: Implement a "legacy-safe"
        emulation of Microsoft's "versionhelpers" API.
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

#42383: Implement a "legacy-safe" emulation of Microsoft's "versionhelpers" API.

  Open Date: 2021-05-24 20:00
Last Update: 2021-05-25 17:14

URL for this Ticket:
    https://osdn.net//projects/mingw/ticket/42383
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=42383

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2021-05-25 17:14 Updated by: keith
 * Resolution Update from None to Accepted

Comment:

I committed 475f0b6.  With this in place, the trivial program:
 #include <stdio.h> #include <versionhelpers.h> #include "legacy.h"  const char 
*test( BOOL status ) { return status ? "is" : "is not"; }  void report( const 
char *what, BOOL status ) { printf( "%s %s supported\n", what, test( status ) 
); }  int main() { printf( "Host %s a Windows server\n", test( 
IsWindowsServer() ) );   report( "WinXP", IsWindowsXPOrGreater() );   report( 
"WinXP-SP1", IsWindowsXPSP1OrGreater() );   report( "WinXP-SP2", 
IsWindowsXPSP2OrGreater() );   report( "WinXP-SP3", IsWindowsXPSP3OrGreater() 
);   report( "Vista", IsWindowsVistaOrGreater() );   report( "Vista-SP1", 
IsWindowsVistaSP1OrGreater() );   report( "Vista-SP2", 
IsWindowsVistaSP2OrGreater() );   report( "Win7", IsWindows7OrGreater() );   
report( "Win7-SP1", IsWindows7SP1OrGreater() );   report( "Win8", 
IsWindows8OrGreater() );   report( "Win8.1", IsWindows8Point1OrGreater() );   
report( "Win10", IsWindows10OrGreater() );   return 0; }produces this output, 
when run on a WinXP-SP2 virtual machine:
Host is not a Windows server
WinXP is supported
WinXP-SP1 is supported
WinXP-SP2 is supported
WinXP-SP3 is not supported
Vista is not supported
Vista-SP1 is not supported
Vista-SP2 is not supported
Win7 is not supported
Win7-SP1 is not supported
Win8 is not supported
Win8.1 is not supported
Win10 is not supported
while on a Win7-SP1 VM, it produces:
Host is not a Windows server
WinXP is supported
WinXP-SP1 is supported
WinXP-SP2 is supported
WinXP-SP3 is supported
Vista is supported
Vista-SP1 is supported
Vista-SP2 is supported
Win7 is supported
Win7-SP1 is supported
Win8 is not supported
Win8.1 is not supported
Win10 is not supported

I don't have ready access to any other Windows hosts, so if anyone else is able 
to help with further testing, it would be appreciated.


---------------------------------------------------------------------
Ticket Status:

      Reporter: keith
         Owner: keith
          Type: Feature Request
        Status: Open [Owner assigned]
      Priority: 5 - Medium
     MileStone: (None)
     Component: WSL
      Severity: 5 - Medium
    Resolution: Accepted
---------------------------------------------------------------------

Ticket details:

The Ada component for GCC-10 has introduced a gratuitous dependency on 
Microsoft's <versionhelpers.h> API.  Notwithstanding that this is an appalling 
choice, by the GCC-Ada developers — OS version, (which is what this API tests,) 
is never a reliable indicator of feature availability — to facilitate 
continuing support for GCC-Ada, in MinGW, it is almost imperative that we 
provide our own <versionhelpers.h> API emulation; (the alternative would be to 
commit to patching future versions of GCC-Ada, in perpetuity, to circumvent 
this ill-advised dependency).

-- 
Ticket information of MinGW - Minimalist GNU for Windows project
MinGW - Minimalist GNU for Windows Project is hosted on OSDN

Project URL: https://osdn.net/projects/mingw/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/mingw/ticket/42383
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=42383


------------------------------

Subject: Digest Footer

_______________________________________________
MinGW-Notify mailing list
[email protected]
https://lists.osdn.me/mailman/listinfo/mingw-notify


------------------------------

End of MinGW-Notify Digest, Vol 44, Issue 13
********************************************

Reply via email to