Hacker News new | past | comments | ask | show | jobs | submit login

I would think the proper way to do this would be

  #if defined(BUILDING_LIBCURL)
    struct Curl_easy {
      …
    }
  #else
    struct Curl_easy;
  #endif
  typedef struct Curl_easy CURL;
If BUILDING_LIBCURL isn’t defined that tells code “CURL is identical to a struct named Curl_easy”. If it is defined, that also tells code what fields it has.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: