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, <[email protected]>, 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 <
[email protected]>:

> 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

Reply via email to