New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ldap: fix MinGW compiler warning #1664

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@MarcelRaad
Member

MarcelRaad commented Jul 8, 2017

ldap_bind_s is marked as deprecated in w32api's winldap.h shipping with
the latest original MinGW, resulting in compiler warnings since commit
f0fe66f. Fix this for the non-SSPI
case by using ldap_simple_bind_s again instead of ldap_bind_s with
LDAP_AUTH_SIMPLE.

ldap: fix MinGW compiler warning
ldap_bind_s is marked as deprecated in w32api's winldap.h shipping with
the latest original MinGW, resulting in compiler warnings since commit
f0fe66f. Fix this for the non-SSPI
case by using ldap_simple_bind_s again instead of ldap_bind_s with
LDAP_AUTH_SIMPLE.

@MarcelRaad MarcelRaad requested a review from snikulov Jul 8, 2017

@mention-bot

This comment has been minimized.

mention-bot commented Jul 8, 2017

@MarcelRaad, thanks for your PR! By analyzing the history of the files in this pull request, we identified @captain-caveman2k, @bagder and @gknauf to be potential reviewers.

@coveralls

This comment has been minimized.

coveralls commented Jul 8, 2017

Coverage Status

Coverage increased (+0.08%) to 76.045% when pulling 3a1cde1 on MarcelRaad:ldap_mingw into a548183 on curl:master.

@snikulov

This comment has been minimized.

Member

snikulov commented Jul 8, 2017

@MarcelRaad It is not deprecated in Windows SDK https://msdn.microsoft.com/en-us/library/aa366156(v=vs.85).aspx.

So if you try to solve MinGW problem, could you please use #if defined(MINGW)... or something?

@MarcelRaad

This comment has been minimized.

Member

MarcelRaad commented Jul 8, 2017

@snikulov Thanks for the comment! Yes, I have that problem only with MinGW (or, to be exact, with w32api, which is MinGW's version of the Windows SDK). But I don't understand what an #ifdef would gain us - do you think there is any downside of always using ldap_simple_bind_s instead of ldap_bind_s(..., LDAP_AUTH_SIMPLE) for simplicity?

(FWIW, ldap_bind_s seems to be deprecated in most implementations - OpenLDAP, IBM, Novell, Mozilla... - with recommendation to either use ldap_simple_bind_s or ldap_sasl_bind_s.)

@jay

This comment has been minimized.

Member

jay commented Jul 10, 2017

Both functions are documented for Vista+ but some searching just now shows them being used on earlier versions. Is one known to be more available than the other?

@snikulov

This comment has been minimized.

Member

snikulov commented Jul 10, 2017

@MarcelRaad @jay Changes looks good to me. ldap_simple_bind_s <=> ldap_bind_s + LDAP_AUTH_SIMPLE.
So go ahead and merge these changes.

@snikulov

LGTM

@MarcelRaad

This comment has been minimized.

Member

MarcelRaad commented Jul 10, 2017

ldap_simple_bind_s is available unconditionally in the Windows SDK that ships with Visual Studio 2005, which is the lowest version I have access to.

Thanks for the review!

@MarcelRaad MarcelRaad deleted the MarcelRaad:ldap_mingw branch Jul 10, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment