curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Compilation issues with bufref in 7.78.0

From: Abhinav Singhal via curl-library <curl-library_at_lists.haxx.se>
Date: Wed, 1 Sep 2021 22:53:31 -0400

Thanks a lot, Henrik. I downloaded libcurl again, and was able to compile
it without a glitch. As you pointed out, something somewhere must have
gotten messed up in my earlier attempt.
Thanks again.

On Wed, Sep 1, 2021 at 3:21 PM Henrik Holst <henrik.holst_at_millistream.com>
wrote:

> I just downloaded curl-7.78.0.tar.gz to check and the lib/bufref.h does
> not contain any #include. Something bad must have happened to your download
> or during unpacking.
>
> This is how the file looks in the archive:
>
> #ifndef HEADER_CURL_BUFREF_H
> #define HEADER_CURL_BUFREF_H
>
> /***************************************************************************
> * _ _ ____ _
> * Project ___| | | | _ \| |
> * / __| | | | |_) | |
> * | (__| |_| | _ <| |___
> * \___|\___/|_| \_\_____|
> *
> * Copyright (C) 2021, Daniel Stenberg, <daniel_at_haxx.se>, et al.
> *
> * This software is licensed as described in the file COPYING, which
> * you should have received as part of this distribution. The terms
> * are also available at https://curl.se/docs/copyright.html.
> *
> * You may opt to use, copy, modify, merge, publish, distribute and/or sell
> * copies of the Software, and permit persons to whom the Software is
> * furnished to do so, under the terms of the COPYING file.
> *
> * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
> ANY
> * KIND, either express or implied.
> *
>
> ***************************************************************************/
>
> /*
> * Generic buffer reference.
> */
> struct bufref {
> void (*dtor)(void *); /* Associated destructor. */
> const unsigned char *ptr; /* Referenced data buffer. */
> size_t len; /* The data size in bytes. */
> #ifdef DEBUGBUILD
> int signature; /* Detect API use mistakes. */
> #endif
> };
>
>
> void Curl_bufref_init(struct bufref *br);
> void Curl_bufref_set(struct bufref *br, const void *ptr, size_t len,
> void (*dtor)(void *));
> const unsigned char *Curl_bufref_ptr(const struct bufref *br);
> size_t Curl_bufref_len(const struct bufref *br);
> CURLcode Curl_bufref_memdup(struct bufref *br, const void *ptr, size_t
> len);
> void Curl_bufref_free(struct bufref *br);
>
> /HH
>
> Den ons 1 sep. 2021 kl 21:02 skrev Abhinav Singhal via curl-library <
> curl-library_at_lists.haxx.se>:
>
>> Hi,
>>
>> I’m facing compilation issues while building libcurl 7.78.0 with the
>> newly added bufref.c and bufref.h files.
>>
>>
>>
>> For instance, bufref.h itself contains a “#include bufref.h” statement,
>> i.e. it hash includes itself, which gives the error "#include nested too
>> deeply". Once I removed it, it gave the error “incomplete definition of
>> type struct bufref”, because the definition of struct bufref is nowhere to
>> be found.
>>
>>
>>
>> I downloaded curl-7.78.0.tar.gz from curl.se/download.html. I am new to
>> libcurl, so I’m wondering if I missed something somewhere. Any pointers
>> would help.
>> --
>> Unsubscribe: https://lists.haxx.se/listinfo/curl-library
>> Etiquette: https://curl.haxx.se/mail/etiquette.html
>>
>


-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2021-09-02