Skip to content

Fix issues with the Win32 implementation of the POSIX dynamic library API#379

Merged
manojampalam merged 2 commits into
PowerShell:latestw_allfrom
spencercw:latestw_all
May 21, 2019
Merged

Fix issues with the Win32 implementation of the POSIX dynamic library API#379
manojampalam merged 2 commits into
PowerShell:latestw_allfrom
spencercw:latestw_all

Conversation

@spencercw

Copy link
Copy Markdown

dlerror() is supposed to return a char *, but currently returns a DWORD. Reimplement it using the Win32 FormatMessage function.

The only place dlerror() is used is ssh-pkcs11.c, which is not currently compiled into the Windows version. However, PR #331 enables PKCS#11 support, so if that PR is merged then this one should be also.

@msftclas

msftclas commented Mar 2, 2019

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@spencercw spencercw mentioned this pull request Mar 2, 2019
Comment thread contrib/win32/win32compat/misc.c Outdated
Comment thread contrib/win32/win32compat/misc.c
@spencercw

Copy link
Copy Markdown
Author

I have changed it to trim the trailing line break as well to be more conformant to the dlerror() spec.

dlerror() is supposed to return a char *, but currently returns a
DWORD. Reimplement it using the Win32 FormatMessage function.
@spencercw

Copy link
Copy Markdown
Author

Fixed a warning..

Comment thread contrib/win32/win32compat/misc.c Outdated
@spencercw spencercw changed the title Fix Win32 implementation of dlerror() Fix issues with the Win32 implementation of the POSIX dynamic library API Mar 26, 2019
@manojampalam manojampalam merged commit 3449eb2 into PowerShell:latestw_all May 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants