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

Comments

Projects
None yet
3 participants
@ydnath
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 from CURL to CURL compilation failure in telnet.c Jul 19, 2017

@ydnath ydnath changed the title from CURL compilation failure in telnet.c to cUrl compilation failure in telnet.c Jul 19, 2017

@ydnath ydnath changed the title from cUrl compilation failure in telnet.c to cUrl compilation failure in telnet.c and tftp.c Jul 19, 2017

@bagder

This comment has been minimized.

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

This comment has been minimized.

Contributor

ydnath commented Jul 21, 2017

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

@jay

This comment has been minimized.

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

This comment has been minimized.

Member

bagder commented Jul 31, 2017

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

@bagder bagder removed the help wanted label Jul 31, 2017

jay added a commit that referenced this issue Aug 1, 2017

curl_setup: Define CURL_NO_OLDIES for building libcurl
.. 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.