Skip to content

Remove unused CMake variables#3166

Closed
ruslo wants to merge 1 commit intocurl:masterfrom
ruslo:pr.unused
Closed

Remove unused CMake variables#3166
ruslo wants to merge 1 commit intocurl:masterfrom
ruslo:pr.unused

Conversation

@ruslo
Copy link
Contributor

@ruslo ruslo commented Oct 24, 2018

Remove variables:

  • HAVE_SOCKLEN_T
  • CURL_SIZEOF_CURL_SOCKLEN_T
  • CURL_TYPEOF_CURL_SOCKLEN_T

Remove variables:
* HAVE_SOCKLEN_T
* CURL_SIZEOF_CURL_SOCKLEN_T
* CURL_TYPEOF_CURL_SOCKLEN_T
@jzakrzewski
Copy link
Contributor

If those are really unused, aren't the checks in autotools also redundant?

@ruslo
Copy link
Contributor Author

ruslo commented Oct 24, 2018

aren't the checks in autotools also redundant?

You mean this part:

  • curl/acinclude.m4

    Lines 1898 to 1899 in 4f2541f

    CURL_DEFINE_UNQUOTED([CURL_TYPEOF_CURL_SOCKLEN_T], [$curl_typeof_curl_socklen_t])
    CURL_DEFINE_UNQUOTED([CURL_SIZEOF_CURL_SOCKLEN_T], [$curl_sizeof_curl_socklen_t])

?

CURL_SIZEOF_CURL_SOCKLEN_T can be removed indeed. I think it can be done as a follow-up by a person who use autotools to build CURL and have some experience with the language, because some related code should be removed too.

I'm not so sure about CURL_TYPEOF_CURL_SOCKLEN_T. CURL_TYPEOF_CURL_SOCKLEN_T defined at compile time for almost all cases except few, so probably the value of CURL_TYPEOF_CURL_SOCKLEN_T defined by autotools sometimes used (?):

Anyway CURL_TYPEOF_CURL_SOCKLEN_T is not used in CMake part because it's not defined here:

@bagder
Copy link
Member

bagder commented Oct 24, 2018

CURL_TYPEOF_CURL_SOCKLEN_T

This is defined by the public header curl/system.h so that should be totally fine to not define separately.

I can take care of the autotools cleanup of the *SOCKLEN_T macros.

@jzakrzewski
Copy link
Contributor

Yeah, I meant that.
It would be quite surprising if one build system needed to define those and other didn't.

bagder added a commit that referenced this pull request Oct 25, 2018
Follow-up to #3166 which did the cmake part of this. This type/define is
not used.
@bagder bagder closed this in b04e624 Oct 25, 2018
bagder added a commit that referenced this pull request Oct 25, 2018
Follow-up to #3166 which did the cmake part of this. This type/define is
not used.

Closes #3168
@ruslo ruslo deleted the pr.unused branch October 25, 2018 13:32
@lock lock bot locked as resolved and limited conversation to collaborators Jan 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants