remove re-declaration of global "type" in curl/curl.h #76

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@shawnl
shawnl commented Aug 13, 2013

C does NOT have nested scopes

@bagder
Member
bagder commented Aug 13, 2013

http://curl.haxx.se/dev/contribute.html#Please_don_t_send_pull_requests

I want patches reviewed and discussed on the mailing list so that everyone can be involved. Please always take it there first!

Can you also clarify what problem this caused you?

@kdudka
Collaborator
kdudka commented Aug 13, 2013

The problem may look as simply as this:

#include <curl/curl.h>

enum type {
    USER_PROVIDED_ENUM
};

It would be safer to prefix globally-scoped symbols with the curl_ prefix or something like that. On the other hand, certain changes in public header files after the release are painful too.

@bagder
Member
bagder commented Aug 21, 2013

Crickets. I took it to the list myself => http://curl.haxx.se/mail/lib-2013-08/0213.html

@bagder bagder closed this Aug 21, 2013
@boutetnico boutetnico pushed a commit to ETrun/curl that referenced this pull request Nov 16, 2013
@bagder bagder curl.h: name space pollution by "enum type"
Renamed to "enum curl_khtype" now. Will break compilation for programs
that rely on the enum name.

Bug: curl#76
Reported-by: Shawn Landden
fc99eaa
@bagder bagder added a commit that referenced this pull request Aug 24, 2015
@razvan-cojocaru @bagder razvan-cojocaru + bagder getinfo: added CURLINFO_ACTIVESOCKET
This patch addresses known bug #76, where on 64-bit Windows SOCKET is 64
bits wide, but long is only 32, making CURLINFO_LASTSOCKET unreliable.

Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
62f306f
@jgsogo jgsogo added a commit to jgsogo/curl that referenced this pull request Oct 19, 2015
@razvan-cojocaru @jgsogo razvan-cojocaru + jgsogo getinfo: added CURLINFO_ACTIVESOCKET
This patch addresses known bug #76, where on 64-bit Windows SOCKET is 64
bits wide, but long is only 32, making CURLINFO_LASTSOCKET unreliable.

Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
e132767
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment