Skip to content
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

cUrl compilation failure in telnet.c and tftp.c #1688

Closed
ydnath opened this issue Jul 19, 2017 · 4 comments
Closed

cUrl compilation failure in telnet.c and tftp.c #1688

ydnath opened this issue Jul 19, 2017 · 4 comments

Comments

@ydnath
Copy link
Contributor

ydnath commented Jul 19, 2017

I did this

When I built the 7.54.0 version with CURL_NO_OLDIES, there is a compilation error for

  1. https://github.com/curl/curl/blob/master/lib/telnet.c#L902
    CURLE_UNKNOWN_TELNET_OPTION is defined at https://github.com/curl/curl/blob/master/include/curl/curl.h#L576 but under #ifndef CURL_NO_OLDIES

  2. https://github.com/curl/curl/blob/master/lib/tftp.c#L1348
    CURLE_BAD_CALLING_ORDER is defined at
    https://github.com/curl/curl/blob/master/include/curl/curl.h#L586 but under #ifndef CURL_NO_OLDIES

I expected the following

Define CURLE_UNKNOWN_TELNET_OPTION and CURLE_BAD_CALLING_ORDER under the new enum set or reuse one of the enums defined. [I did reuse and it fixed the compilation issues]

curl/libcurl version

7.54.0
[curl -V output]

operating system

FreeBSD

@ydnath ydnath changed the title CURL CURL compilation failure in telnet.c Jul 19, 2017
@ydnath ydnath changed the title CURL compilation failure in telnet.c cUrl compilation failure in telnet.c Jul 19, 2017
@ydnath ydnath changed the title cUrl compilation failure in telnet.c cUrl compilation failure in telnet.c and tftp.c Jul 19, 2017
@bagder
Copy link
Member

bagder commented Jul 20, 2017

I think a fix should make the code not use these return codes anymore, and probably make sure that libcurl always gets built with NO_OLDIES set...

@ydnath
Copy link
Contributor Author

ydnath commented Jul 21, 2017

Thank you @bagder for the confirmation. Will submit a pull request.

@jay
Copy link
Member

jay commented Jul 31, 2017

I think a fix should make the code not use these return codes anymore, and probably make sure that libcurl always gets built with NO_OLDIES set...

The fix that just landed replaces the codes, thanks to @ydnath. If you want to build it with no oldies by default how about something like this in curl_setup

diff --git a/lib/curl_setup.h b/lib/curl_setup.h
index fc597d7..4a3b85c 100644
--- a/lib/curl_setup.h
+++ b/lib/curl_setup.h
@@ -22,6 +22,10 @@
  *
  ***************************************************************************/
 
+#if defined(BUILDING_LIBCURL) && !defined(CURL_NO_OLDIES)
+#define CURL_NO_OLDIES
+#endif
+
 /*
  * Define WIN32 when build target is Win32 API
  */

@bagder
Copy link
Member

bagder commented Jul 31, 2017

@jay, I'd 👍 such a PR! =)

jay added a commit that referenced this issue Aug 1, 2017
.. to catch accidental use of deprecated error codes.

Ref: #1688 (comment)
@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants