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

Fix build with ALTSVC enabled and COOKIES disabled #3717

Closed
wants to merge 6 commits into from

Conversation

@sunpoet
Copy link
Contributor

commented Mar 30, 2019

ALTSVC requires Curl_get_line which is defined in lib/cookie.c inside a #if
check of HTTP and COOKIES. That makes Curl_get_line undefined if COOKIES is
disabled. This is a workaround to define Curl_get_line unconditionally.

ALTSVC requires Curl_get_line which is defined in lib/cookie.c inside a #if
check of HTTP and COOKIES. That makes Curl_get_line undefined if COOKIES is
disabled. This is a workaround to define Curl_get_line unconditionally.
@sunpoet

This comment has been minimized.

Copy link
Contributor Author

commented Mar 30, 2019

This is just the workaround I committed for FreeBSD ports tree. You might want to move it to a new place, e.g. lib/curl_get_line.c and lib/curl_get_line.h.

Copy link
Member

left a comment

I'm more inclined to move this into a generic utilities file, or a file-specific utilities file. It's not very logical to keep it cookie.c now that it has multiple consumers.

Assuming there is buy-in from other maintainers, I'm happy to pick that up in case you're not interested in pursuing that patch.

@bagder

This comment has been minimized.

Copy link
Member

commented Apr 4, 2019

I agree with you @danielgustafsson. I was mostly just lazy when I left it there in my alt-svc patch...

@danielgustafsson

This comment has been minimized.

Copy link
Member

commented Apr 4, 2019

I agree with you @danielgustafsson. I was mostly just lazy when I left it there in my alt-svc patch...

Cool, let's do it. @sunpoet do you want to pursue this patch? If not then I'm fine to pick it up.

sunpoet added 3 commits Apr 6, 2019
It's a better way to fix build with ALTSVC enabled and COOKIES disabled.
@sunpoet

This comment has been minimized.

Copy link
Contributor Author

commented Apr 6, 2019

I agree with you @danielgustafsson. I was mostly just lazy when I left it there in my alt-svc patch...

Cool, let's do it. @sunpoet do you want to pursue this patch? If not then I'm fine to pick it up.

I've prepared the patch which moves Curl_get_line to lib/curl_get_line.[ch].

@@ -24,6 +24,7 @@
#include "curl_setup.h"

#include <curl/curl.h>
#include "curl_get_line.h"

This comment has been minimized.

Copy link
@MarcelRaad

MarcelRaad Apr 7, 2019

Member

This isn't used in the header, is it? I'd rather move it to the implementation file.


#include "curl_setup.h"

#include "curl_get_line.h"

This comment has been minimized.

Copy link
@danielgustafsson

danielgustafsson Apr 8, 2019

Member

This should also include the following headers after curl_get_line.h:

#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
@bagder bagder added the build label Apr 12, 2019
@bagder

This comment has been minimized.

Copy link
Member

commented Apr 12, 2019

@sunpoet, are you up to taking this all the way to the finishing line?

Suggested by @MarcelRaad and @danielgustafsson
@sunpoet

This comment has been minimized.

Copy link
Contributor Author

commented Apr 12, 2019

I just committed the changes suggested by @MarcelRaad and @danielgustafsson. Thanks!

It is a followup fix of 67ba6c3.
@danielgustafsson

This comment has been minimized.

Copy link
Member

commented Apr 20, 2019

Pushed squashed and with some minor editorialization to the commit message, thanks for contributing!

@sunpoet

This comment has been minimized.

Copy link
Contributor Author

commented Apr 20, 2019

Thanks!

@lock lock bot locked as resolved and limited conversation to collaborators Jul 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants
You can’t perform that action at this time.