Skip to content

Commit

Permalink
allowing the compilation to succeed with --enable-examples when libcu…
Browse files Browse the repository at this point in the history
…rl is absent
  • Loading branch information
Edrusb committed Aug 24, 2024
1 parent fe1a7a4 commit 09c2403
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/testing/test_mycurl_param_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ int main(int argc, char *argv[])

void f1(int argc, char *argv[])
{
#if defined ( LIBCURL_AVAILABLE ) && defined ( LIBTHREADAR_AVAILABLE )

mycurl_param_list mylist;
string type1 = "hello world";
S_I type2 = 50;
Expand Down Expand Up @@ -131,10 +133,13 @@ void f1(int argc, char *argv[])
cout << "size = " << mylist.size() << endl;
if(mylist.get_val(CURLOPT_HEADER, type2_ptr))
cout << "val(HEADER) = " << *type2_ptr << endl;
#endif
}

void f2()
{
#if defined ( LIBCURL_AVAILABLE ) && defined ( LIBTHREADAR_AVAILABLE )

mycurl_param_list current;
mycurl_param_list wanted;
const foo* ptr;
Expand Down Expand Up @@ -164,10 +169,13 @@ void f2()
cout << "modified = " << *modit << endl;
++modit;
}
#endif
}

void f3()
{
#if defined ( LIBCURL_AVAILABLE ) && defined ( LIBTHREADAR_AVAILABLE )

mycurl_param_list source;

source.add(CURLOPT_VERBOSE, foo(1));
Expand All @@ -178,4 +186,5 @@ void f3()
cout << source.size() << endl;
cout << dst.size() << endl;
cout << dst2.size() << endl;
#endif
}

0 comments on commit 09c2403

Please sign in to comment.