조성현

curl 환경설정 및 테스트 코드 추가

...@@ -876,63 +876,15 @@ void GraphItem::test() ...@@ -876,63 +876,15 @@ void GraphItem::test()
876 { 876 {
877 qDebug("* test action start"); 877 qDebug("* test action start");
878 878
879 - //지정한 사람 주변 topk coloring 879 + //count 테스트
880 -
881 -
882 -
883 -
884 - //vertex_iterator vi, vi_end;
885 - //Graph::adjacency_iterator ai, ai_end;
886 -
887 -
888 -
889 - //
890 - // <record, label>
891 - //TopKHeap<pair<int, string>> heap(TOP_K);
892 - //for (boost::tie(vi, vi_end) = boost::vertices(*graph); vi != vi_end; ++vi) {
893 - // if (node_type_map[*vi] != NODE_TYPE::NODE_AUTHOR) {
894 - // continue;
895 - // }
896 -
897 - // int record_cnt = 0;
898 - // for (boost::tie(ai, ai_end) = boost::adjacent_vertices(*vi, *graph);
899 - // ai != ai_end; ++ai) {
900 - // if (node_type_map[*ai] == NODE_TYPE::NODE_PAPER) {
901 - // ++record_cnt;
902 - // }
903 - // }
904 -
905 - // boost::put(vertex_record, *graph, *vi, record_cnt);
906 - // heap.push(make_pair(record_cnt, node_label_map[*vi]));
907 -
908 - // //qDebug() << record_cnt;
909 - //}
910 -
911 - ////get top K records
912 - //pair<int, string> topk_arr[TOP_K];
913 - //for (int i = 0; i < TOP_K; ++i) {
914 - // topk_arr[i] = heap.pop();
915 - // qDebug() << "topk[" << i << "] = " << topk_arr[i].first << ", " << QString::fromStdString(topk_arr[i].second);
916 - //}
917 -
918 -
919 - //for (auto& n : nodeList) {
920 - // auto label = n->getLabel();
921 - // n->setColor(QColor(Qt::lightGray));
922 - // for (auto& p : topk_arr) {
923 - // if (label.toStdString() == p.second) {
924 - // n->setColor(QColor(Qt::red));
925 - // break;
926 - // }
927 - // }
928 - //}
929 -
930 880
931 //전체노드 색 변경 881 //전체노드 색 변경
932 for (auto& n: nodeList) { 882 for (auto& n: nodeList) {
933 n->setColor(Qt::lightGray); 883 n->setColor(Qt::lightGray);
934 } 884 }
935 885
886 +
887 +
936 qDebug("* test action end"); 888 qDebug("* test action end");
937 } 889 }
938 890
......
...@@ -60,27 +60,27 @@ ...@@ -60,27 +60,27 @@
60 </PropertyGroup> 60 </PropertyGroup>
61 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> 61 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
62 <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir> 62 <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
63 - <IncludePath>C:\boost\boost_1_63_0;$(IncludePath)</IncludePath> 63 + <IncludePath>include;C:\boost\boost_1_63_0;$(IncludePath)</IncludePath>
64 - <LibraryPath>C:\boost\boost_1_63_0\stage\lib;$(LibraryPath)</LibraryPath> 64 + <LibraryPath>lib;C:\boost\boost_1_63_0\stage\lib;$(LibraryPath)</LibraryPath>
65 </PropertyGroup> 65 </PropertyGroup>
66 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> 66 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
67 <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir> 67 <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
68 - <IncludePath>C:\boost\boost_1_63_0;$(IncludePath)</IncludePath> 68 + <IncludePath>include;C:\boost\boost_1_63_0;$(IncludePath)</IncludePath>
69 - <LibraryPath>C:\boost\boost_1_63_0\stage\lib;$(LibraryPath)</LibraryPath> 69 + <LibraryPath>lib;C:\boost\boost_1_63_0\stage\lib;$(LibraryPath)</LibraryPath>
70 </PropertyGroup> 70 </PropertyGroup>
71 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> 71 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
72 <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir> 72 <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
73 - <IncludePath>C:\boost\boost_1_63_0;$(IncludePath)</IncludePath> 73 + <IncludePath>include;C:\boost\boost_1_63_0;$(IncludePath)</IncludePath>
74 - <LibraryPath>C:\boost\boost_1_63_0\stage\lib;$(LibraryPath)</LibraryPath> 74 + <LibraryPath>lib;C:\boost\boost_1_63_0\stage\lib;$(LibraryPath)</LibraryPath>
75 </PropertyGroup> 75 </PropertyGroup>
76 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> 76 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
77 <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir> 77 <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
78 - <IncludePath>C:\boost\boost_1_63_0;$(IncludePath)</IncludePath> 78 + <IncludePath>include;C:\boost\boost_1_63_0;$(IncludePath)</IncludePath>
79 - <LibraryPath>C:\boost\boost_1_63_0\stage\lib;$(LibraryPath)</LibraryPath> 79 + <LibraryPath>lib;C:\boost\boost_1_63_0\stage\lib;$(LibraryPath)</LibraryPath>
80 </PropertyGroup> 80 </PropertyGroup>
81 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> 81 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
82 <ClCompile> 82 <ClCompile>
83 - <PreprocessorDefinitions>UNICODE;WIN32;QT_DLL;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> 83 + <PreprocessorDefinitions>UNICODE;WIN32;QT_DLL;CURL_STATICLIB;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
84 <AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> 84 <AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
85 <Optimization>Disabled</Optimization> 85 <Optimization>Disabled</Optimization>
86 <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> 86 <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
...@@ -93,12 +93,12 @@ ...@@ -93,12 +93,12 @@
93 <OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile> 93 <OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
94 <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> 94 <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
95 <GenerateDebugInformation>true</GenerateDebugInformation> 95 <GenerateDebugInformation>true</GenerateDebugInformation>
96 - <AdditionalDependencies>qtmaind.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Widgetsd.lib;%(AdditionalDependencies)</AdditionalDependencies> 96 + <AdditionalDependencies>qtmaind.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Widgetsd.lib;libcurld.lib;%(AdditionalDependencies);ws2_32.lib;wldap32.lib</AdditionalDependencies>
97 </Link> 97 </Link>
98 </ItemDefinitionGroup> 98 </ItemDefinitionGroup>
99 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> 99 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
100 <ClCompile> 100 <ClCompile>
101 - <PreprocessorDefinitions>UNICODE;WIN32;QT_DLL;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> 101 + <PreprocessorDefinitions>UNICODE;WIN32;QT_DLL;CURL_STATICLIB;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
102 <AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> 102 <AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
103 <Optimization>Disabled</Optimization> 103 <Optimization>Disabled</Optimization>
104 <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> 104 <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
...@@ -111,12 +111,12 @@ ...@@ -111,12 +111,12 @@
111 <OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile> 111 <OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
112 <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> 112 <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
113 <GenerateDebugInformation>true</GenerateDebugInformation> 113 <GenerateDebugInformation>true</GenerateDebugInformation>
114 - <AdditionalDependencies>qtmaind.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Widgetsd.lib;%(AdditionalDependencies)</AdditionalDependencies> 114 + <AdditionalDependencies>qtmaind.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Widgetsd.lib;libcurld.lib;%(AdditionalDependencies);ws2_32.lib;wldap32.lib</AdditionalDependencies>
115 </Link> 115 </Link>
116 </ItemDefinitionGroup> 116 </ItemDefinitionGroup>
117 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> 117 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
118 <ClCompile> 118 <ClCompile>
119 - <PreprocessorDefinitions>UNICODE;WIN32;QT_DLL;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> 119 + <PreprocessorDefinitions>UNICODE;WIN32;QT_DLL;CURL_STATICLIB;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
120 <AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> 120 <AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
121 <DebugInformationFormat /> 121 <DebugInformationFormat />
122 <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> 122 <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
...@@ -128,12 +128,12 @@ ...@@ -128,12 +128,12 @@
128 <OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile> 128 <OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
129 <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> 129 <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
130 <GenerateDebugInformation>false</GenerateDebugInformation> 130 <GenerateDebugInformation>false</GenerateDebugInformation>
131 - <AdditionalDependencies>qtmain.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;%(AdditionalDependencies)</AdditionalDependencies> 131 + <AdditionalDependencies>qtmain.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;libcurl.lib;%(AdditionalDependencies);ws2_32.lib;wldap32.lib</AdditionalDependencies>
132 </Link> 132 </Link>
133 </ItemDefinitionGroup> 133 </ItemDefinitionGroup>
134 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> 134 <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
135 <ClCompile> 135 <ClCompile>
136 - <PreprocessorDefinitions>UNICODE;WIN32;QT_DLL;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> 136 + <PreprocessorDefinitions>UNICODE;WIN32;QT_DLL;CURL_STATICLIB;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
137 <AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> 137 <AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
138 <DebugInformationFormat /> 138 <DebugInformationFormat />
139 <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> 139 <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
145 <OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile> 145 <OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
146 <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> 146 <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
147 <GenerateDebugInformation>false</GenerateDebugInformation> 147 <GenerateDebugInformation>false</GenerateDebugInformation>
148 - <AdditionalDependencies>qtmain.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;%(AdditionalDependencies)</AdditionalDependencies> 148 + <AdditionalDependencies>qtmain.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;libcurl.lib;%(AdditionalDependencies);ws2_32.lib;wldap32.lib</AdditionalDependencies>
149 </Link> 149 </Link>
150 </ItemDefinitionGroup> 150 </ItemDefinitionGroup>
151 <ItemGroup> 151 <ItemGroup>
...@@ -202,19 +202,19 @@ ...@@ -202,19 +202,19 @@
202 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> 202 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
203 <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing PaperGraphWidget.h...</Message> 203 <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing PaperGraphWidget.h...</Message>
204 <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> 204 <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
205 - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../PaperGraphWidget.h"</Command> 205 + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DCURL_STATICLIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../PaperGraphWidget.h"</Command>
206 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> 206 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
207 <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing PaperGraphWidget.h...</Message> 207 <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing PaperGraphWidget.h...</Message>
208 <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> 208 <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
209 - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../PaperGraphWidget.h"</Command> 209 + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DCURL_STATICLIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../PaperGraphWidget.h"</Command>
210 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> 210 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
211 <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing PaperGraphWidget.h...</Message> 211 <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing PaperGraphWidget.h...</Message>
212 <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> 212 <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
213 - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../PaperGraphWidget.h"</Command> 213 + <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DCURL_STATICLIB -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../PaperGraphWidget.h"</Command>
214 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> 214 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
215 <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing PaperGraphWidget.h...</Message> 215 <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing PaperGraphWidget.h...</Message>
216 <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> 216 <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
217 - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../PaperGraphWidget.h"</Command> 217 + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DCURL_STATICLIB -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../PaperGraphWidget.h"</Command>
218 </CustomBuild> 218 </CustomBuild>
219 </ItemGroup> 219 </ItemGroup>
220 <ItemGroup> 220 <ItemGroup>
...@@ -224,38 +224,38 @@ ...@@ -224,38 +224,38 @@
224 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> 224 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
225 <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing GraphicsView.h...</Message> 225 <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing GraphicsView.h...</Message>
226 <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> 226 <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
227 - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../GraphicsView.h"</Command> 227 + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DCURL_STATICLIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../GraphicsView.h"</Command>
228 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> 228 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
229 <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing GraphicsView.h...</Message> 229 <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing GraphicsView.h...</Message>
230 <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> 230 <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
231 - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../GraphicsView.h"</Command> 231 + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DCURL_STATICLIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../GraphicsView.h"</Command>
232 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> 232 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
233 <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing GraphicsView.h...</Message> 233 <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing GraphicsView.h...</Message>
234 <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> 234 <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
235 - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../GraphicsView.h"</Command> 235 + <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DCURL_STATICLIB -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../GraphicsView.h"</Command>
236 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> 236 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
237 <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing GraphicsView.h...</Message> 237 <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing GraphicsView.h...</Message>
238 <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> 238 <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
239 - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../GraphicsView.h"</Command> 239 + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DCURL_STATICLIB -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../GraphicsView.h"</Command>
240 </CustomBuild> 240 </CustomBuild>
241 <ClInclude Include="GraphItem.h" /> 241 <ClInclude Include="GraphItem.h" />
242 <CustomBuild Include="MainWindow.h"> 242 <CustomBuild Include="MainWindow.h">
243 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> 243 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
244 <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing MainWindow.h...</Message> 244 <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing MainWindow.h...</Message>
245 <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> 245 <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
246 - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../MainWindow.h"</Command> 246 + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DCURL_STATICLIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../MainWindow.h"</Command>
247 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> 247 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
248 <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing MainWindow.h...</Message> 248 <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing MainWindow.h...</Message>
249 <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> 249 <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
250 - <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../MainWindow.h"</Command> 250 + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DCURL_STATICLIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../MainWindow.h"</Command>
251 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> 251 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
252 <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing MainWindow.h...</Message> 252 <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing MainWindow.h...</Message>
253 <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> 253 <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
254 - <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../MainWindow.h"</Command> 254 + <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DCURL_STATICLIB -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../MainWindow.h"</Command>
255 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> 255 <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
256 <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing MainWindow.h...</Message> 256 <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing MainWindow.h...</Message>
257 <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> 257 <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
258 - <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../MainWindow.h"</Command> 258 + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DQT_DLL -DCURL_STATICLIB -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-fstdafx.h" "-f../../MainWindow.h"</Command>
259 </CustomBuild> 259 </CustomBuild>
260 <ClInclude Include="NodeItem.h" /> 260 <ClInclude Include="NodeItem.h" />
261 </ItemGroup> 261 </ItemGroup>
......
1 +#ifndef __CURL_CURL_H
2 +#define __CURL_CURL_H
3 +/***************************************************************************
4 + * _ _ ____ _
5 + * Project ___| | | | _ \| |
6 + * / __| | | | |_) | |
7 + * | (__| |_| | _ <| |___
8 + * \___|\___/|_| \_\_____|
9 + *
10 + * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
11 + *
12 + * This software is licensed as described in the file COPYING, which
13 + * you should have received as part of this distribution. The terms
14 + * are also available at https://curl.haxx.se/docs/copyright.html.
15 + *
16 + * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 + * copies of the Software, and permit persons to whom the Software is
18 + * furnished to do so, under the terms of the COPYING file.
19 + *
20 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 + * KIND, either express or implied.
22 + *
23 + ***************************************************************************/
24 +
25 +/*
26 + * If you have libcurl problems, all docs and details are found here:
27 + * https://curl.haxx.se/libcurl/
28 + *
29 + * curl-library mailing list subscription and unsubscription web interface:
30 + * https://cool.haxx.se/mailman/listinfo/curl-library/
31 + */
32 +
33 +#ifdef CURL_NO_OLDIES
34 +#define CURL_STRICTER
35 +#endif
36 +
37 +#include "curlver.h" /* libcurl version defines */
38 +#include "system.h" /* determine things run-time */
39 +#include "curlbuild.h" /* libcurl build definitions */
40 +#include "curlrules.h" /* libcurl rules enforcement */
41 +
42 +/*
43 + * Define WIN32 when build target is Win32 API
44 + */
45 +
46 +#if (defined(_WIN32) || defined(__WIN32__)) && \
47 + !defined(WIN32) && !defined(__SYMBIAN32__)
48 +#define WIN32
49 +#endif
50 +
51 +#include <stdio.h>
52 +#include <limits.h>
53 +
54 +#if defined(__FreeBSD__) && (__FreeBSD__ >= 2)
55 +/* Needed for __FreeBSD_version symbol definition */
56 +#include <osreldate.h>
57 +#endif
58 +
59 +/* The include stuff here below is mainly for time_t! */
60 +#include <sys/types.h>
61 +#include <time.h>
62 +
63 +#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__)
64 +#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || \
65 + defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H))
66 +/* The check above prevents the winsock2 inclusion if winsock.h already was
67 + included, since they can't co-exist without problems */
68 +#include <winsock2.h>
69 +#include <ws2tcpip.h>
70 +#endif
71 +#endif
72 +
73 +/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
74 + libc5-based Linux systems. Only include it on systems that are known to
75 + require it! */
76 +#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
77 + defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
78 + defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \
79 + (defined(__FreeBSD_version) && (__FreeBSD_version < 800000))
80 +#include <sys/select.h>
81 +#endif
82 +
83 +#if !defined(WIN32) && !defined(_WIN32_WCE)
84 +#include <sys/socket.h>
85 +#endif
86 +
87 +#if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__)
88 +#include <sys/time.h>
89 +#endif
90 +
91 +#ifdef __BEOS__
92 +#include <support/SupportDefs.h>
93 +#endif
94 +
95 +#ifdef __cplusplus
96 +extern "C" {
97 +#endif
98 +
99 +#if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER)
100 +typedef struct Curl_easy CURL;
101 +typedef struct Curl_share CURLSH;
102 +#else
103 +typedef void CURL;
104 +typedef void CURLSH;
105 +#endif
106 +
107 +/*
108 + * libcurl external API function linkage decorations.
109 + */
110 +
111 +#ifdef CURL_STATICLIB
112 +# define CURL_EXTERN
113 +#elif defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)
114 +# if defined(BUILDING_LIBCURL)
115 +# define CURL_EXTERN __declspec(dllexport)
116 +# else
117 +# define CURL_EXTERN __declspec(dllimport)
118 +# endif
119 +#elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS)
120 +# define CURL_EXTERN CURL_EXTERN_SYMBOL
121 +#else
122 +# define CURL_EXTERN
123 +#endif
124 +
125 +#ifndef curl_socket_typedef
126 +/* socket typedef */
127 +#if defined(WIN32) && !defined(__LWIP_OPT_H__) && !defined(LWIP_HDR_OPT_H)
128 +typedef SOCKET curl_socket_t;
129 +#define CURL_SOCKET_BAD INVALID_SOCKET
130 +#else
131 +typedef int curl_socket_t;
132 +#define CURL_SOCKET_BAD -1
133 +#endif
134 +#define curl_socket_typedef
135 +#endif /* curl_socket_typedef */
136 +
137 +struct curl_httppost {
138 + struct curl_httppost *next; /* next entry in the list */
139 + char *name; /* pointer to allocated name */
140 + long namelength; /* length of name length */
141 + char *contents; /* pointer to allocated data contents */
142 + long contentslength; /* length of contents field, see also
143 + CURL_HTTPPOST_LARGE */
144 + char *buffer; /* pointer to allocated buffer contents */
145 + long bufferlength; /* length of buffer field */
146 + char *contenttype; /* Content-Type */
147 + struct curl_slist *contentheader; /* list of extra headers for this form */
148 + struct curl_httppost *more; /* if one field name has more than one
149 + file, this link should link to following
150 + files */
151 + long flags; /* as defined below */
152 +
153 +/* specified content is a file name */
154 +#define CURL_HTTPPOST_FILENAME (1<<0)
155 +/* specified content is a file name */
156 +#define CURL_HTTPPOST_READFILE (1<<1)
157 +/* name is only stored pointer do not free in formfree */
158 +#define CURL_HTTPPOST_PTRNAME (1<<2)
159 +/* contents is only stored pointer do not free in formfree */
160 +#define CURL_HTTPPOST_PTRCONTENTS (1<<3)
161 +/* upload file from buffer */
162 +#define CURL_HTTPPOST_BUFFER (1<<4)
163 +/* upload file from pointer contents */
164 +#define CURL_HTTPPOST_PTRBUFFER (1<<5)
165 +/* upload file contents by using the regular read callback to get the data and
166 + pass the given pointer as custom pointer */
167 +#define CURL_HTTPPOST_CALLBACK (1<<6)
168 +/* use size in 'contentlen', added in 7.46.0 */
169 +#define CURL_HTTPPOST_LARGE (1<<7)
170 +
171 + char *showfilename; /* The file name to show. If not set, the
172 + actual file name will be used (if this
173 + is a file part) */
174 + void *userp; /* custom pointer used for
175 + HTTPPOST_CALLBACK posts */
176 + curl_off_t contentlen; /* alternative length of contents
177 + field. Used if CURL_HTTPPOST_LARGE is
178 + set. Added in 7.46.0 */
179 +};
180 +
181 +/* This is the CURLOPT_PROGRESSFUNCTION callback proto. It is now considered
182 + deprecated but was the only choice up until 7.31.0 */
183 +typedef int (*curl_progress_callback)(void *clientp,
184 + double dltotal,
185 + double dlnow,
186 + double ultotal,
187 + double ulnow);
188 +
189 +/* This is the CURLOPT_XFERINFOFUNCTION callback proto. It was introduced in
190 + 7.32.0, it avoids floating point and provides more detailed information. */
191 +typedef int (*curl_xferinfo_callback)(void *clientp,
192 + curl_off_t dltotal,
193 + curl_off_t dlnow,
194 + curl_off_t ultotal,
195 + curl_off_t ulnow);
196 +
197 +#ifndef CURL_MAX_READ_SIZE
198 + /* The maximum receive buffer size configurable via CURLOPT_BUFFERSIZE. */
199 +#define CURL_MAX_READ_SIZE 524288
200 +#endif
201 +
202 +#ifndef CURL_MAX_WRITE_SIZE
203 + /* Tests have proven that 20K is a very bad buffer size for uploads on
204 + Windows, while 16K for some odd reason performed a lot better.
205 + We do the ifndef check to allow this value to easier be changed at build
206 + time for those who feel adventurous. The practical minimum is about
207 + 400 bytes since libcurl uses a buffer of this size as a scratch area
208 + (unrelated to network send operations). */
209 +#define CURL_MAX_WRITE_SIZE 16384
210 +#endif
211 +
212 +#ifndef CURL_MAX_HTTP_HEADER
213 +/* The only reason to have a max limit for this is to avoid the risk of a bad
214 + server feeding libcurl with a never-ending header that will cause reallocs
215 + infinitely */
216 +#define CURL_MAX_HTTP_HEADER (100*1024)
217 +#endif
218 +
219 +/* This is a magic return code for the write callback that, when returned,
220 + will signal libcurl to pause receiving on the current transfer. */
221 +#define CURL_WRITEFUNC_PAUSE 0x10000001
222 +
223 +typedef size_t (*curl_write_callback)(char *buffer,
224 + size_t size,
225 + size_t nitems,
226 + void *outstream);
227 +
228 +
229 +
230 +/* enumeration of file types */
231 +typedef enum {
232 + CURLFILETYPE_FILE = 0,
233 + CURLFILETYPE_DIRECTORY,
234 + CURLFILETYPE_SYMLINK,
235 + CURLFILETYPE_DEVICE_BLOCK,
236 + CURLFILETYPE_DEVICE_CHAR,
237 + CURLFILETYPE_NAMEDPIPE,
238 + CURLFILETYPE_SOCKET,
239 + CURLFILETYPE_DOOR, /* is possible only on Sun Solaris now */
240 +
241 + CURLFILETYPE_UNKNOWN /* should never occur */
242 +} curlfiletype;
243 +
244 +#define CURLFINFOFLAG_KNOWN_FILENAME (1<<0)
245 +#define CURLFINFOFLAG_KNOWN_FILETYPE (1<<1)
246 +#define CURLFINFOFLAG_KNOWN_TIME (1<<2)
247 +#define CURLFINFOFLAG_KNOWN_PERM (1<<3)
248 +#define CURLFINFOFLAG_KNOWN_UID (1<<4)
249 +#define CURLFINFOFLAG_KNOWN_GID (1<<5)
250 +#define CURLFINFOFLAG_KNOWN_SIZE (1<<6)
251 +#define CURLFINFOFLAG_KNOWN_HLINKCOUNT (1<<7)
252 +
253 +/* Content of this structure depends on information which is known and is
254 + achievable (e.g. by FTP LIST parsing). Please see the url_easy_setopt(3) man
255 + page for callbacks returning this structure -- some fields are mandatory,
256 + some others are optional. The FLAG field has special meaning. */
257 +struct curl_fileinfo {
258 + char *filename;
259 + curlfiletype filetype;
260 + time_t time;
261 + unsigned int perm;
262 + int uid;
263 + int gid;
264 + curl_off_t size;
265 + long int hardlinks;
266 +
267 + struct {
268 + /* If some of these fields is not NULL, it is a pointer to b_data. */
269 + char *time;
270 + char *perm;
271 + char *user;
272 + char *group;
273 + char *target; /* pointer to the target filename of a symlink */
274 + } strings;
275 +
276 + unsigned int flags;
277 +
278 + /* used internally */
279 + char *b_data;
280 + size_t b_size;
281 + size_t b_used;
282 +};
283 +
284 +/* return codes for CURLOPT_CHUNK_BGN_FUNCTION */
285 +#define CURL_CHUNK_BGN_FUNC_OK 0
286 +#define CURL_CHUNK_BGN_FUNC_FAIL 1 /* tell the lib to end the task */
287 +#define CURL_CHUNK_BGN_FUNC_SKIP 2 /* skip this chunk over */
288 +
289 +/* if splitting of data transfer is enabled, this callback is called before
290 + download of an individual chunk started. Note that parameter "remains" works
291 + only for FTP wildcard downloading (for now), otherwise is not used */
292 +typedef long (*curl_chunk_bgn_callback)(const void *transfer_info,
293 + void *ptr,
294 + int remains);
295 +
296 +/* return codes for CURLOPT_CHUNK_END_FUNCTION */
297 +#define CURL_CHUNK_END_FUNC_OK 0
298 +#define CURL_CHUNK_END_FUNC_FAIL 1 /* tell the lib to end the task */
299 +
300 +/* If splitting of data transfer is enabled this callback is called after
301 + download of an individual chunk finished.
302 + Note! After this callback was set then it have to be called FOR ALL chunks.
303 + Even if downloading of this chunk was skipped in CHUNK_BGN_FUNC.
304 + This is the reason why we don't need "transfer_info" parameter in this
305 + callback and we are not interested in "remains" parameter too. */
306 +typedef long (*curl_chunk_end_callback)(void *ptr);
307 +
308 +/* return codes for FNMATCHFUNCTION */
309 +#define CURL_FNMATCHFUNC_MATCH 0 /* string corresponds to the pattern */
310 +#define CURL_FNMATCHFUNC_NOMATCH 1 /* pattern doesn't match the string */
311 +#define CURL_FNMATCHFUNC_FAIL 2 /* an error occurred */
312 +
313 +/* callback type for wildcard downloading pattern matching. If the
314 + string matches the pattern, return CURL_FNMATCHFUNC_MATCH value, etc. */
315 +typedef int (*curl_fnmatch_callback)(void *ptr,
316 + const char *pattern,
317 + const char *string);
318 +
319 +/* These are the return codes for the seek callbacks */
320 +#define CURL_SEEKFUNC_OK 0
321 +#define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */
322 +#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so
323 + libcurl might try other means instead */
324 +typedef int (*curl_seek_callback)(void *instream,
325 + curl_off_t offset,
326 + int origin); /* 'whence' */
327 +
328 +/* This is a return code for the read callback that, when returned, will
329 + signal libcurl to immediately abort the current transfer. */
330 +#define CURL_READFUNC_ABORT 0x10000000
331 +/* This is a return code for the read callback that, when returned, will
332 + signal libcurl to pause sending data on the current transfer. */
333 +#define CURL_READFUNC_PAUSE 0x10000001
334 +
335 +typedef size_t (*curl_read_callback)(char *buffer,
336 + size_t size,
337 + size_t nitems,
338 + void *instream);
339 +
340 +typedef enum {
341 + CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */
342 + CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */
343 + CURLSOCKTYPE_LAST /* never use */
344 +} curlsocktype;
345 +
346 +/* The return code from the sockopt_callback can signal information back
347 + to libcurl: */
348 +#define CURL_SOCKOPT_OK 0
349 +#define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return
350 + CURLE_ABORTED_BY_CALLBACK */
351 +#define CURL_SOCKOPT_ALREADY_CONNECTED 2
352 +
353 +typedef int (*curl_sockopt_callback)(void *clientp,
354 + curl_socket_t curlfd,
355 + curlsocktype purpose);
356 +
357 +struct curl_sockaddr {
358 + int family;
359 + int socktype;
360 + int protocol;
361 + unsigned int addrlen; /* addrlen was a socklen_t type before 7.18.0 but it
362 + turned really ugly and painful on the systems that
363 + lack this type */
364 + struct sockaddr addr;
365 +};
366 +
367 +typedef curl_socket_t
368 +(*curl_opensocket_callback)(void *clientp,
369 + curlsocktype purpose,
370 + struct curl_sockaddr *address);
371 +
372 +typedef int
373 +(*curl_closesocket_callback)(void *clientp, curl_socket_t item);
374 +
375 +typedef enum {
376 + CURLIOE_OK, /* I/O operation successful */
377 + CURLIOE_UNKNOWNCMD, /* command was unknown to callback */
378 + CURLIOE_FAILRESTART, /* failed to restart the read */
379 + CURLIOE_LAST /* never use */
380 +} curlioerr;
381 +
382 +typedef enum {
383 + CURLIOCMD_NOP, /* no operation */
384 + CURLIOCMD_RESTARTREAD, /* restart the read stream from start */
385 + CURLIOCMD_LAST /* never use */
386 +} curliocmd;
387 +
388 +typedef curlioerr (*curl_ioctl_callback)(CURL *handle,
389 + int cmd,
390 + void *clientp);
391 +
392 +#ifndef CURL_DID_MEMORY_FUNC_TYPEDEFS
393 +/*
394 + * The following typedef's are signatures of malloc, free, realloc, strdup and
395 + * calloc respectively. Function pointers of these types can be passed to the
396 + * curl_global_init_mem() function to set user defined memory management
397 + * callback routines.
398 + */
399 +typedef void *(*curl_malloc_callback)(size_t size);
400 +typedef void (*curl_free_callback)(void *ptr);
401 +typedef void *(*curl_realloc_callback)(void *ptr, size_t size);
402 +typedef char *(*curl_strdup_callback)(const char *str);
403 +typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size);
404 +
405 +#define CURL_DID_MEMORY_FUNC_TYPEDEFS
406 +#endif
407 +
408 +/* the kind of data that is passed to information_callback*/
409 +typedef enum {
410 + CURLINFO_TEXT = 0,
411 + CURLINFO_HEADER_IN, /* 1 */
412 + CURLINFO_HEADER_OUT, /* 2 */
413 + CURLINFO_DATA_IN, /* 3 */
414 + CURLINFO_DATA_OUT, /* 4 */
415 + CURLINFO_SSL_DATA_IN, /* 5 */
416 + CURLINFO_SSL_DATA_OUT, /* 6 */
417 + CURLINFO_END
418 +} curl_infotype;
419 +
420 +typedef int (*curl_debug_callback)
421 + (CURL *handle, /* the handle/transfer this concerns */
422 + curl_infotype type, /* what kind of data */
423 + char *data, /* points to the data */
424 + size_t size, /* size of the data pointed to */
425 + void *userptr); /* whatever the user please */
426 +
427 +/* All possible error codes from all sorts of curl functions. Future versions
428 + may return other values, stay prepared.
429 +
430 + Always add new return codes last. Never *EVER* remove any. The return
431 + codes must remain the same!
432 + */
433 +
434 +typedef enum {
435 + CURLE_OK = 0,
436 + CURLE_UNSUPPORTED_PROTOCOL, /* 1 */
437 + CURLE_FAILED_INIT, /* 2 */
438 + CURLE_URL_MALFORMAT, /* 3 */
439 + CURLE_NOT_BUILT_IN, /* 4 - [was obsoleted in August 2007 for
440 + 7.17.0, reused in April 2011 for 7.21.5] */
441 + CURLE_COULDNT_RESOLVE_PROXY, /* 5 */
442 + CURLE_COULDNT_RESOLVE_HOST, /* 6 */
443 + CURLE_COULDNT_CONNECT, /* 7 */
444 + CURLE_WEIRD_SERVER_REPLY, /* 8 */
445 + CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server
446 + due to lack of access - when login fails
447 + this is not returned. */
448 + CURLE_FTP_ACCEPT_FAILED, /* 10 - [was obsoleted in April 2006 for
449 + 7.15.4, reused in Dec 2011 for 7.24.0]*/
450 + CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */
451 + CURLE_FTP_ACCEPT_TIMEOUT, /* 12 - timeout occurred accepting server
452 + [was obsoleted in August 2007 for 7.17.0,
453 + reused in Dec 2011 for 7.24.0]*/
454 + CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */
455 + CURLE_FTP_WEIRD_227_FORMAT, /* 14 */
456 + CURLE_FTP_CANT_GET_HOST, /* 15 */
457 + CURLE_HTTP2, /* 16 - A problem in the http2 framing layer.
458 + [was obsoleted in August 2007 for 7.17.0,
459 + reused in July 2014 for 7.38.0] */
460 + CURLE_FTP_COULDNT_SET_TYPE, /* 17 */
461 + CURLE_PARTIAL_FILE, /* 18 */
462 + CURLE_FTP_COULDNT_RETR_FILE, /* 19 */
463 + CURLE_OBSOLETE20, /* 20 - NOT USED */
464 + CURLE_QUOTE_ERROR, /* 21 - quote command failure */
465 + CURLE_HTTP_RETURNED_ERROR, /* 22 */
466 + CURLE_WRITE_ERROR, /* 23 */
467 + CURLE_OBSOLETE24, /* 24 - NOT USED */
468 + CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */
469 + CURLE_READ_ERROR, /* 26 - couldn't open/read from file */
470 + CURLE_OUT_OF_MEMORY, /* 27 */
471 + /* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error
472 + instead of a memory allocation error if CURL_DOES_CONVERSIONS
473 + is defined
474 + */
475 + CURLE_OPERATION_TIMEDOUT, /* 28 - the timeout time was reached */
476 + CURLE_OBSOLETE29, /* 29 - NOT USED */
477 + CURLE_FTP_PORT_FAILED, /* 30 - FTP PORT operation failed */
478 + CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */
479 + CURLE_OBSOLETE32, /* 32 - NOT USED */
480 + CURLE_RANGE_ERROR, /* 33 - RANGE "command" didn't work */
481 + CURLE_HTTP_POST_ERROR, /* 34 */
482 + CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */
483 + CURLE_BAD_DOWNLOAD_RESUME, /* 36 - couldn't resume download */
484 + CURLE_FILE_COULDNT_READ_FILE, /* 37 */
485 + CURLE_LDAP_CANNOT_BIND, /* 38 */
486 + CURLE_LDAP_SEARCH_FAILED, /* 39 */
487 + CURLE_OBSOLETE40, /* 40 - NOT USED */
488 + CURLE_FUNCTION_NOT_FOUND, /* 41 - NOT USED starting with 7.53.0 */
489 + CURLE_ABORTED_BY_CALLBACK, /* 42 */
490 + CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */
491 + CURLE_OBSOLETE44, /* 44 - NOT USED */
492 + CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */
493 + CURLE_OBSOLETE46, /* 46 - NOT USED */
494 + CURLE_TOO_MANY_REDIRECTS, /* 47 - catch endless re-direct loops */
495 + CURLE_UNKNOWN_OPTION, /* 48 - User specified an unknown option */
496 + CURLE_TELNET_OPTION_SYNTAX, /* 49 - Malformed telnet option */
497 + CURLE_OBSOLETE50, /* 50 - NOT USED */
498 + CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint
499 + wasn't verified fine */
500 + CURLE_GOT_NOTHING, /* 52 - when this is a specific error */
501 + CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */
502 + CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as
503 + default */
504 + CURLE_SEND_ERROR, /* 55 - failed sending network data */
505 + CURLE_RECV_ERROR, /* 56 - failure in receiving network data */
506 + CURLE_OBSOLETE57, /* 57 - NOT IN USE */
507 + CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */
508 + CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */
509 + CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */
510 + CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized/bad encoding */
511 + CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */
512 + CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */
513 + CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */
514 + CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind
515 + that failed */
516 + CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialise ENGINE */
517 + CURLE_LOGIN_DENIED, /* 67 - user, password or similar was not
518 + accepted and we failed to login */
519 + CURLE_TFTP_NOTFOUND, /* 68 - file not found on server */
520 + CURLE_TFTP_PERM, /* 69 - permission problem on server */
521 + CURLE_REMOTE_DISK_FULL, /* 70 - out of disk space on server */
522 + CURLE_TFTP_ILLEGAL, /* 71 - Illegal TFTP operation */
523 + CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */
524 + CURLE_REMOTE_FILE_EXISTS, /* 73 - File already exists */
525 + CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */
526 + CURLE_CONV_FAILED, /* 75 - conversion failed */
527 + CURLE_CONV_REQD, /* 76 - caller must register conversion
528 + callbacks using curl_easy_setopt options
529 + CURLOPT_CONV_FROM_NETWORK_FUNCTION,
530 + CURLOPT_CONV_TO_NETWORK_FUNCTION, and
531 + CURLOPT_CONV_FROM_UTF8_FUNCTION */
532 + CURLE_SSL_CACERT_BADFILE, /* 77 - could not load CACERT file, missing
533 + or wrong format */
534 + CURLE_REMOTE_FILE_NOT_FOUND, /* 78 - remote file not found */
535 + CURLE_SSH, /* 79 - error from the SSH layer, somewhat
536 + generic so the error message will be of
537 + interest when this has happened */
538 +
539 + CURLE_SSL_SHUTDOWN_FAILED, /* 80 - Failed to shut down the SSL
540 + connection */
541 + CURLE_AGAIN, /* 81 - socket is not ready for send/recv,
542 + wait till it's ready and try again (Added
543 + in 7.18.2) */
544 + CURLE_SSL_CRL_BADFILE, /* 82 - could not load CRL file, missing or
545 + wrong format (Added in 7.19.0) */
546 + CURLE_SSL_ISSUER_ERROR, /* 83 - Issuer check failed. (Added in
547 + 7.19.0) */
548 + CURLE_FTP_PRET_FAILED, /* 84 - a PRET command failed */
549 + CURLE_RTSP_CSEQ_ERROR, /* 85 - mismatch of RTSP CSeq numbers */
550 + CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Ids */
551 + CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */
552 + CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */
553 + CURLE_NO_CONNECTION_AVAILABLE, /* 89 - No connection available, the
554 + session will be queued */
555 + CURLE_SSL_PINNEDPUBKEYNOTMATCH, /* 90 - specified pinned public key did not
556 + match */
557 + CURLE_SSL_INVALIDCERTSTATUS, /* 91 - invalid certificate status */
558 + CURLE_HTTP2_STREAM, /* 92 - stream error in HTTP/2 framing layer
559 + */
560 + CURL_LAST /* never use! */
561 +} CURLcode;
562 +
563 +#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
564 + the obsolete stuff removed! */
565 +
566 +/* Previously obsolete error code re-used in 7.38.0 */
567 +#define CURLE_OBSOLETE16 CURLE_HTTP2
568 +
569 +/* Previously obsolete error codes re-used in 7.24.0 */
570 +#define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED
571 +#define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT
572 +
573 +/* compatibility with older names */
574 +#define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING
575 +#define CURLE_FTP_WEIRD_SERVER_REPLY CURLE_WEIRD_SERVER_REPLY
576 +
577 +/* The following were added in 7.21.5, April 2011 */
578 +#define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION
579 +
580 +/* The following were added in 7.17.1 */
581 +/* These are scheduled to disappear by 2009 */
582 +#define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION
583 +
584 +/* The following were added in 7.17.0 */
585 +/* These are scheduled to disappear by 2009 */
586 +#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* no one should be using this! */
587 +#define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46
588 +#define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44
589 +#define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10
590 +#define CURLE_FTP_CANT_RECONNECT CURLE_OBSOLETE16
591 +#define CURLE_FTP_COULDNT_GET_SIZE CURLE_OBSOLETE32
592 +#define CURLE_FTP_COULDNT_SET_ASCII CURLE_OBSOLETE29
593 +#define CURLE_FTP_WEIRD_USER_REPLY CURLE_OBSOLETE12
594 +#define CURLE_FTP_WRITE_ERROR CURLE_OBSOLETE20
595 +#define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40
596 +#define CURLE_MALFORMAT_USER CURLE_OBSOLETE24
597 +#define CURLE_SHARE_IN_USE CURLE_OBSOLETE57
598 +#define CURLE_URL_MALFORMAT_USER CURLE_NOT_BUILT_IN
599 +
600 +#define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED
601 +#define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE
602 +#define CURLE_FTP_QUOTE_ERROR CURLE_QUOTE_ERROR
603 +#define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL
604 +#define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS
605 +#define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR
606 +#define CURLE_FTP_SSL_FAILED CURLE_USE_SSL_FAILED
607 +
608 +/* The following were added earlier */
609 +
610 +#define CURLE_OPERATION_TIMEOUTED CURLE_OPERATION_TIMEDOUT
611 +
612 +#define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR
613 +#define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED
614 +#define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED
615 +
616 +#define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE
617 +#define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME
618 +
619 +/* This was the error code 50 in 7.7.3 and a few earlier versions, this
620 + is no longer used by libcurl but is instead #defined here only to not
621 + make programs break */
622 +#define CURLE_ALREADY_COMPLETE 99999
623 +
624 +/* Provide defines for really old option names */
625 +#define CURLOPT_FILE CURLOPT_WRITEDATA /* name changed in 7.9.7 */
626 +#define CURLOPT_INFILE CURLOPT_READDATA /* name changed in 7.9.7 */
627 +#define CURLOPT_WRITEHEADER CURLOPT_HEADERDATA
628 +
629 +/* Since long deprecated options with no code in the lib that does anything
630 + with them. */
631 +#define CURLOPT_WRITEINFO CURLOPT_OBSOLETE40
632 +#define CURLOPT_CLOSEPOLICY CURLOPT_OBSOLETE72
633 +
634 +#endif /*!CURL_NO_OLDIES*/
635 +
636 +/* This prototype applies to all conversion callbacks */
637 +typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length);
638 +
639 +typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */
640 + void *ssl_ctx, /* actually an
641 + OpenSSL SSL_CTX */
642 + void *userptr);
643 +
644 +typedef enum {
645 + CURLPROXY_HTTP = 0, /* added in 7.10, new in 7.19.4 default is to use
646 + CONNECT HTTP/1.1 */
647 + CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT
648 + HTTP/1.0 */
649 + CURLPROXY_HTTPS = 2, /* added in 7.52.0 */
650 + CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already
651 + in 7.10 */
652 + CURLPROXY_SOCKS5 = 5, /* added in 7.10 */
653 + CURLPROXY_SOCKS4A = 6, /* added in 7.18.0 */
654 + CURLPROXY_SOCKS5_HOSTNAME = 7 /* Use the SOCKS5 protocol but pass along the
655 + host name rather than the IP address. added
656 + in 7.18.0 */
657 +} curl_proxytype; /* this enum was added in 7.10 */
658 +
659 +/*
660 + * Bitmasks for CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH options:
661 + *
662 + * CURLAUTH_NONE - No HTTP authentication
663 + * CURLAUTH_BASIC - HTTP Basic authentication (default)
664 + * CURLAUTH_DIGEST - HTTP Digest authentication
665 + * CURLAUTH_NEGOTIATE - HTTP Negotiate (SPNEGO) authentication
666 + * CURLAUTH_GSSNEGOTIATE - Alias for CURLAUTH_NEGOTIATE (deprecated)
667 + * CURLAUTH_NTLM - HTTP NTLM authentication
668 + * CURLAUTH_DIGEST_IE - HTTP Digest authentication with IE flavour
669 + * CURLAUTH_NTLM_WB - HTTP NTLM authentication delegated to winbind helper
670 + * CURLAUTH_ONLY - Use together with a single other type to force no
671 + * authentication or just that single type
672 + * CURLAUTH_ANY - All fine types set
673 + * CURLAUTH_ANYSAFE - All fine types except Basic
674 + */
675 +
676 +#define CURLAUTH_NONE ((unsigned long)0)
677 +#define CURLAUTH_BASIC (((unsigned long)1)<<0)
678 +#define CURLAUTH_DIGEST (((unsigned long)1)<<1)
679 +#define CURLAUTH_NEGOTIATE (((unsigned long)1)<<2)
680 +/* Deprecated since the advent of CURLAUTH_NEGOTIATE */
681 +#define CURLAUTH_GSSNEGOTIATE CURLAUTH_NEGOTIATE
682 +#define CURLAUTH_NTLM (((unsigned long)1)<<3)
683 +#define CURLAUTH_DIGEST_IE (((unsigned long)1)<<4)
684 +#define CURLAUTH_NTLM_WB (((unsigned long)1)<<5)
685 +#define CURLAUTH_ONLY (((unsigned long)1)<<31)
686 +#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE)
687 +#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))
688 +
689 +#define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */
690 +#define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */
691 +#define CURLSSH_AUTH_PUBLICKEY (1<<0) /* public/private key files */
692 +#define CURLSSH_AUTH_PASSWORD (1<<1) /* password */
693 +#define CURLSSH_AUTH_HOST (1<<2) /* host key files */
694 +#define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */
695 +#define CURLSSH_AUTH_AGENT (1<<4) /* agent (ssh-agent, pageant...) */
696 +#define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY
697 +
698 +#define CURLGSSAPI_DELEGATION_NONE 0 /* no delegation (default) */
699 +#define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0) /* if permitted by policy */
700 +#define CURLGSSAPI_DELEGATION_FLAG (1<<1) /* delegate always */
701 +
702 +#define CURL_ERROR_SIZE 256
703 +
704 +enum curl_khtype {
705 + CURLKHTYPE_UNKNOWN,
706 + CURLKHTYPE_RSA1,
707 + CURLKHTYPE_RSA,
708 + CURLKHTYPE_DSS
709 +};
710 +
711 +struct curl_khkey {
712 + const char *key; /* points to a zero-terminated string encoded with base64
713 + if len is zero, otherwise to the "raw" data */
714 + size_t len;
715 + enum curl_khtype keytype;
716 +};
717 +
718 +/* this is the set of return values expected from the curl_sshkeycallback
719 + callback */
720 +enum curl_khstat {
721 + CURLKHSTAT_FINE_ADD_TO_FILE,
722 + CURLKHSTAT_FINE,
723 + CURLKHSTAT_REJECT, /* reject the connection, return an error */
724 + CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right now so
725 + this causes a CURLE_DEFER error but otherwise the
726 + connection will be left intact etc */
727 + CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */
728 +};
729 +
730 +/* this is the set of status codes pass in to the callback */
731 +enum curl_khmatch {
732 + CURLKHMATCH_OK, /* match */
733 + CURLKHMATCH_MISMATCH, /* host found, key mismatch! */
734 + CURLKHMATCH_MISSING, /* no matching host/key found */
735 + CURLKHMATCH_LAST /* not for use, only a marker for last-in-list */
736 +};
737 +
738 +typedef int
739 + (*curl_sshkeycallback) (CURL *easy, /* easy handle */
740 + const struct curl_khkey *knownkey, /* known */
741 + const struct curl_khkey *foundkey, /* found */
742 + enum curl_khmatch, /* libcurl's view on the keys */
743 + void *clientp); /* custom pointer passed from app */
744 +
745 +/* parameter for the CURLOPT_USE_SSL option */
746 +typedef enum {
747 + CURLUSESSL_NONE, /* do not attempt to use SSL */
748 + CURLUSESSL_TRY, /* try using SSL, proceed anyway otherwise */
749 + CURLUSESSL_CONTROL, /* SSL for the control connection or fail */
750 + CURLUSESSL_ALL, /* SSL for all communication or fail */
751 + CURLUSESSL_LAST /* not an option, never use */
752 +} curl_usessl;
753 +
754 +/* Definition of bits for the CURLOPT_SSL_OPTIONS argument: */
755 +
756 +/* - ALLOW_BEAST tells libcurl to allow the BEAST SSL vulnerability in the
757 + name of improving interoperability with older servers. Some SSL libraries
758 + have introduced work-arounds for this flaw but those work-arounds sometimes
759 + make the SSL communication fail. To regain functionality with those broken
760 + servers, a user can this way allow the vulnerability back. */
761 +#define CURLSSLOPT_ALLOW_BEAST (1<<0)
762 +
763 +/* - NO_REVOKE tells libcurl to disable certificate revocation checks for those
764 + SSL backends where such behavior is present. */
765 +#define CURLSSLOPT_NO_REVOKE (1<<1)
766 +
767 +#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
768 + the obsolete stuff removed! */
769 +
770 +/* Backwards compatibility with older names */
771 +/* These are scheduled to disappear by 2009 */
772 +
773 +#define CURLFTPSSL_NONE CURLUSESSL_NONE
774 +#define CURLFTPSSL_TRY CURLUSESSL_TRY
775 +#define CURLFTPSSL_CONTROL CURLUSESSL_CONTROL
776 +#define CURLFTPSSL_ALL CURLUSESSL_ALL
777 +#define CURLFTPSSL_LAST CURLUSESSL_LAST
778 +#define curl_ftpssl curl_usessl
779 +#endif /*!CURL_NO_OLDIES*/
780 +
781 +/* parameter for the CURLOPT_FTP_SSL_CCC option */
782 +typedef enum {
783 + CURLFTPSSL_CCC_NONE, /* do not send CCC */
784 + CURLFTPSSL_CCC_PASSIVE, /* Let the server initiate the shutdown */
785 + CURLFTPSSL_CCC_ACTIVE, /* Initiate the shutdown */
786 + CURLFTPSSL_CCC_LAST /* not an option, never use */
787 +} curl_ftpccc;
788 +
789 +/* parameter for the CURLOPT_FTPSSLAUTH option */
790 +typedef enum {
791 + CURLFTPAUTH_DEFAULT, /* let libcurl decide */
792 + CURLFTPAUTH_SSL, /* use "AUTH SSL" */
793 + CURLFTPAUTH_TLS, /* use "AUTH TLS" */
794 + CURLFTPAUTH_LAST /* not an option, never use */
795 +} curl_ftpauth;
796 +
797 +/* parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option */
798 +typedef enum {
799 + CURLFTP_CREATE_DIR_NONE, /* do NOT create missing dirs! */
800 + CURLFTP_CREATE_DIR, /* (FTP/SFTP) if CWD fails, try MKD and then CWD
801 + again if MKD succeeded, for SFTP this does
802 + similar magic */
803 + CURLFTP_CREATE_DIR_RETRY, /* (FTP only) if CWD fails, try MKD and then CWD
804 + again even if MKD failed! */
805 + CURLFTP_CREATE_DIR_LAST /* not an option, never use */
806 +} curl_ftpcreatedir;
807 +
808 +/* parameter for the CURLOPT_FTP_FILEMETHOD option */
809 +typedef enum {
810 + CURLFTPMETHOD_DEFAULT, /* let libcurl pick */
811 + CURLFTPMETHOD_MULTICWD, /* single CWD operation for each path part */
812 + CURLFTPMETHOD_NOCWD, /* no CWD at all */
813 + CURLFTPMETHOD_SINGLECWD, /* one CWD to full dir, then work on file */
814 + CURLFTPMETHOD_LAST /* not an option, never use */
815 +} curl_ftpmethod;
816 +
817 +/* bitmask defines for CURLOPT_HEADEROPT */
818 +#define CURLHEADER_UNIFIED 0
819 +#define CURLHEADER_SEPARATE (1<<0)
820 +
821 +/* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */
822 +#define CURLPROTO_HTTP (1<<0)
823 +#define CURLPROTO_HTTPS (1<<1)
824 +#define CURLPROTO_FTP (1<<2)
825 +#define CURLPROTO_FTPS (1<<3)
826 +#define CURLPROTO_SCP (1<<4)
827 +#define CURLPROTO_SFTP (1<<5)
828 +#define CURLPROTO_TELNET (1<<6)
829 +#define CURLPROTO_LDAP (1<<7)
830 +#define CURLPROTO_LDAPS (1<<8)
831 +#define CURLPROTO_DICT (1<<9)
832 +#define CURLPROTO_FILE (1<<10)
833 +#define CURLPROTO_TFTP (1<<11)
834 +#define CURLPROTO_IMAP (1<<12)
835 +#define CURLPROTO_IMAPS (1<<13)
836 +#define CURLPROTO_POP3 (1<<14)
837 +#define CURLPROTO_POP3S (1<<15)
838 +#define CURLPROTO_SMTP (1<<16)
839 +#define CURLPROTO_SMTPS (1<<17)
840 +#define CURLPROTO_RTSP (1<<18)
841 +#define CURLPROTO_RTMP (1<<19)
842 +#define CURLPROTO_RTMPT (1<<20)
843 +#define CURLPROTO_RTMPE (1<<21)
844 +#define CURLPROTO_RTMPTE (1<<22)
845 +#define CURLPROTO_RTMPS (1<<23)
846 +#define CURLPROTO_RTMPTS (1<<24)
847 +#define CURLPROTO_GOPHER (1<<25)
848 +#define CURLPROTO_SMB (1<<26)
849 +#define CURLPROTO_SMBS (1<<27)
850 +#define CURLPROTO_ALL (~0) /* enable everything */
851 +
852 +/* long may be 32 or 64 bits, but we should never depend on anything else
853 + but 32 */
854 +#define CURLOPTTYPE_LONG 0
855 +#define CURLOPTTYPE_OBJECTPOINT 10000
856 +#define CURLOPTTYPE_STRINGPOINT 10000
857 +#define CURLOPTTYPE_FUNCTIONPOINT 20000
858 +#define CURLOPTTYPE_OFF_T 30000
859 +
860 +/* *STRINGPOINT is an alias for OBJECTPOINT to allow tools to extract the
861 + string options from the header file */
862 +
863 +/* name is uppercase CURLOPT_<name>,
864 + type is one of the defined CURLOPTTYPE_<type>
865 + number is unique identifier */
866 +#ifdef CINIT
867 +#undef CINIT
868 +#endif
869 +
870 +#ifdef CURL_ISOCPP
871 +#define CINIT(na,t,nu) CURLOPT_ ## na = CURLOPTTYPE_ ## t + nu
872 +#else
873 +/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */
874 +#define LONG CURLOPTTYPE_LONG
875 +#define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT
876 +#define STRINGPOINT CURLOPTTYPE_OBJECTPOINT
877 +#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT
878 +#define OFF_T CURLOPTTYPE_OFF_T
879 +#define CINIT(name,type,number) CURLOPT_/**/name = type + number
880 +#endif
881 +
882 +/*
883 + * This macro-mania below setups the CURLOPT_[what] enum, to be used with
884 + * curl_easy_setopt(). The first argument in the CINIT() macro is the [what]
885 + * word.
886 + */
887 +
888 +typedef enum {
889 + /* This is the FILE * or void * the regular output should be written to. */
890 + CINIT(WRITEDATA, OBJECTPOINT, 1),
891 +
892 + /* The full URL to get/put */
893 + CINIT(URL, STRINGPOINT, 2),
894 +
895 + /* Port number to connect to, if other than default. */
896 + CINIT(PORT, LONG, 3),
897 +
898 + /* Name of proxy to use. */
899 + CINIT(PROXY, STRINGPOINT, 4),
900 +
901 + /* "user:password;options" to use when fetching. */
902 + CINIT(USERPWD, STRINGPOINT, 5),
903 +
904 + /* "user:password" to use with proxy. */
905 + CINIT(PROXYUSERPWD, STRINGPOINT, 6),
906 +
907 + /* Range to get, specified as an ASCII string. */
908 + CINIT(RANGE, STRINGPOINT, 7),
909 +
910 + /* not used */
911 +
912 + /* Specified file stream to upload from (use as input): */
913 + CINIT(READDATA, OBJECTPOINT, 9),
914 +
915 + /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE
916 + * bytes big. If this is not used, error messages go to stderr instead: */
917 + CINIT(ERRORBUFFER, OBJECTPOINT, 10),
918 +
919 + /* Function that will be called to store the output (instead of fwrite). The
920 + * parameters will use fwrite() syntax, make sure to follow them. */
921 + CINIT(WRITEFUNCTION, FUNCTIONPOINT, 11),
922 +
923 + /* Function that will be called to read the input (instead of fread). The
924 + * parameters will use fread() syntax, make sure to follow them. */
925 + CINIT(READFUNCTION, FUNCTIONPOINT, 12),
926 +
927 + /* Time-out the read operation after this amount of seconds */
928 + CINIT(TIMEOUT, LONG, 13),
929 +
930 + /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about
931 + * how large the file being sent really is. That allows better error
932 + * checking and better verifies that the upload was successful. -1 means
933 + * unknown size.
934 + *
935 + * For large file support, there is also a _LARGE version of the key
936 + * which takes an off_t type, allowing platforms with larger off_t
937 + * sizes to handle larger files. See below for INFILESIZE_LARGE.
938 + */
939 + CINIT(INFILESIZE, LONG, 14),
940 +
941 + /* POST static input fields. */
942 + CINIT(POSTFIELDS, OBJECTPOINT, 15),
943 +
944 + /* Set the referrer page (needed by some CGIs) */
945 + CINIT(REFERER, STRINGPOINT, 16),
946 +
947 + /* Set the FTP PORT string (interface name, named or numerical IP address)
948 + Use i.e '-' to use default address. */
949 + CINIT(FTPPORT, STRINGPOINT, 17),
950 +
951 + /* Set the User-Agent string (examined by some CGIs) */
952 + CINIT(USERAGENT, STRINGPOINT, 18),
953 +
954 + /* If the download receives less than "low speed limit" bytes/second
955 + * during "low speed time" seconds, the operations is aborted.
956 + * You could i.e if you have a pretty high speed connection, abort if
957 + * it is less than 2000 bytes/sec during 20 seconds.
958 + */
959 +
960 + /* Set the "low speed limit" */
961 + CINIT(LOW_SPEED_LIMIT, LONG, 19),
962 +
963 + /* Set the "low speed time" */
964 + CINIT(LOW_SPEED_TIME, LONG, 20),
965 +
966 + /* Set the continuation offset.
967 + *
968 + * Note there is also a _LARGE version of this key which uses
969 + * off_t types, allowing for large file offsets on platforms which
970 + * use larger-than-32-bit off_t's. Look below for RESUME_FROM_LARGE.
971 + */
972 + CINIT(RESUME_FROM, LONG, 21),
973 +
974 + /* Set cookie in request: */
975 + CINIT(COOKIE, STRINGPOINT, 22),
976 +
977 + /* This points to a linked list of headers, struct curl_slist kind. This
978 + list is also used for RTSP (in spite of its name) */
979 + CINIT(HTTPHEADER, OBJECTPOINT, 23),
980 +
981 + /* This points to a linked list of post entries, struct curl_httppost */
982 + CINIT(HTTPPOST, OBJECTPOINT, 24),
983 +
984 + /* name of the file keeping your private SSL-certificate */
985 + CINIT(SSLCERT, STRINGPOINT, 25),
986 +
987 + /* password for the SSL or SSH private key */
988 + CINIT(KEYPASSWD, STRINGPOINT, 26),
989 +
990 + /* send TYPE parameter? */
991 + CINIT(CRLF, LONG, 27),
992 +
993 + /* send linked-list of QUOTE commands */
994 + CINIT(QUOTE, OBJECTPOINT, 28),
995 +
996 + /* send FILE * or void * to store headers to, if you use a callback it
997 + is simply passed to the callback unmodified */
998 + CINIT(HEADERDATA, OBJECTPOINT, 29),
999 +
1000 + /* point to a file to read the initial cookies from, also enables
1001 + "cookie awareness" */
1002 + CINIT(COOKIEFILE, STRINGPOINT, 31),
1003 +
1004 + /* What version to specifically try to use.
1005 + See CURL_SSLVERSION defines below. */
1006 + CINIT(SSLVERSION, LONG, 32),
1007 +
1008 + /* What kind of HTTP time condition to use, see defines */
1009 + CINIT(TIMECONDITION, LONG, 33),
1010 +
1011 + /* Time to use with the above condition. Specified in number of seconds
1012 + since 1 Jan 1970 */
1013 + CINIT(TIMEVALUE, LONG, 34),
1014 +
1015 + /* 35 = OBSOLETE */
1016 +
1017 + /* Custom request, for customizing the get command like
1018 + HTTP: DELETE, TRACE and others
1019 + FTP: to use a different list command
1020 + */
1021 + CINIT(CUSTOMREQUEST, STRINGPOINT, 36),
1022 +
1023 + /* FILE handle to use instead of stderr */
1024 + CINIT(STDERR, OBJECTPOINT, 37),
1025 +
1026 + /* 38 is not used */
1027 +
1028 + /* send linked-list of post-transfer QUOTE commands */
1029 + CINIT(POSTQUOTE, OBJECTPOINT, 39),
1030 +
1031 + CINIT(OBSOLETE40, OBJECTPOINT, 40), /* OBSOLETE, do not use! */
1032 +
1033 + CINIT(VERBOSE, LONG, 41), /* talk a lot */
1034 + CINIT(HEADER, LONG, 42), /* throw the header out too */
1035 + CINIT(NOPROGRESS, LONG, 43), /* shut off the progress meter */
1036 + CINIT(NOBODY, LONG, 44), /* use HEAD to get http document */
1037 + CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 400 */
1038 + CINIT(UPLOAD, LONG, 46), /* this is an upload */
1039 + CINIT(POST, LONG, 47), /* HTTP POST method */
1040 + CINIT(DIRLISTONLY, LONG, 48), /* bare names when listing directories */
1041 +
1042 + CINIT(APPEND, LONG, 50), /* Append instead of overwrite on upload! */
1043 +
1044 + /* Specify whether to read the user+password from the .netrc or the URL.
1045 + * This must be one of the CURL_NETRC_* enums below. */
1046 + CINIT(NETRC, LONG, 51),
1047 +
1048 + CINIT(FOLLOWLOCATION, LONG, 52), /* use Location: Luke! */
1049 +
1050 + CINIT(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */
1051 + CINIT(PUT, LONG, 54), /* HTTP PUT */
1052 +
1053 + /* 55 = OBSOLETE */
1054 +
1055 + /* DEPRECATED
1056 + * Function that will be called instead of the internal progress display
1057 + * function. This function should be defined as the curl_progress_callback
1058 + * prototype defines. */
1059 + CINIT(PROGRESSFUNCTION, FUNCTIONPOINT, 56),
1060 +
1061 + /* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION
1062 + callbacks */
1063 + CINIT(PROGRESSDATA, OBJECTPOINT, 57),
1064 +#define CURLOPT_XFERINFODATA CURLOPT_PROGRESSDATA
1065 +
1066 + /* We want the referrer field set automatically when following locations */
1067 + CINIT(AUTOREFERER, LONG, 58),
1068 +
1069 + /* Port of the proxy, can be set in the proxy string as well with:
1070 + "[host]:[port]" */
1071 + CINIT(PROXYPORT, LONG, 59),
1072 +
1073 + /* size of the POST input data, if strlen() is not good to use */
1074 + CINIT(POSTFIELDSIZE, LONG, 60),
1075 +
1076 + /* tunnel non-http operations through a HTTP proxy */
1077 + CINIT(HTTPPROXYTUNNEL, LONG, 61),
1078 +
1079 + /* Set the interface string to use as outgoing network interface */
1080 + CINIT(INTERFACE, STRINGPOINT, 62),
1081 +
1082 + /* Set the krb4/5 security level, this also enables krb4/5 awareness. This
1083 + * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string
1084 + * is set but doesn't match one of these, 'private' will be used. */
1085 + CINIT(KRBLEVEL, STRINGPOINT, 63),
1086 +
1087 + /* Set if we should verify the peer in ssl handshake, set 1 to verify. */
1088 + CINIT(SSL_VERIFYPEER, LONG, 64),
1089 +
1090 + /* The CApath or CAfile used to validate the peer certificate
1091 + this option is used only if SSL_VERIFYPEER is true */
1092 + CINIT(CAINFO, STRINGPOINT, 65),
1093 +
1094 + /* 66 = OBSOLETE */
1095 + /* 67 = OBSOLETE */
1096 +
1097 + /* Maximum number of http redirects to follow */
1098 + CINIT(MAXREDIRS, LONG, 68),
1099 +
1100 + /* Pass a long set to 1 to get the date of the requested document (if
1101 + possible)! Pass a zero to shut it off. */
1102 + CINIT(FILETIME, LONG, 69),
1103 +
1104 + /* This points to a linked list of telnet options */
1105 + CINIT(TELNETOPTIONS, OBJECTPOINT, 70),
1106 +
1107 + /* Max amount of cached alive connections */
1108 + CINIT(MAXCONNECTS, LONG, 71),
1109 +
1110 + CINIT(OBSOLETE72, LONG, 72), /* OBSOLETE, do not use! */
1111 +
1112 + /* 73 = OBSOLETE */
1113 +
1114 + /* Set to explicitly use a new connection for the upcoming transfer.
1115 + Do not use this unless you're absolutely sure of this, as it makes the
1116 + operation slower and is less friendly for the network. */
1117 + CINIT(FRESH_CONNECT, LONG, 74),
1118 +
1119 + /* Set to explicitly forbid the upcoming transfer's connection to be re-used
1120 + when done. Do not use this unless you're absolutely sure of this, as it
1121 + makes the operation slower and is less friendly for the network. */
1122 + CINIT(FORBID_REUSE, LONG, 75),
1123 +
1124 + /* Set to a file name that contains random data for libcurl to use to
1125 + seed the random engine when doing SSL connects. */
1126 + CINIT(RANDOM_FILE, STRINGPOINT, 76),
1127 +
1128 + /* Set to the Entropy Gathering Daemon socket pathname */
1129 + CINIT(EGDSOCKET, STRINGPOINT, 77),
1130 +
1131 + /* Time-out connect operations after this amount of seconds, if connects are
1132 + OK within this time, then fine... This only aborts the connect phase. */
1133 + CINIT(CONNECTTIMEOUT, LONG, 78),
1134 +
1135 + /* Function that will be called to store headers (instead of fwrite). The
1136 + * parameters will use fwrite() syntax, make sure to follow them. */
1137 + CINIT(HEADERFUNCTION, FUNCTIONPOINT, 79),
1138 +
1139 + /* Set this to force the HTTP request to get back to GET. Only really usable
1140 + if POST, PUT or a custom request have been used first.
1141 + */
1142 + CINIT(HTTPGET, LONG, 80),
1143 +
1144 + /* Set if we should verify the Common name from the peer certificate in ssl
1145 + * handshake, set 1 to check existence, 2 to ensure that it matches the
1146 + * provided hostname. */
1147 + CINIT(SSL_VERIFYHOST, LONG, 81),
1148 +
1149 + /* Specify which file name to write all known cookies in after completed
1150 + operation. Set file name to "-" (dash) to make it go to stdout. */
1151 + CINIT(COOKIEJAR, STRINGPOINT, 82),
1152 +
1153 + /* Specify which SSL ciphers to use */
1154 + CINIT(SSL_CIPHER_LIST, STRINGPOINT, 83),
1155 +
1156 + /* Specify which HTTP version to use! This must be set to one of the
1157 + CURL_HTTP_VERSION* enums set below. */
1158 + CINIT(HTTP_VERSION, LONG, 84),
1159 +
1160 + /* Specifically switch on or off the FTP engine's use of the EPSV command. By
1161 + default, that one will always be attempted before the more traditional
1162 + PASV command. */
1163 + CINIT(FTP_USE_EPSV, LONG, 85),
1164 +
1165 + /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */
1166 + CINIT(SSLCERTTYPE, STRINGPOINT, 86),
1167 +
1168 + /* name of the file keeping your private SSL-key */
1169 + CINIT(SSLKEY, STRINGPOINT, 87),
1170 +
1171 + /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */
1172 + CINIT(SSLKEYTYPE, STRINGPOINT, 88),
1173 +
1174 + /* crypto engine for the SSL-sub system */
1175 + CINIT(SSLENGINE, STRINGPOINT, 89),
1176 +
1177 + /* set the crypto engine for the SSL-sub system as default
1178 + the param has no meaning...
1179 + */
1180 + CINIT(SSLENGINE_DEFAULT, LONG, 90),
1181 +
1182 + /* Non-zero value means to use the global dns cache */
1183 + CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* DEPRECATED, do not use! */
1184 +
1185 + /* DNS cache timeout */
1186 + CINIT(DNS_CACHE_TIMEOUT, LONG, 92),
1187 +
1188 + /* send linked-list of pre-transfer QUOTE commands */
1189 + CINIT(PREQUOTE, OBJECTPOINT, 93),
1190 +
1191 + /* set the debug function */
1192 + CINIT(DEBUGFUNCTION, FUNCTIONPOINT, 94),
1193 +
1194 + /* set the data for the debug function */
1195 + CINIT(DEBUGDATA, OBJECTPOINT, 95),
1196 +
1197 + /* mark this as start of a cookie session */
1198 + CINIT(COOKIESESSION, LONG, 96),
1199 +
1200 + /* The CApath directory used to validate the peer certificate
1201 + this option is used only if SSL_VERIFYPEER is true */
1202 + CINIT(CAPATH, STRINGPOINT, 97),
1203 +
1204 + /* Instruct libcurl to use a smaller receive buffer */
1205 + CINIT(BUFFERSIZE, LONG, 98),
1206 +
1207 + /* Instruct libcurl to not use any signal/alarm handlers, even when using
1208 + timeouts. This option is useful for multi-threaded applications.
1209 + See libcurl-the-guide for more background information. */
1210 + CINIT(NOSIGNAL, LONG, 99),
1211 +
1212 + /* Provide a CURLShare for mutexing non-ts data */
1213 + CINIT(SHARE, OBJECTPOINT, 100),
1214 +
1215 + /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default),
1216 + CURLPROXY_HTTPS, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and
1217 + CURLPROXY_SOCKS5. */
1218 + CINIT(PROXYTYPE, LONG, 101),
1219 +
1220 + /* Set the Accept-Encoding string. Use this to tell a server you would like
1221 + the response to be compressed. Before 7.21.6, this was known as
1222 + CURLOPT_ENCODING */
1223 + CINIT(ACCEPT_ENCODING, STRINGPOINT, 102),
1224 +
1225 + /* Set pointer to private data */
1226 + CINIT(PRIVATE, OBJECTPOINT, 103),
1227 +
1228 + /* Set aliases for HTTP 200 in the HTTP Response header */
1229 + CINIT(HTTP200ALIASES, OBJECTPOINT, 104),
1230 +
1231 + /* Continue to send authentication (user+password) when following locations,
1232 + even when hostname changed. This can potentially send off the name
1233 + and password to whatever host the server decides. */
1234 + CINIT(UNRESTRICTED_AUTH, LONG, 105),
1235 +
1236 + /* Specifically switch on or off the FTP engine's use of the EPRT command (
1237 + it also disables the LPRT attempt). By default, those ones will always be
1238 + attempted before the good old traditional PORT command. */
1239 + CINIT(FTP_USE_EPRT, LONG, 106),
1240 +
1241 + /* Set this to a bitmask value to enable the particular authentications
1242 + methods you like. Use this in combination with CURLOPT_USERPWD.
1243 + Note that setting multiple bits may cause extra network round-trips. */
1244 + CINIT(HTTPAUTH, LONG, 107),
1245 +
1246 + /* Set the ssl context callback function, currently only for OpenSSL ssl_ctx
1247 + in second argument. The function must be matching the
1248 + curl_ssl_ctx_callback proto. */
1249 + CINIT(SSL_CTX_FUNCTION, FUNCTIONPOINT, 108),
1250 +
1251 + /* Set the userdata for the ssl context callback function's third
1252 + argument */
1253 + CINIT(SSL_CTX_DATA, OBJECTPOINT, 109),
1254 +
1255 + /* FTP Option that causes missing dirs to be created on the remote server.
1256 + In 7.19.4 we introduced the convenience enums for this option using the
1257 + CURLFTP_CREATE_DIR prefix.
1258 + */
1259 + CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110),
1260 +
1261 + /* Set this to a bitmask value to enable the particular authentications
1262 + methods you like. Use this in combination with CURLOPT_PROXYUSERPWD.
1263 + Note that setting multiple bits may cause extra network round-trips. */
1264 + CINIT(PROXYAUTH, LONG, 111),
1265 +
1266 + /* FTP option that changes the timeout, in seconds, associated with
1267 + getting a response. This is different from transfer timeout time and
1268 + essentially places a demand on the FTP server to acknowledge commands
1269 + in a timely manner. */
1270 + CINIT(FTP_RESPONSE_TIMEOUT, LONG, 112),
1271 +#define CURLOPT_SERVER_RESPONSE_TIMEOUT CURLOPT_FTP_RESPONSE_TIMEOUT
1272 +
1273 + /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to
1274 + tell libcurl to resolve names to those IP versions only. This only has
1275 + affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */
1276 + CINIT(IPRESOLVE, LONG, 113),
1277 +
1278 + /* Set this option to limit the size of a file that will be downloaded from
1279 + an HTTP or FTP server.
1280 +
1281 + Note there is also _LARGE version which adds large file support for
1282 + platforms which have larger off_t sizes. See MAXFILESIZE_LARGE below. */
1283 + CINIT(MAXFILESIZE, LONG, 114),
1284 +
1285 + /* See the comment for INFILESIZE above, but in short, specifies
1286 + * the size of the file being uploaded. -1 means unknown.
1287 + */
1288 + CINIT(INFILESIZE_LARGE, OFF_T, 115),
1289 +
1290 + /* Sets the continuation offset. There is also a LONG version of this;
1291 + * look above for RESUME_FROM.
1292 + */
1293 + CINIT(RESUME_FROM_LARGE, OFF_T, 116),
1294 +
1295 + /* Sets the maximum size of data that will be downloaded from
1296 + * an HTTP or FTP server. See MAXFILESIZE above for the LONG version.
1297 + */
1298 + CINIT(MAXFILESIZE_LARGE, OFF_T, 117),
1299 +
1300 + /* Set this option to the file name of your .netrc file you want libcurl
1301 + to parse (using the CURLOPT_NETRC option). If not set, libcurl will do
1302 + a poor attempt to find the user's home directory and check for a .netrc
1303 + file in there. */
1304 + CINIT(NETRC_FILE, STRINGPOINT, 118),
1305 +
1306 + /* Enable SSL/TLS for FTP, pick one of:
1307 + CURLUSESSL_TRY - try using SSL, proceed anyway otherwise
1308 + CURLUSESSL_CONTROL - SSL for the control connection or fail
1309 + CURLUSESSL_ALL - SSL for all communication or fail
1310 + */
1311 + CINIT(USE_SSL, LONG, 119),
1312 +
1313 + /* The _LARGE version of the standard POSTFIELDSIZE option */
1314 + CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120),
1315 +
1316 + /* Enable/disable the TCP Nagle algorithm */
1317 + CINIT(TCP_NODELAY, LONG, 121),
1318 +
1319 + /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
1320 + /* 123 OBSOLETE. Gone in 7.16.0 */
1321 + /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
1322 + /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
1323 + /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
1324 + /* 127 OBSOLETE. Gone in 7.16.0 */
1325 + /* 128 OBSOLETE. Gone in 7.16.0 */
1326 +
1327 + /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option
1328 + can be used to change libcurl's default action which is to first try
1329 + "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK
1330 + response has been received.
1331 +
1332 + Available parameters are:
1333 + CURLFTPAUTH_DEFAULT - let libcurl decide
1334 + CURLFTPAUTH_SSL - try "AUTH SSL" first, then TLS
1335 + CURLFTPAUTH_TLS - try "AUTH TLS" first, then SSL
1336 + */
1337 + CINIT(FTPSSLAUTH, LONG, 129),
1338 +
1339 + CINIT(IOCTLFUNCTION, FUNCTIONPOINT, 130),
1340 + CINIT(IOCTLDATA, OBJECTPOINT, 131),
1341 +
1342 + /* 132 OBSOLETE. Gone in 7.16.0 */
1343 + /* 133 OBSOLETE. Gone in 7.16.0 */
1344 +
1345 + /* zero terminated string for pass on to the FTP server when asked for
1346 + "account" info */
1347 + CINIT(FTP_ACCOUNT, STRINGPOINT, 134),
1348 +
1349 + /* feed cookie into cookie engine */
1350 + CINIT(COOKIELIST, STRINGPOINT, 135),
1351 +
1352 + /* ignore Content-Length */
1353 + CINIT(IGNORE_CONTENT_LENGTH, LONG, 136),
1354 +
1355 + /* Set to non-zero to skip the IP address received in a 227 PASV FTP server
1356 + response. Typically used for FTP-SSL purposes but is not restricted to
1357 + that. libcurl will then instead use the same IP address it used for the
1358 + control connection. */
1359 + CINIT(FTP_SKIP_PASV_IP, LONG, 137),
1360 +
1361 + /* Select "file method" to use when doing FTP, see the curl_ftpmethod
1362 + above. */
1363 + CINIT(FTP_FILEMETHOD, LONG, 138),
1364 +
1365 + /* Local port number to bind the socket to */
1366 + CINIT(LOCALPORT, LONG, 139),
1367 +
1368 + /* Number of ports to try, including the first one set with LOCALPORT.
1369 + Thus, setting it to 1 will make no additional attempts but the first.
1370 + */
1371 + CINIT(LOCALPORTRANGE, LONG, 140),
1372 +
1373 + /* no transfer, set up connection and let application use the socket by
1374 + extracting it with CURLINFO_LASTSOCKET */
1375 + CINIT(CONNECT_ONLY, LONG, 141),
1376 +
1377 + /* Function that will be called to convert from the
1378 + network encoding (instead of using the iconv calls in libcurl) */
1379 + CINIT(CONV_FROM_NETWORK_FUNCTION, FUNCTIONPOINT, 142),
1380 +
1381 + /* Function that will be called to convert to the
1382 + network encoding (instead of using the iconv calls in libcurl) */
1383 + CINIT(CONV_TO_NETWORK_FUNCTION, FUNCTIONPOINT, 143),
1384 +
1385 + /* Function that will be called to convert from UTF8
1386 + (instead of using the iconv calls in libcurl)
1387 + Note that this is used only for SSL certificate processing */
1388 + CINIT(CONV_FROM_UTF8_FUNCTION, FUNCTIONPOINT, 144),
1389 +
1390 + /* if the connection proceeds too quickly then need to slow it down */
1391 + /* limit-rate: maximum number of bytes per second to send or receive */
1392 + CINIT(MAX_SEND_SPEED_LARGE, OFF_T, 145),
1393 + CINIT(MAX_RECV_SPEED_LARGE, OFF_T, 146),
1394 +
1395 + /* Pointer to command string to send if USER/PASS fails. */
1396 + CINIT(FTP_ALTERNATIVE_TO_USER, STRINGPOINT, 147),
1397 +
1398 + /* callback function for setting socket options */
1399 + CINIT(SOCKOPTFUNCTION, FUNCTIONPOINT, 148),
1400 + CINIT(SOCKOPTDATA, OBJECTPOINT, 149),
1401 +
1402 + /* set to 0 to disable session ID re-use for this transfer, default is
1403 + enabled (== 1) */
1404 + CINIT(SSL_SESSIONID_CACHE, LONG, 150),
1405 +
1406 + /* allowed SSH authentication methods */
1407 + CINIT(SSH_AUTH_TYPES, LONG, 151),
1408 +
1409 + /* Used by scp/sftp to do public/private key authentication */
1410 + CINIT(SSH_PUBLIC_KEYFILE, STRINGPOINT, 152),
1411 + CINIT(SSH_PRIVATE_KEYFILE, STRINGPOINT, 153),
1412 +
1413 + /* Send CCC (Clear Command Channel) after authentication */
1414 + CINIT(FTP_SSL_CCC, LONG, 154),
1415 +
1416 + /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */
1417 + CINIT(TIMEOUT_MS, LONG, 155),
1418 + CINIT(CONNECTTIMEOUT_MS, LONG, 156),
1419 +
1420 + /* set to zero to disable the libcurl's decoding and thus pass the raw body
1421 + data to the application even when it is encoded/compressed */
1422 + CINIT(HTTP_TRANSFER_DECODING, LONG, 157),
1423 + CINIT(HTTP_CONTENT_DECODING, LONG, 158),
1424 +
1425 + /* Permission used when creating new files and directories on the remote
1426 + server for protocols that support it, SFTP/SCP/FILE */
1427 + CINIT(NEW_FILE_PERMS, LONG, 159),
1428 + CINIT(NEW_DIRECTORY_PERMS, LONG, 160),
1429 +
1430 + /* Set the behaviour of POST when redirecting. Values must be set to one
1431 + of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */
1432 + CINIT(POSTREDIR, LONG, 161),
1433 +
1434 + /* used by scp/sftp to verify the host's public key */
1435 + CINIT(SSH_HOST_PUBLIC_KEY_MD5, STRINGPOINT, 162),
1436 +
1437 + /* Callback function for opening socket (instead of socket(2)). Optionally,
1438 + callback is able change the address or refuse to connect returning
1439 + CURL_SOCKET_BAD. The callback should have type
1440 + curl_opensocket_callback */
1441 + CINIT(OPENSOCKETFUNCTION, FUNCTIONPOINT, 163),
1442 + CINIT(OPENSOCKETDATA, OBJECTPOINT, 164),
1443 +
1444 + /* POST volatile input fields. */
1445 + CINIT(COPYPOSTFIELDS, OBJECTPOINT, 165),
1446 +
1447 + /* set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy */
1448 + CINIT(PROXY_TRANSFER_MODE, LONG, 166),
1449 +
1450 + /* Callback function for seeking in the input stream */
1451 + CINIT(SEEKFUNCTION, FUNCTIONPOINT, 167),
1452 + CINIT(SEEKDATA, OBJECTPOINT, 168),
1453 +
1454 + /* CRL file */
1455 + CINIT(CRLFILE, STRINGPOINT, 169),
1456 +
1457 + /* Issuer certificate */
1458 + CINIT(ISSUERCERT, STRINGPOINT, 170),
1459 +
1460 + /* (IPv6) Address scope */
1461 + CINIT(ADDRESS_SCOPE, LONG, 171),
1462 +
1463 + /* Collect certificate chain info and allow it to get retrievable with
1464 + CURLINFO_CERTINFO after the transfer is complete. */
1465 + CINIT(CERTINFO, LONG, 172),
1466 +
1467 + /* "name" and "pwd" to use when fetching. */
1468 + CINIT(USERNAME, STRINGPOINT, 173),
1469 + CINIT(PASSWORD, STRINGPOINT, 174),
1470 +
1471 + /* "name" and "pwd" to use with Proxy when fetching. */
1472 + CINIT(PROXYUSERNAME, STRINGPOINT, 175),
1473 + CINIT(PROXYPASSWORD, STRINGPOINT, 176),
1474 +
1475 + /* Comma separated list of hostnames defining no-proxy zones. These should
1476 + match both hostnames directly, and hostnames within a domain. For
1477 + example, local.com will match local.com and www.local.com, but NOT
1478 + notlocal.com or www.notlocal.com. For compatibility with other
1479 + implementations of this, .local.com will be considered to be the same as
1480 + local.com. A single * is the only valid wildcard, and effectively
1481 + disables the use of proxy. */
1482 + CINIT(NOPROXY, STRINGPOINT, 177),
1483 +
1484 + /* block size for TFTP transfers */
1485 + CINIT(TFTP_BLKSIZE, LONG, 178),
1486 +
1487 + /* Socks Service */
1488 + CINIT(SOCKS5_GSSAPI_SERVICE, STRINGPOINT, 179), /* DEPRECATED, do not use! */
1489 +
1490 + /* Socks Service */
1491 + CINIT(SOCKS5_GSSAPI_NEC, LONG, 180),
1492 +
1493 + /* set the bitmask for the protocols that are allowed to be used for the
1494 + transfer, which thus helps the app which takes URLs from users or other
1495 + external inputs and want to restrict what protocol(s) to deal
1496 + with. Defaults to CURLPROTO_ALL. */
1497 + CINIT(PROTOCOLS, LONG, 181),
1498 +
1499 + /* set the bitmask for the protocols that libcurl is allowed to follow to,
1500 + as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs
1501 + to be set in both bitmasks to be allowed to get redirected to. Defaults
1502 + to all protocols except FILE and SCP. */
1503 + CINIT(REDIR_PROTOCOLS, LONG, 182),
1504 +
1505 + /* set the SSH knownhost file name to use */
1506 + CINIT(SSH_KNOWNHOSTS, STRINGPOINT, 183),
1507 +
1508 + /* set the SSH host key callback, must point to a curl_sshkeycallback
1509 + function */
1510 + CINIT(SSH_KEYFUNCTION, FUNCTIONPOINT, 184),
1511 +
1512 + /* set the SSH host key callback custom pointer */
1513 + CINIT(SSH_KEYDATA, OBJECTPOINT, 185),
1514 +
1515 + /* set the SMTP mail originator */
1516 + CINIT(MAIL_FROM, STRINGPOINT, 186),
1517 +
1518 + /* set the list of SMTP mail receiver(s) */
1519 + CINIT(MAIL_RCPT, OBJECTPOINT, 187),
1520 +
1521 + /* FTP: send PRET before PASV */
1522 + CINIT(FTP_USE_PRET, LONG, 188),
1523 +
1524 + /* RTSP request method (OPTIONS, SETUP, PLAY, etc...) */
1525 + CINIT(RTSP_REQUEST, LONG, 189),
1526 +
1527 + /* The RTSP session identifier */
1528 + CINIT(RTSP_SESSION_ID, STRINGPOINT, 190),
1529 +
1530 + /* The RTSP stream URI */
1531 + CINIT(RTSP_STREAM_URI, STRINGPOINT, 191),
1532 +
1533 + /* The Transport: header to use in RTSP requests */
1534 + CINIT(RTSP_TRANSPORT, STRINGPOINT, 192),
1535 +
1536 + /* Manually initialize the client RTSP CSeq for this handle */
1537 + CINIT(RTSP_CLIENT_CSEQ, LONG, 193),
1538 +
1539 + /* Manually initialize the server RTSP CSeq for this handle */
1540 + CINIT(RTSP_SERVER_CSEQ, LONG, 194),
1541 +
1542 + /* The stream to pass to INTERLEAVEFUNCTION. */
1543 + CINIT(INTERLEAVEDATA, OBJECTPOINT, 195),
1544 +
1545 + /* Let the application define a custom write method for RTP data */
1546 + CINIT(INTERLEAVEFUNCTION, FUNCTIONPOINT, 196),
1547 +
1548 + /* Turn on wildcard matching */
1549 + CINIT(WILDCARDMATCH, LONG, 197),
1550 +
1551 + /* Directory matching callback called before downloading of an
1552 + individual file (chunk) started */
1553 + CINIT(CHUNK_BGN_FUNCTION, FUNCTIONPOINT, 198),
1554 +
1555 + /* Directory matching callback called after the file (chunk)
1556 + was downloaded, or skipped */
1557 + CINIT(CHUNK_END_FUNCTION, FUNCTIONPOINT, 199),
1558 +
1559 + /* Change match (fnmatch-like) callback for wildcard matching */
1560 + CINIT(FNMATCH_FUNCTION, FUNCTIONPOINT, 200),
1561 +
1562 + /* Let the application define custom chunk data pointer */
1563 + CINIT(CHUNK_DATA, OBJECTPOINT, 201),
1564 +
1565 + /* FNMATCH_FUNCTION user pointer */
1566 + CINIT(FNMATCH_DATA, OBJECTPOINT, 202),
1567 +
1568 + /* send linked-list of name:port:address sets */
1569 + CINIT(RESOLVE, OBJECTPOINT, 203),
1570 +
1571 + /* Set a username for authenticated TLS */
1572 + CINIT(TLSAUTH_USERNAME, STRINGPOINT, 204),
1573 +
1574 + /* Set a password for authenticated TLS */
1575 + CINIT(TLSAUTH_PASSWORD, STRINGPOINT, 205),
1576 +
1577 + /* Set authentication type for authenticated TLS */
1578 + CINIT(TLSAUTH_TYPE, STRINGPOINT, 206),
1579 +
1580 + /* Set to 1 to enable the "TE:" header in HTTP requests to ask for
1581 + compressed transfer-encoded responses. Set to 0 to disable the use of TE:
1582 + in outgoing requests. The current default is 0, but it might change in a
1583 + future libcurl release.
1584 +
1585 + libcurl will ask for the compressed methods it knows of, and if that
1586 + isn't any, it will not ask for transfer-encoding at all even if this
1587 + option is set to 1.
1588 +
1589 + */
1590 + CINIT(TRANSFER_ENCODING, LONG, 207),
1591 +
1592 + /* Callback function for closing socket (instead of close(2)). The callback
1593 + should have type curl_closesocket_callback */
1594 + CINIT(CLOSESOCKETFUNCTION, FUNCTIONPOINT, 208),
1595 + CINIT(CLOSESOCKETDATA, OBJECTPOINT, 209),
1596 +
1597 + /* allow GSSAPI credential delegation */
1598 + CINIT(GSSAPI_DELEGATION, LONG, 210),
1599 +
1600 + /* Set the name servers to use for DNS resolution */
1601 + CINIT(DNS_SERVERS, STRINGPOINT, 211),
1602 +
1603 + /* Time-out accept operations (currently for FTP only) after this amount
1604 + of milliseconds. */
1605 + CINIT(ACCEPTTIMEOUT_MS, LONG, 212),
1606 +
1607 + /* Set TCP keepalive */
1608 + CINIT(TCP_KEEPALIVE, LONG, 213),
1609 +
1610 + /* non-universal keepalive knobs (Linux, AIX, HP-UX, more) */
1611 + CINIT(TCP_KEEPIDLE, LONG, 214),
1612 + CINIT(TCP_KEEPINTVL, LONG, 215),
1613 +
1614 + /* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */
1615 + CINIT(SSL_OPTIONS, LONG, 216),
1616 +
1617 + /* Set the SMTP auth originator */
1618 + CINIT(MAIL_AUTH, STRINGPOINT, 217),
1619 +
1620 + /* Enable/disable SASL initial response */
1621 + CINIT(SASL_IR, LONG, 218),
1622 +
1623 + /* Function that will be called instead of the internal progress display
1624 + * function. This function should be defined as the curl_xferinfo_callback
1625 + * prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION) */
1626 + CINIT(XFERINFOFUNCTION, FUNCTIONPOINT, 219),
1627 +
1628 + /* The XOAUTH2 bearer token */
1629 + CINIT(XOAUTH2_BEARER, STRINGPOINT, 220),
1630 +
1631 + /* Set the interface string to use as outgoing network
1632 + * interface for DNS requests.
1633 + * Only supported by the c-ares DNS backend */
1634 + CINIT(DNS_INTERFACE, STRINGPOINT, 221),
1635 +
1636 + /* Set the local IPv4 address to use for outgoing DNS requests.
1637 + * Only supported by the c-ares DNS backend */
1638 + CINIT(DNS_LOCAL_IP4, STRINGPOINT, 222),
1639 +
1640 + /* Set the local IPv4 address to use for outgoing DNS requests.
1641 + * Only supported by the c-ares DNS backend */
1642 + CINIT(DNS_LOCAL_IP6, STRINGPOINT, 223),
1643 +
1644 + /* Set authentication options directly */
1645 + CINIT(LOGIN_OPTIONS, STRINGPOINT, 224),
1646 +
1647 + /* Enable/disable TLS NPN extension (http2 over ssl might fail without) */
1648 + CINIT(SSL_ENABLE_NPN, LONG, 225),
1649 +
1650 + /* Enable/disable TLS ALPN extension (http2 over ssl might fail without) */
1651 + CINIT(SSL_ENABLE_ALPN, LONG, 226),
1652 +
1653 + /* Time to wait for a response to a HTTP request containing an
1654 + * Expect: 100-continue header before sending the data anyway. */
1655 + CINIT(EXPECT_100_TIMEOUT_MS, LONG, 227),
1656 +
1657 + /* This points to a linked list of headers used for proxy requests only,
1658 + struct curl_slist kind */
1659 + CINIT(PROXYHEADER, OBJECTPOINT, 228),
1660 +
1661 + /* Pass in a bitmask of "header options" */
1662 + CINIT(HEADEROPT, LONG, 229),
1663 +
1664 + /* The public key in DER form used to validate the peer public key
1665 + this option is used only if SSL_VERIFYPEER is true */
1666 + CINIT(PINNEDPUBLICKEY, STRINGPOINT, 230),
1667 +
1668 + /* Path to Unix domain socket */
1669 + CINIT(UNIX_SOCKET_PATH, STRINGPOINT, 231),
1670 +
1671 + /* Set if we should verify the certificate status. */
1672 + CINIT(SSL_VERIFYSTATUS, LONG, 232),
1673 +
1674 + /* Set if we should enable TLS false start. */
1675 + CINIT(SSL_FALSESTART, LONG, 233),
1676 +
1677 + /* Do not squash dot-dot sequences */
1678 + CINIT(PATH_AS_IS, LONG, 234),
1679 +
1680 + /* Proxy Service Name */
1681 + CINIT(PROXY_SERVICE_NAME, STRINGPOINT, 235),
1682 +
1683 + /* Service Name */
1684 + CINIT(SERVICE_NAME, STRINGPOINT, 236),
1685 +
1686 + /* Wait/don't wait for pipe/mutex to clarify */
1687 + CINIT(PIPEWAIT, LONG, 237),
1688 +
1689 + /* Set the protocol used when curl is given a URL without a protocol */
1690 + CINIT(DEFAULT_PROTOCOL, STRINGPOINT, 238),
1691 +
1692 + /* Set stream weight, 1 - 256 (default is 16) */
1693 + CINIT(STREAM_WEIGHT, LONG, 239),
1694 +
1695 + /* Set stream dependency on another CURL handle */
1696 + CINIT(STREAM_DEPENDS, OBJECTPOINT, 240),
1697 +
1698 + /* Set E-xclusive stream dependency on another CURL handle */
1699 + CINIT(STREAM_DEPENDS_E, OBJECTPOINT, 241),
1700 +
1701 + /* Do not send any tftp option requests to the server */
1702 + CINIT(TFTP_NO_OPTIONS, LONG, 242),
1703 +
1704 + /* Linked-list of host:port:connect-to-host:connect-to-port,
1705 + overrides the URL's host:port (only for the network layer) */
1706 + CINIT(CONNECT_TO, OBJECTPOINT, 243),
1707 +
1708 + /* Set TCP Fast Open */
1709 + CINIT(TCP_FASTOPEN, LONG, 244),
1710 +
1711 + /* Continue to send data if the server responds early with an
1712 + * HTTP status code >= 300 */
1713 + CINIT(KEEP_SENDING_ON_ERROR, LONG, 245),
1714 +
1715 + /* The CApath or CAfile used to validate the proxy certificate
1716 + this option is used only if PROXY_SSL_VERIFYPEER is true */
1717 + CINIT(PROXY_CAINFO, STRINGPOINT, 246),
1718 +
1719 + /* The CApath directory used to validate the proxy certificate
1720 + this option is used only if PROXY_SSL_VERIFYPEER is true */
1721 + CINIT(PROXY_CAPATH, STRINGPOINT, 247),
1722 +
1723 + /* Set if we should verify the proxy in ssl handshake,
1724 + set 1 to verify. */
1725 + CINIT(PROXY_SSL_VERIFYPEER, LONG, 248),
1726 +
1727 + /* Set if we should verify the Common name from the proxy certificate in ssl
1728 + * handshake, set 1 to check existence, 2 to ensure that it matches
1729 + * the provided hostname. */
1730 + CINIT(PROXY_SSL_VERIFYHOST, LONG, 249),
1731 +
1732 + /* What version to specifically try to use for proxy.
1733 + See CURL_SSLVERSION defines below. */
1734 + CINIT(PROXY_SSLVERSION, LONG, 250),
1735 +
1736 + /* Set a username for authenticated TLS for proxy */
1737 + CINIT(PROXY_TLSAUTH_USERNAME, STRINGPOINT, 251),
1738 +
1739 + /* Set a password for authenticated TLS for proxy */
1740 + CINIT(PROXY_TLSAUTH_PASSWORD, STRINGPOINT, 252),
1741 +
1742 + /* Set authentication type for authenticated TLS for proxy */
1743 + CINIT(PROXY_TLSAUTH_TYPE, STRINGPOINT, 253),
1744 +
1745 + /* name of the file keeping your private SSL-certificate for proxy */
1746 + CINIT(PROXY_SSLCERT, STRINGPOINT, 254),
1747 +
1748 + /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") for
1749 + proxy */
1750 + CINIT(PROXY_SSLCERTTYPE, STRINGPOINT, 255),
1751 +
1752 + /* name of the file keeping your private SSL-key for proxy */
1753 + CINIT(PROXY_SSLKEY, STRINGPOINT, 256),
1754 +
1755 + /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") for
1756 + proxy */
1757 + CINIT(PROXY_SSLKEYTYPE, STRINGPOINT, 257),
1758 +
1759 + /* password for the SSL private key for proxy */
1760 + CINIT(PROXY_KEYPASSWD, STRINGPOINT, 258),
1761 +
1762 + /* Specify which SSL ciphers to use for proxy */
1763 + CINIT(PROXY_SSL_CIPHER_LIST, STRINGPOINT, 259),
1764 +
1765 + /* CRL file for proxy */
1766 + CINIT(PROXY_CRLFILE, STRINGPOINT, 260),
1767 +
1768 + /* Enable/disable specific SSL features with a bitmask for proxy, see
1769 + CURLSSLOPT_* */
1770 + CINIT(PROXY_SSL_OPTIONS, LONG, 261),
1771 +
1772 + /* Name of pre proxy to use. */
1773 + CINIT(PRE_PROXY, STRINGPOINT, 262),
1774 +
1775 + /* The public key in DER form used to validate the proxy public key
1776 + this option is used only if PROXY_SSL_VERIFYPEER is true */
1777 + CINIT(PROXY_PINNEDPUBLICKEY, STRINGPOINT, 263),
1778 +
1779 + /* Path to an abstract Unix domain socket */
1780 + CINIT(ABSTRACT_UNIX_SOCKET, STRINGPOINT, 264),
1781 +
1782 + /* Suppress proxy CONNECT response headers from user callbacks */
1783 + CINIT(SUPPRESS_CONNECT_HEADERS, LONG, 265),
1784 +
1785 + CURLOPT_LASTENTRY /* the last unused */
1786 +} CURLoption;
1787 +
1788 +#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
1789 + the obsolete stuff removed! */
1790 +
1791 +/* Backwards compatibility with older names */
1792 +/* These are scheduled to disappear by 2011 */
1793 +
1794 +/* This was added in version 7.19.1 */
1795 +#define CURLOPT_POST301 CURLOPT_POSTREDIR
1796 +
1797 +/* These are scheduled to disappear by 2009 */
1798 +
1799 +/* The following were added in 7.17.0 */
1800 +#define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD
1801 +#define CURLOPT_FTPAPPEND CURLOPT_APPEND
1802 +#define CURLOPT_FTPLISTONLY CURLOPT_DIRLISTONLY
1803 +#define CURLOPT_FTP_SSL CURLOPT_USE_SSL
1804 +
1805 +/* The following were added earlier */
1806 +
1807 +#define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD
1808 +#define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL
1809 +
1810 +#else
1811 +/* This is set if CURL_NO_OLDIES is defined at compile-time */
1812 +#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */
1813 +#endif
1814 +
1815 +
1816 + /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host
1817 + name resolves addresses using more than one IP protocol version, this
1818 + option might be handy to force libcurl to use a specific IP version. */
1819 +#define CURL_IPRESOLVE_WHATEVER 0 /* default, resolves addresses to all IP
1820 + versions that your system allows */
1821 +#define CURL_IPRESOLVE_V4 1 /* resolve to IPv4 addresses */
1822 +#define CURL_IPRESOLVE_V6 2 /* resolve to IPv6 addresses */
1823 +
1824 + /* three convenient "aliases" that follow the name scheme better */
1825 +#define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER
1826 +
1827 + /* These enums are for use with the CURLOPT_HTTP_VERSION option. */
1828 +enum {
1829 + CURL_HTTP_VERSION_NONE, /* setting this means we don't care, and that we'd
1830 + like the library to choose the best possible
1831 + for us! */
1832 + CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */
1833 + CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */
1834 + CURL_HTTP_VERSION_2_0, /* please use HTTP 2 in the request */
1835 + CURL_HTTP_VERSION_2TLS, /* use version 2 for HTTPS, version 1.1 for HTTP */
1836 + CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, /* please use HTTP 2 without HTTP/1.1
1837 + Upgrade */
1838 +
1839 + CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */
1840 +};
1841 +
1842 +/* Convenience definition simple because the name of the version is HTTP/2 and
1843 + not 2.0. The 2_0 version of the enum name was set while the version was
1844 + still planned to be 2.0 and we stick to it for compatibility. */
1845 +#define CURL_HTTP_VERSION_2 CURL_HTTP_VERSION_2_0
1846 +
1847 +/*
1848 + * Public API enums for RTSP requests
1849 + */
1850 +enum {
1851 + CURL_RTSPREQ_NONE, /* first in list */
1852 + CURL_RTSPREQ_OPTIONS,
1853 + CURL_RTSPREQ_DESCRIBE,
1854 + CURL_RTSPREQ_ANNOUNCE,
1855 + CURL_RTSPREQ_SETUP,
1856 + CURL_RTSPREQ_PLAY,
1857 + CURL_RTSPREQ_PAUSE,
1858 + CURL_RTSPREQ_TEARDOWN,
1859 + CURL_RTSPREQ_GET_PARAMETER,
1860 + CURL_RTSPREQ_SET_PARAMETER,
1861 + CURL_RTSPREQ_RECORD,
1862 + CURL_RTSPREQ_RECEIVE,
1863 + CURL_RTSPREQ_LAST /* last in list */
1864 +};
1865 +
1866 + /* These enums are for use with the CURLOPT_NETRC option. */
1867 +enum CURL_NETRC_OPTION {
1868 + CURL_NETRC_IGNORED, /* The .netrc will never be read.
1869 + * This is the default. */
1870 + CURL_NETRC_OPTIONAL, /* A user:password in the URL will be preferred
1871 + * to one in the .netrc. */
1872 + CURL_NETRC_REQUIRED, /* A user:password in the URL will be ignored.
1873 + * Unless one is set programmatically, the .netrc
1874 + * will be queried. */
1875 + CURL_NETRC_LAST
1876 +};
1877 +
1878 +enum {
1879 + CURL_SSLVERSION_DEFAULT,
1880 + CURL_SSLVERSION_TLSv1, /* TLS 1.x */
1881 + CURL_SSLVERSION_SSLv2,
1882 + CURL_SSLVERSION_SSLv3,
1883 + CURL_SSLVERSION_TLSv1_0,
1884 + CURL_SSLVERSION_TLSv1_1,
1885 + CURL_SSLVERSION_TLSv1_2,
1886 + CURL_SSLVERSION_TLSv1_3,
1887 +
1888 + CURL_SSLVERSION_LAST /* never use, keep last */
1889 +};
1890 +
1891 +enum {
1892 + CURL_SSLVERSION_MAX_NONE = 0,
1893 + CURL_SSLVERSION_MAX_DEFAULT = (CURL_SSLVERSION_TLSv1 << 16),
1894 + CURL_SSLVERSION_MAX_TLSv1_0 = (CURL_SSLVERSION_TLSv1_0 << 16),
1895 + CURL_SSLVERSION_MAX_TLSv1_1 = (CURL_SSLVERSION_TLSv1_1 << 16),
1896 + CURL_SSLVERSION_MAX_TLSv1_2 = (CURL_SSLVERSION_TLSv1_2 << 16),
1897 + CURL_SSLVERSION_MAX_TLSv1_3 = (CURL_SSLVERSION_TLSv1_3 << 16),
1898 +
1899 + /* never use, keep last */
1900 + CURL_SSLVERSION_MAX_LAST = (CURL_SSLVERSION_LAST << 16)
1901 +};
1902 +
1903 +enum CURL_TLSAUTH {
1904 + CURL_TLSAUTH_NONE,
1905 + CURL_TLSAUTH_SRP,
1906 + CURL_TLSAUTH_LAST /* never use, keep last */
1907 +};
1908 +
1909 +/* symbols to use with CURLOPT_POSTREDIR.
1910 + CURL_REDIR_POST_301, CURL_REDIR_POST_302 and CURL_REDIR_POST_303
1911 + can be bitwise ORed so that CURL_REDIR_POST_301 | CURL_REDIR_POST_302
1912 + | CURL_REDIR_POST_303 == CURL_REDIR_POST_ALL */
1913 +
1914 +#define CURL_REDIR_GET_ALL 0
1915 +#define CURL_REDIR_POST_301 1
1916 +#define CURL_REDIR_POST_302 2
1917 +#define CURL_REDIR_POST_303 4
1918 +#define CURL_REDIR_POST_ALL \
1919 + (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303)
1920 +
1921 +typedef enum {
1922 + CURL_TIMECOND_NONE,
1923 +
1924 + CURL_TIMECOND_IFMODSINCE,
1925 + CURL_TIMECOND_IFUNMODSINCE,
1926 + CURL_TIMECOND_LASTMOD,
1927 +
1928 + CURL_TIMECOND_LAST
1929 +} curl_TimeCond;
1930 +
1931 +
1932 +/* curl_strequal() and curl_strnequal() are subject for removal in a future
1933 + libcurl, see lib/README.curlx for details
1934 +
1935 + !checksrc! disable SPACEBEFOREPAREN 2
1936 +*/
1937 +CURL_EXTERN int (curl_strequal)(const char *s1, const char *s2);
1938 +CURL_EXTERN int (curl_strnequal)(const char *s1, const char *s2, size_t n);
1939 +
1940 +/* name is uppercase CURLFORM_<name> */
1941 +#ifdef CFINIT
1942 +#undef CFINIT
1943 +#endif
1944 +
1945 +#ifdef CURL_ISOCPP
1946 +#define CFINIT(name) CURLFORM_ ## name
1947 +#else
1948 +/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */
1949 +#define CFINIT(name) CURLFORM_/**/name
1950 +#endif
1951 +
1952 +typedef enum {
1953 + CFINIT(NOTHING), /********* the first one is unused ************/
1954 +
1955 + /* */
1956 + CFINIT(COPYNAME),
1957 + CFINIT(PTRNAME),
1958 + CFINIT(NAMELENGTH),
1959 + CFINIT(COPYCONTENTS),
1960 + CFINIT(PTRCONTENTS),
1961 + CFINIT(CONTENTSLENGTH),
1962 + CFINIT(FILECONTENT),
1963 + CFINIT(ARRAY),
1964 + CFINIT(OBSOLETE),
1965 + CFINIT(FILE),
1966 +
1967 + CFINIT(BUFFER),
1968 + CFINIT(BUFFERPTR),
1969 + CFINIT(BUFFERLENGTH),
1970 +
1971 + CFINIT(CONTENTTYPE),
1972 + CFINIT(CONTENTHEADER),
1973 + CFINIT(FILENAME),
1974 + CFINIT(END),
1975 + CFINIT(OBSOLETE2),
1976 +
1977 + CFINIT(STREAM),
1978 + CFINIT(CONTENTLEN), /* added in 7.46.0, provide a curl_off_t length */
1979 +
1980 + CURLFORM_LASTENTRY /* the last unused */
1981 +} CURLformoption;
1982 +
1983 +#undef CFINIT /* done */
1984 +
1985 +/* structure to be used as parameter for CURLFORM_ARRAY */
1986 +struct curl_forms {
1987 + CURLformoption option;
1988 + const char *value;
1989 +};
1990 +
1991 +/* use this for multipart formpost building */
1992 +/* Returns code for curl_formadd()
1993 + *
1994 + * Returns:
1995 + * CURL_FORMADD_OK on success
1996 + * CURL_FORMADD_MEMORY if the FormInfo allocation fails
1997 + * CURL_FORMADD_OPTION_TWICE if one option is given twice for one Form
1998 + * CURL_FORMADD_NULL if a null pointer was given for a char
1999 + * CURL_FORMADD_MEMORY if the allocation of a FormInfo struct failed
2000 + * CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used
2001 + * CURL_FORMADD_INCOMPLETE if the some FormInfo is not complete (or error)
2002 + * CURL_FORMADD_MEMORY if a curl_httppost struct cannot be allocated
2003 + * CURL_FORMADD_MEMORY if some allocation for string copying failed.
2004 + * CURL_FORMADD_ILLEGAL_ARRAY if an illegal option is used in an array
2005 + *
2006 + ***************************************************************************/
2007 +typedef enum {
2008 + CURL_FORMADD_OK, /* first, no error */
2009 +
2010 + CURL_FORMADD_MEMORY,
2011 + CURL_FORMADD_OPTION_TWICE,
2012 + CURL_FORMADD_NULL,
2013 + CURL_FORMADD_UNKNOWN_OPTION,
2014 + CURL_FORMADD_INCOMPLETE,
2015 + CURL_FORMADD_ILLEGAL_ARRAY,
2016 + CURL_FORMADD_DISABLED, /* libcurl was built with this disabled */
2017 +
2018 + CURL_FORMADD_LAST /* last */
2019 +} CURLFORMcode;
2020 +
2021 +/*
2022 + * NAME curl_formadd()
2023 + *
2024 + * DESCRIPTION
2025 + *
2026 + * Pretty advanced function for building multi-part formposts. Each invoke
2027 + * adds one part that together construct a full post. Then use
2028 + * CURLOPT_HTTPPOST to send it off to libcurl.
2029 + */
2030 +CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost,
2031 + struct curl_httppost **last_post,
2032 + ...);
2033 +
2034 +/*
2035 + * callback function for curl_formget()
2036 + * The void *arg pointer will be the one passed as second argument to
2037 + * curl_formget().
2038 + * The character buffer passed to it must not be freed.
2039 + * Should return the buffer length passed to it as the argument "len" on
2040 + * success.
2041 + */
2042 +typedef size_t (*curl_formget_callback)(void *arg, const char *buf,
2043 + size_t len);
2044 +
2045 +/*
2046 + * NAME curl_formget()
2047 + *
2048 + * DESCRIPTION
2049 + *
2050 + * Serialize a curl_httppost struct built with curl_formadd().
2051 + * Accepts a void pointer as second argument which will be passed to
2052 + * the curl_formget_callback function.
2053 + * Returns 0 on success.
2054 + */
2055 +CURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg,
2056 + curl_formget_callback append);
2057 +/*
2058 + * NAME curl_formfree()
2059 + *
2060 + * DESCRIPTION
2061 + *
2062 + * Free a multipart formpost previously built with curl_formadd().
2063 + */
2064 +CURL_EXTERN void curl_formfree(struct curl_httppost *form);
2065 +
2066 +/*
2067 + * NAME curl_getenv()
2068 + *
2069 + * DESCRIPTION
2070 + *
2071 + * Returns a malloc()'ed string that MUST be curl_free()ed after usage is
2072 + * complete. DEPRECATED - see lib/README.curlx
2073 + */
2074 +CURL_EXTERN char *curl_getenv(const char *variable);
2075 +
2076 +/*
2077 + * NAME curl_version()
2078 + *
2079 + * DESCRIPTION
2080 + *
2081 + * Returns a static ascii string of the libcurl version.
2082 + */
2083 +CURL_EXTERN char *curl_version(void);
2084 +
2085 +/*
2086 + * NAME curl_easy_escape()
2087 + *
2088 + * DESCRIPTION
2089 + *
2090 + * Escapes URL strings (converts all letters consider illegal in URLs to their
2091 + * %XX versions). This function returns a new allocated string or NULL if an
2092 + * error occurred.
2093 + */
2094 +CURL_EXTERN char *curl_easy_escape(CURL *handle,
2095 + const char *string,
2096 + int length);
2097 +
2098 +/* the previous version: */
2099 +CURL_EXTERN char *curl_escape(const char *string,
2100 + int length);
2101 +
2102 +
2103 +/*
2104 + * NAME curl_easy_unescape()
2105 + *
2106 + * DESCRIPTION
2107 + *
2108 + * Unescapes URL encoding in strings (converts all %XX codes to their 8bit
2109 + * versions). This function returns a new allocated string or NULL if an error
2110 + * occurred.
2111 + * Conversion Note: On non-ASCII platforms the ASCII %XX codes are
2112 + * converted into the host encoding.
2113 + */
2114 +CURL_EXTERN char *curl_easy_unescape(CURL *handle,
2115 + const char *string,
2116 + int length,
2117 + int *outlength);
2118 +
2119 +/* the previous version */
2120 +CURL_EXTERN char *curl_unescape(const char *string,
2121 + int length);
2122 +
2123 +/*
2124 + * NAME curl_free()
2125 + *
2126 + * DESCRIPTION
2127 + *
2128 + * Provided for de-allocation in the same translation unit that did the
2129 + * allocation. Added in libcurl 7.10
2130 + */
2131 +CURL_EXTERN void curl_free(void *p);
2132 +
2133 +/*
2134 + * NAME curl_global_init()
2135 + *
2136 + * DESCRIPTION
2137 + *
2138 + * curl_global_init() should be invoked exactly once for each application that
2139 + * uses libcurl and before any call of other libcurl functions.
2140 + *
2141 + * This function is not thread-safe!
2142 + */
2143 +CURL_EXTERN CURLcode curl_global_init(long flags);
2144 +
2145 +/*
2146 + * NAME curl_global_init_mem()
2147 + *
2148 + * DESCRIPTION
2149 + *
2150 + * curl_global_init() or curl_global_init_mem() should be invoked exactly once
2151 + * for each application that uses libcurl. This function can be used to
2152 + * initialize libcurl and set user defined memory management callback
2153 + * functions. Users can implement memory management routines to check for
2154 + * memory leaks, check for mis-use of the curl library etc. User registered
2155 + * callback routines with be invoked by this library instead of the system
2156 + * memory management routines like malloc, free etc.
2157 + */
2158 +CURL_EXTERN CURLcode curl_global_init_mem(long flags,
2159 + curl_malloc_callback m,
2160 + curl_free_callback f,
2161 + curl_realloc_callback r,
2162 + curl_strdup_callback s,
2163 + curl_calloc_callback c);
2164 +
2165 +/*
2166 + * NAME curl_global_cleanup()
2167 + *
2168 + * DESCRIPTION
2169 + *
2170 + * curl_global_cleanup() should be invoked exactly once for each application
2171 + * that uses libcurl
2172 + */
2173 +CURL_EXTERN void curl_global_cleanup(void);
2174 +
2175 +/* linked-list structure for the CURLOPT_QUOTE option (and other) */
2176 +struct curl_slist {
2177 + char *data;
2178 + struct curl_slist *next;
2179 +};
2180 +
2181 +/*
2182 + * NAME curl_slist_append()
2183 + *
2184 + * DESCRIPTION
2185 + *
2186 + * Appends a string to a linked list. If no list exists, it will be created
2187 + * first. Returns the new list, after appending.
2188 + */
2189 +CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *,
2190 + const char *);
2191 +
2192 +/*
2193 + * NAME curl_slist_free_all()
2194 + *
2195 + * DESCRIPTION
2196 + *
2197 + * free a previously built curl_slist.
2198 + */
2199 +CURL_EXTERN void curl_slist_free_all(struct curl_slist *);
2200 +
2201 +/*
2202 + * NAME curl_getdate()
2203 + *
2204 + * DESCRIPTION
2205 + *
2206 + * Returns the time, in seconds since 1 Jan 1970 of the time string given in
2207 + * the first argument. The time argument in the second parameter is unused
2208 + * and should be set to NULL.
2209 + */
2210 +CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused);
2211 +
2212 +/* info about the certificate chain, only for OpenSSL builds. Asked
2213 + for with CURLOPT_CERTINFO / CURLINFO_CERTINFO */
2214 +struct curl_certinfo {
2215 + int num_of_certs; /* number of certificates with information */
2216 + struct curl_slist **certinfo; /* for each index in this array, there's a
2217 + linked list with textual information in the
2218 + format "name: value" */
2219 +};
2220 +
2221 +/* enum for the different supported SSL backends */
2222 +typedef enum {
2223 + CURLSSLBACKEND_NONE = 0,
2224 + CURLSSLBACKEND_OPENSSL = 1,
2225 + CURLSSLBACKEND_GNUTLS = 2,
2226 + CURLSSLBACKEND_NSS = 3,
2227 + CURLSSLBACKEND_OBSOLETE4 = 4, /* Was QSOSSL. */
2228 + CURLSSLBACKEND_GSKIT = 5,
2229 + CURLSSLBACKEND_POLARSSL = 6,
2230 + CURLSSLBACKEND_CYASSL = 7,
2231 + CURLSSLBACKEND_SCHANNEL = 8,
2232 + CURLSSLBACKEND_DARWINSSL = 9,
2233 + CURLSSLBACKEND_AXTLS = 10,
2234 + CURLSSLBACKEND_MBEDTLS = 11
2235 +} curl_sslbackend;
2236 +
2237 +/* aliases for library clones and renames */
2238 +#define CURLSSLBACKEND_LIBRESSL 1
2239 +#define CURLSSLBACKEND_BORINGSSL 1
2240 +#define CURLSSLBACKEND_WOLFSSL 6
2241 +
2242 +/* Information about the SSL library used and the respective internal SSL
2243 + handle, which can be used to obtain further information regarding the
2244 + connection. Asked for with CURLINFO_TLS_SSL_PTR or CURLINFO_TLS_SESSION. */
2245 +struct curl_tlssessioninfo {
2246 + curl_sslbackend backend;
2247 + void *internals;
2248 +};
2249 +
2250 +#define CURLINFO_STRING 0x100000
2251 +#define CURLINFO_LONG 0x200000
2252 +#define CURLINFO_DOUBLE 0x300000
2253 +#define CURLINFO_SLIST 0x400000
2254 +#define CURLINFO_PTR 0x400000 /* same as SLIST */
2255 +#define CURLINFO_SOCKET 0x500000
2256 +#define CURLINFO_MASK 0x0fffff
2257 +#define CURLINFO_TYPEMASK 0xf00000
2258 +
2259 +typedef enum {
2260 + CURLINFO_NONE, /* first, never use this */
2261 + CURLINFO_EFFECTIVE_URL = CURLINFO_STRING + 1,
2262 + CURLINFO_RESPONSE_CODE = CURLINFO_LONG + 2,
2263 + CURLINFO_TOTAL_TIME = CURLINFO_DOUBLE + 3,
2264 + CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4,
2265 + CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5,
2266 + CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6,
2267 + CURLINFO_SIZE_UPLOAD = CURLINFO_DOUBLE + 7,
2268 + CURLINFO_SIZE_DOWNLOAD = CURLINFO_DOUBLE + 8,
2269 + CURLINFO_SPEED_DOWNLOAD = CURLINFO_DOUBLE + 9,
2270 + CURLINFO_SPEED_UPLOAD = CURLINFO_DOUBLE + 10,
2271 + CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11,
2272 + CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12,
2273 + CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13,
2274 + CURLINFO_FILETIME = CURLINFO_LONG + 14,
2275 + CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15,
2276 + CURLINFO_CONTENT_LENGTH_UPLOAD = CURLINFO_DOUBLE + 16,
2277 + CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17,
2278 + CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18,
2279 + CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19,
2280 + CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20,
2281 + CURLINFO_PRIVATE = CURLINFO_STRING + 21,
2282 + CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG + 22,
2283 + CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23,
2284 + CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24,
2285 + CURLINFO_OS_ERRNO = CURLINFO_LONG + 25,
2286 + CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26,
2287 + CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27,
2288 + CURLINFO_COOKIELIST = CURLINFO_SLIST + 28,
2289 + CURLINFO_LASTSOCKET = CURLINFO_LONG + 29,
2290 + CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30,
2291 + CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31,
2292 + CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32,
2293 + CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33,
2294 + CURLINFO_CERTINFO = CURLINFO_PTR + 34,
2295 + CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35,
2296 + CURLINFO_RTSP_SESSION_ID = CURLINFO_STRING + 36,
2297 + CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG + 37,
2298 + CURLINFO_RTSP_SERVER_CSEQ = CURLINFO_LONG + 38,
2299 + CURLINFO_RTSP_CSEQ_RECV = CURLINFO_LONG + 39,
2300 + CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40,
2301 + CURLINFO_LOCAL_IP = CURLINFO_STRING + 41,
2302 + CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42,
2303 + CURLINFO_TLS_SESSION = CURLINFO_PTR + 43,
2304 + CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44,
2305 + CURLINFO_TLS_SSL_PTR = CURLINFO_PTR + 45,
2306 + CURLINFO_HTTP_VERSION = CURLINFO_LONG + 46,
2307 + CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 47,
2308 + CURLINFO_PROTOCOL = CURLINFO_LONG + 48,
2309 + CURLINFO_SCHEME = CURLINFO_STRING + 49,
2310 + /* Fill in new entries below here! */
2311 +
2312 + CURLINFO_LASTONE = 49
2313 +} CURLINFO;
2314 +
2315 +/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
2316 + CURLINFO_HTTP_CODE */
2317 +#define CURLINFO_HTTP_CODE CURLINFO_RESPONSE_CODE
2318 +
2319 +typedef enum {
2320 + CURLCLOSEPOLICY_NONE, /* first, never use this */
2321 +
2322 + CURLCLOSEPOLICY_OLDEST,
2323 + CURLCLOSEPOLICY_LEAST_RECENTLY_USED,
2324 + CURLCLOSEPOLICY_LEAST_TRAFFIC,
2325 + CURLCLOSEPOLICY_SLOWEST,
2326 + CURLCLOSEPOLICY_CALLBACK,
2327 +
2328 + CURLCLOSEPOLICY_LAST /* last, never use this */
2329 +} curl_closepolicy;
2330 +
2331 +#define CURL_GLOBAL_SSL (1<<0)
2332 +#define CURL_GLOBAL_WIN32 (1<<1)
2333 +#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32)
2334 +#define CURL_GLOBAL_NOTHING 0
2335 +#define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL
2336 +#define CURL_GLOBAL_ACK_EINTR (1<<2)
2337 +
2338 +
2339 +/*****************************************************************************
2340 + * Setup defines, protos etc for the sharing stuff.
2341 + */
2342 +
2343 +/* Different data locks for a single share */
2344 +typedef enum {
2345 + CURL_LOCK_DATA_NONE = 0,
2346 + /* CURL_LOCK_DATA_SHARE is used internally to say that
2347 + * the locking is just made to change the internal state of the share
2348 + * itself.
2349 + */
2350 + CURL_LOCK_DATA_SHARE,
2351 + CURL_LOCK_DATA_COOKIE,
2352 + CURL_LOCK_DATA_DNS,
2353 + CURL_LOCK_DATA_SSL_SESSION,
2354 + CURL_LOCK_DATA_CONNECT,
2355 + CURL_LOCK_DATA_LAST
2356 +} curl_lock_data;
2357 +
2358 +/* Different lock access types */
2359 +typedef enum {
2360 + CURL_LOCK_ACCESS_NONE = 0, /* unspecified action */
2361 + CURL_LOCK_ACCESS_SHARED = 1, /* for read perhaps */
2362 + CURL_LOCK_ACCESS_SINGLE = 2, /* for write perhaps */
2363 + CURL_LOCK_ACCESS_LAST /* never use */
2364 +} curl_lock_access;
2365 +
2366 +typedef void (*curl_lock_function)(CURL *handle,
2367 + curl_lock_data data,
2368 + curl_lock_access locktype,
2369 + void *userptr);
2370 +typedef void (*curl_unlock_function)(CURL *handle,
2371 + curl_lock_data data,
2372 + void *userptr);
2373 +
2374 +
2375 +typedef enum {
2376 + CURLSHE_OK, /* all is fine */
2377 + CURLSHE_BAD_OPTION, /* 1 */
2378 + CURLSHE_IN_USE, /* 2 */
2379 + CURLSHE_INVALID, /* 3 */
2380 + CURLSHE_NOMEM, /* 4 out of memory */
2381 + CURLSHE_NOT_BUILT_IN, /* 5 feature not present in lib */
2382 + CURLSHE_LAST /* never use */
2383 +} CURLSHcode;
2384 +
2385 +typedef enum {
2386 + CURLSHOPT_NONE, /* don't use */
2387 + CURLSHOPT_SHARE, /* specify a data type to share */
2388 + CURLSHOPT_UNSHARE, /* specify which data type to stop sharing */
2389 + CURLSHOPT_LOCKFUNC, /* pass in a 'curl_lock_function' pointer */
2390 + CURLSHOPT_UNLOCKFUNC, /* pass in a 'curl_unlock_function' pointer */
2391 + CURLSHOPT_USERDATA, /* pass in a user data pointer used in the lock/unlock
2392 + callback functions */
2393 + CURLSHOPT_LAST /* never use */
2394 +} CURLSHoption;
2395 +
2396 +CURL_EXTERN CURLSH *curl_share_init(void);
2397 +CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *, CURLSHoption option, ...);
2398 +CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *);
2399 +
2400 +/****************************************************************************
2401 + * Structures for querying information about the curl library at runtime.
2402 + */
2403 +
2404 +typedef enum {
2405 + CURLVERSION_FIRST,
2406 + CURLVERSION_SECOND,
2407 + CURLVERSION_THIRD,
2408 + CURLVERSION_FOURTH,
2409 + CURLVERSION_LAST /* never actually use this */
2410 +} CURLversion;
2411 +
2412 +/* The 'CURLVERSION_NOW' is the symbolic name meant to be used by
2413 + basically all programs ever that want to get version information. It is
2414 + meant to be a built-in version number for what kind of struct the caller
2415 + expects. If the struct ever changes, we redefine the NOW to another enum
2416 + from above. */
2417 +#define CURLVERSION_NOW CURLVERSION_FOURTH
2418 +
2419 +typedef struct {
2420 + CURLversion age; /* age of the returned struct */
2421 + const char *version; /* LIBCURL_VERSION */
2422 + unsigned int version_num; /* LIBCURL_VERSION_NUM */
2423 + const char *host; /* OS/host/cpu/machine when configured */
2424 + int features; /* bitmask, see defines below */
2425 + const char *ssl_version; /* human readable string */
2426 + long ssl_version_num; /* not used anymore, always 0 */
2427 + const char *libz_version; /* human readable string */
2428 + /* protocols is terminated by an entry with a NULL protoname */
2429 + const char * const *protocols;
2430 +
2431 + /* The fields below this were added in CURLVERSION_SECOND */
2432 + const char *ares;
2433 + int ares_num;
2434 +
2435 + /* This field was added in CURLVERSION_THIRD */
2436 + const char *libidn;
2437 +
2438 + /* These field were added in CURLVERSION_FOURTH */
2439 +
2440 + /* Same as '_libiconv_version' if built with HAVE_ICONV */
2441 + int iconv_ver_num;
2442 +
2443 + const char *libssh_version; /* human readable string */
2444 +
2445 +} curl_version_info_data;
2446 +
2447 +#define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */
2448 +#define CURL_VERSION_KERBEROS4 (1<<1) /* Kerberos V4 auth is supported
2449 + (deprecated) */
2450 +#define CURL_VERSION_SSL (1<<2) /* SSL options are present */
2451 +#define CURL_VERSION_LIBZ (1<<3) /* libz features are present */
2452 +#define CURL_VERSION_NTLM (1<<4) /* NTLM auth is supported */
2453 +#define CURL_VERSION_GSSNEGOTIATE (1<<5) /* Negotiate auth is supported
2454 + (deprecated) */
2455 +#define CURL_VERSION_DEBUG (1<<6) /* Built with debug capabilities */
2456 +#define CURL_VERSION_ASYNCHDNS (1<<7) /* Asynchronous DNS resolves */
2457 +#define CURL_VERSION_SPNEGO (1<<8) /* SPNEGO auth is supported */
2458 +#define CURL_VERSION_LARGEFILE (1<<9) /* Supports files larger than 2GB */
2459 +#define CURL_VERSION_IDN (1<<10) /* Internationized Domain Names are
2460 + supported */
2461 +#define CURL_VERSION_SSPI (1<<11) /* Built against Windows SSPI */
2462 +#define CURL_VERSION_CONV (1<<12) /* Character conversions supported */
2463 +#define CURL_VERSION_CURLDEBUG (1<<13) /* Debug memory tracking supported */
2464 +#define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */
2465 +#define CURL_VERSION_NTLM_WB (1<<15) /* NTLM delegation to winbind helper
2466 + is supported */
2467 +#define CURL_VERSION_HTTP2 (1<<16) /* HTTP2 support built-in */
2468 +#define CURL_VERSION_GSSAPI (1<<17) /* Built against a GSS-API library */
2469 +#define CURL_VERSION_KERBEROS5 (1<<18) /* Kerberos V5 auth is supported */
2470 +#define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */
2471 +#define CURL_VERSION_PSL (1<<20) /* Mozilla's Public Suffix List, used
2472 + for cookie domain verification */
2473 +#define CURL_VERSION_HTTPS_PROXY (1<<21) /* HTTPS-proxy support built-in */
2474 +
2475 + /*
2476 + * NAME curl_version_info()
2477 + *
2478 + * DESCRIPTION
2479 + *
2480 + * This function returns a pointer to a static copy of the version info
2481 + * struct. See above.
2482 + */
2483 +CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion);
2484 +
2485 +/*
2486 + * NAME curl_easy_strerror()
2487 + *
2488 + * DESCRIPTION
2489 + *
2490 + * The curl_easy_strerror function may be used to turn a CURLcode value
2491 + * into the equivalent human readable error string. This is useful
2492 + * for printing meaningful error messages.
2493 + */
2494 +CURL_EXTERN const char *curl_easy_strerror(CURLcode);
2495 +
2496 +/*
2497 + * NAME curl_share_strerror()
2498 + *
2499 + * DESCRIPTION
2500 + *
2501 + * The curl_share_strerror function may be used to turn a CURLSHcode value
2502 + * into the equivalent human readable error string. This is useful
2503 + * for printing meaningful error messages.
2504 + */
2505 +CURL_EXTERN const char *curl_share_strerror(CURLSHcode);
2506 +
2507 +/*
2508 + * NAME curl_easy_pause()
2509 + *
2510 + * DESCRIPTION
2511 + *
2512 + * The curl_easy_pause function pauses or unpauses transfers. Select the new
2513 + * state by setting the bitmask, use the convenience defines below.
2514 + *
2515 + */
2516 +CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
2517 +
2518 +#define CURLPAUSE_RECV (1<<0)
2519 +#define CURLPAUSE_RECV_CONT (0)
2520 +
2521 +#define CURLPAUSE_SEND (1<<2)
2522 +#define CURLPAUSE_SEND_CONT (0)
2523 +
2524 +#define CURLPAUSE_ALL (CURLPAUSE_RECV|CURLPAUSE_SEND)
2525 +#define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT)
2526 +
2527 +#ifdef __cplusplus
2528 +}
2529 +#endif
2530 +
2531 +/* unfortunately, the easy.h and multi.h include files need options and info
2532 + stuff before they can be included! */
2533 +#include "easy.h" /* nothing in curl is fun without the easy stuff */
2534 +#include "multi.h"
2535 +
2536 +/* the typechecker doesn't work in C++ (yet) */
2537 +#if defined(__GNUC__) && defined(__GNUC_MINOR__) && \
2538 + ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \
2539 + !defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK)
2540 +#include "typecheck-gcc.h"
2541 +#else
2542 +#if defined(__STDC__) && (__STDC__ >= 1)
2543 +/* This preprocessor magic that replaces a call with the exact same call is
2544 + only done to make sure application authors pass exactly three arguments
2545 + to these functions. */
2546 +#define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param)
2547 +#define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg)
2548 +#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)
2549 +#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param)
2550 +#endif /* __STDC__ >= 1 */
2551 +#endif /* gcc >= 4.3 && !__cplusplus */
2552 +
2553 +#endif /* __CURL_CURL_H */
1 +#ifndef __CURL_CURLBUILD_H
2 +#define __CURL_CURLBUILD_H
3 +/***************************************************************************
4 + * _ _ ____ _
5 + * Project ___| | | | _ \| |
6 + * / __| | | | |_) | |
7 + * | (__| |_| | _ <| |___
8 + * \___|\___/|_| \_\_____|
9 + *
10 + * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
11 + *
12 + * This software is licensed as described in the file COPYING, which
13 + * you should have received as part of this distribution. The terms
14 + * are also available at https://curl.haxx.se/docs/copyright.html.
15 + *
16 + * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 + * copies of the Software, and permit persons to whom the Software is
18 + * furnished to do so, under the terms of the COPYING file.
19 + *
20 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 + * KIND, either express or implied.
22 + *
23 + ***************************************************************************/
24 +
25 +/* ================================================================ */
26 +/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */
27 +/* ================================================================ */
28 +
29 +/*
30 + * NOTE 1:
31 + * -------
32 + *
33 + * See file include/curl/curlbuild.h.in, run configure, and forget
34 + * that this file exists it is only used for non-configure systems.
35 + * But you can keep reading if you want ;-)
36 + *
37 + */
38 +
39 +/* ================================================================ */
40 +/* NOTES FOR NON-CONFIGURE SYSTEMS */
41 +/* ================================================================ */
42 +
43 +/*
44 + * NOTE 1:
45 + * -------
46 + *
47 + * Nothing in this file is intended to be modified or adjusted by the
48 + * curl library user nor by the curl library builder.
49 + *
50 + * If you think that something actually needs to be changed, adjusted
51 + * or fixed in this file, then, report it on the libcurl development
52 + * mailing list: https://cool.haxx.se/mailman/listinfo/curl-library/
53 + *
54 + * Try to keep one section per platform, compiler and architecture,
55 + * otherwise, if an existing section is reused for a different one and
56 + * later on the original is adjusted, probably the piggybacking one can
57 + * be adversely changed.
58 + *
59 + * In order to differentiate between platforms/compilers/architectures
60 + * use only compiler built in predefined preprocessor symbols.
61 + *
62 + * This header file shall only export symbols which are 'curl' or 'CURL'
63 + * prefixed, otherwise public name space would be polluted.
64 + *
65 + * NOTE 2:
66 + * -------
67 + *
68 + * For any given platform/compiler curl_off_t must be typedef'ed to a
69 + * 64-bit wide signed integral data type. The width of this data type
70 + * must remain constant and independent of any possible large file
71 + * support settings.
72 + *
73 + * As an exception to the above, curl_off_t shall be typedef'ed to a
74 + * 32-bit wide signed integral data type if there is no 64-bit type.
75 + *
76 + * As a general rule, curl_off_t shall not be mapped to off_t. This
77 + * rule shall only be violated if off_t is the only 64-bit data type
78 + * available and the size of off_t is independent of large file support
79 + * settings. Keep your build on the safe side avoiding an off_t gating.
80 + * If you have a 64-bit off_t then take for sure that another 64-bit
81 + * data type exists, dig deeper and you will find it.
82 + *
83 + * NOTE 3:
84 + * -------
85 + *
86 + * Right now you might be staring at file include/curl/curlbuild.h.dist or
87 + * at file include/curl/curlbuild.h, this is due to the following reason:
88 + * file include/curl/curlbuild.h.dist is renamed to include/curl/curlbuild.h
89 + * when the libcurl source code distribution archive file is created.
90 + *
91 + * File include/curl/curlbuild.h.dist is not included in the distribution
92 + * archive. File include/curl/curlbuild.h is not present in the git tree.
93 + *
94 + * The distributed include/curl/curlbuild.h file is only intended to be used
95 + * on systems which can not run the also distributed configure script.
96 + *
97 + * On systems capable of running the configure script, the configure process
98 + * will overwrite the distributed include/curl/curlbuild.h file with one that
99 + * is suitable and specific to the library being configured and built, which
100 + * is generated from the include/curl/curlbuild.h.in template file.
101 + *
102 + * If you check out from git on a non-configure platform, you must run the
103 + * appropriate buildconf* script to set up curlbuild.h and other local files.
104 + *
105 + */
106 +
107 +/* ================================================================ */
108 +/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */
109 +/* ================================================================ */
110 +
111 +#ifdef CURL_SIZEOF_LONG
112 +# error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h"
113 + Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined
114 +#endif
115 +
116 +#ifdef CURL_TYPEOF_CURL_SOCKLEN_T
117 +# error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
118 + Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined
119 +#endif
120 +
121 +#ifdef CURL_SIZEOF_CURL_SOCKLEN_T
122 +# error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
123 + Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined
124 +#endif
125 +
126 +#ifdef CURL_TYPEOF_CURL_OFF_T
127 +# error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
128 + Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined
129 +#endif
130 +
131 +#ifdef CURL_FORMAT_CURL_OFF_T
132 +# error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h"
133 + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined
134 +#endif
135 +
136 +#ifdef CURL_FORMAT_CURL_OFF_TU
137 +# error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h"
138 + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined
139 +#endif
140 +
141 +#ifdef CURL_FORMAT_OFF_T
142 +# error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h"
143 + Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined
144 +#endif
145 +
146 +#ifdef CURL_SIZEOF_CURL_OFF_T
147 +# error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
148 + Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined
149 +#endif
150 +
151 +#ifdef CURL_SUFFIX_CURL_OFF_T
152 +# error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h"
153 + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined
154 +#endif
155 +
156 +#ifdef CURL_SUFFIX_CURL_OFF_TU
157 +# error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h"
158 + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined
159 +#endif
160 +
161 +/* ================================================================ */
162 +/* EXTERNAL INTERFACE SETTINGS FOR NON-CONFIGURE SYSTEMS ONLY */
163 +/* ================================================================ */
164 +
165 +#if defined(__DJGPP__) || defined(__GO32__)
166 +# if defined(__DJGPP__) && (__DJGPP__ > 1)
167 +# define CURL_SIZEOF_LONG 4
168 +# define CURL_TYPEOF_CURL_OFF_T long long
169 +# define CURL_FORMAT_CURL_OFF_T "lld"
170 +# define CURL_FORMAT_CURL_OFF_TU "llu"
171 +# define CURL_FORMAT_OFF_T "%lld"
172 +# define CURL_SIZEOF_CURL_OFF_T 8
173 +# define CURL_SUFFIX_CURL_OFF_T LL
174 +# define CURL_SUFFIX_CURL_OFF_TU ULL
175 +# else
176 +# define CURL_SIZEOF_LONG 4
177 +# define CURL_TYPEOF_CURL_OFF_T long
178 +# define CURL_FORMAT_CURL_OFF_T "ld"
179 +# define CURL_FORMAT_CURL_OFF_TU "lu"
180 +# define CURL_FORMAT_OFF_T "%ld"
181 +# define CURL_SIZEOF_CURL_OFF_T 4
182 +# define CURL_SUFFIX_CURL_OFF_T L
183 +# define CURL_SUFFIX_CURL_OFF_TU UL
184 +# endif
185 +# define CURL_TYPEOF_CURL_SOCKLEN_T int
186 +# define CURL_SIZEOF_CURL_SOCKLEN_T 4
187 +
188 +#elif defined(__SALFORDC__)
189 +# define CURL_SIZEOF_LONG 4
190 +# define CURL_TYPEOF_CURL_OFF_T long
191 +# define CURL_FORMAT_CURL_OFF_T "ld"
192 +# define CURL_FORMAT_CURL_OFF_TU "lu"
193 +# define CURL_FORMAT_OFF_T "%ld"
194 +# define CURL_SIZEOF_CURL_OFF_T 4
195 +# define CURL_SUFFIX_CURL_OFF_T L
196 +# define CURL_SUFFIX_CURL_OFF_TU UL
197 +# define CURL_TYPEOF_CURL_SOCKLEN_T int
198 +# define CURL_SIZEOF_CURL_SOCKLEN_T 4
199 +
200 +#elif defined(__BORLANDC__)
201 +# if (__BORLANDC__ < 0x520)
202 +# define CURL_SIZEOF_LONG 4
203 +# define CURL_TYPEOF_CURL_OFF_T long
204 +# define CURL_FORMAT_CURL_OFF_T "ld"
205 +# define CURL_FORMAT_CURL_OFF_TU "lu"
206 +# define CURL_FORMAT_OFF_T "%ld"
207 +# define CURL_SIZEOF_CURL_OFF_T 4
208 +# define CURL_SUFFIX_CURL_OFF_T L
209 +# define CURL_SUFFIX_CURL_OFF_TU UL
210 +# else
211 +# define CURL_SIZEOF_LONG 4
212 +# define CURL_TYPEOF_CURL_OFF_T __int64
213 +# define CURL_FORMAT_CURL_OFF_T "I64d"
214 +# define CURL_FORMAT_CURL_OFF_TU "I64u"
215 +# define CURL_FORMAT_OFF_T "%I64d"
216 +# define CURL_SIZEOF_CURL_OFF_T 8
217 +# define CURL_SUFFIX_CURL_OFF_T i64
218 +# define CURL_SUFFIX_CURL_OFF_TU ui64
219 +# endif
220 +# define CURL_TYPEOF_CURL_SOCKLEN_T int
221 +# define CURL_SIZEOF_CURL_SOCKLEN_T 4
222 +
223 +#elif defined(__TURBOC__)
224 +# define CURL_SIZEOF_LONG 4
225 +# define CURL_TYPEOF_CURL_OFF_T long
226 +# define CURL_FORMAT_CURL_OFF_T "ld"
227 +# define CURL_FORMAT_CURL_OFF_TU "lu"
228 +# define CURL_FORMAT_OFF_T "%ld"
229 +# define CURL_SIZEOF_CURL_OFF_T 4
230 +# define CURL_SUFFIX_CURL_OFF_T L
231 +# define CURL_SUFFIX_CURL_OFF_TU UL
232 +# define CURL_TYPEOF_CURL_SOCKLEN_T int
233 +# define CURL_SIZEOF_CURL_SOCKLEN_T 4
234 +
235 +#elif defined(__WATCOMC__)
236 +# if defined(__386__)
237 +# define CURL_SIZEOF_LONG 4
238 +# define CURL_TYPEOF_CURL_OFF_T __int64
239 +# define CURL_FORMAT_CURL_OFF_T "I64d"
240 +# define CURL_FORMAT_CURL_OFF_TU "I64u"
241 +# define CURL_FORMAT_OFF_T "%I64d"
242 +# define CURL_SIZEOF_CURL_OFF_T 8
243 +# define CURL_SUFFIX_CURL_OFF_T i64
244 +# define CURL_SUFFIX_CURL_OFF_TU ui64
245 +# else
246 +# define CURL_SIZEOF_LONG 4
247 +# define CURL_TYPEOF_CURL_OFF_T long
248 +# define CURL_FORMAT_CURL_OFF_T "ld"
249 +# define CURL_FORMAT_CURL_OFF_TU "lu"
250 +# define CURL_FORMAT_OFF_T "%ld"
251 +# define CURL_SIZEOF_CURL_OFF_T 4
252 +# define CURL_SUFFIX_CURL_OFF_T L
253 +# define CURL_SUFFIX_CURL_OFF_TU UL
254 +# endif
255 +# define CURL_TYPEOF_CURL_SOCKLEN_T int
256 +# define CURL_SIZEOF_CURL_SOCKLEN_T 4
257 +
258 +#elif defined(__POCC__)
259 +# if (__POCC__ < 280)
260 +# define CURL_SIZEOF_LONG 4
261 +# define CURL_TYPEOF_CURL_OFF_T long
262 +# define CURL_FORMAT_CURL_OFF_T "ld"
263 +# define CURL_FORMAT_CURL_OFF_TU "lu"
264 +# define CURL_FORMAT_OFF_T "%ld"
265 +# define CURL_SIZEOF_CURL_OFF_T 4
266 +# define CURL_SUFFIX_CURL_OFF_T L
267 +# define CURL_SUFFIX_CURL_OFF_TU UL
268 +# elif defined(_MSC_VER)
269 +# define CURL_SIZEOF_LONG 4
270 +# define CURL_TYPEOF_CURL_OFF_T __int64
271 +# define CURL_FORMAT_CURL_OFF_T "I64d"
272 +# define CURL_FORMAT_CURL_OFF_TU "I64u"
273 +# define CURL_FORMAT_OFF_T "%I64d"
274 +# define CURL_SIZEOF_CURL_OFF_T 8
275 +# define CURL_SUFFIX_CURL_OFF_T i64
276 +# define CURL_SUFFIX_CURL_OFF_TU ui64
277 +# else
278 +# define CURL_SIZEOF_LONG 4
279 +# define CURL_TYPEOF_CURL_OFF_T long long
280 +# define CURL_FORMAT_CURL_OFF_T "lld"
281 +# define CURL_FORMAT_CURL_OFF_TU "llu"
282 +# define CURL_FORMAT_OFF_T "%lld"
283 +# define CURL_SIZEOF_CURL_OFF_T 8
284 +# define CURL_SUFFIX_CURL_OFF_T LL
285 +# define CURL_SUFFIX_CURL_OFF_TU ULL
286 +# endif
287 +# define CURL_TYPEOF_CURL_SOCKLEN_T int
288 +# define CURL_SIZEOF_CURL_SOCKLEN_T 4
289 +
290 +#elif defined(__LCC__)
291 +# define CURL_SIZEOF_LONG 4
292 +# define CURL_TYPEOF_CURL_OFF_T long
293 +# define CURL_FORMAT_CURL_OFF_T "ld"
294 +# define CURL_FORMAT_CURL_OFF_TU "lu"
295 +# define CURL_FORMAT_OFF_T "%ld"
296 +# define CURL_SIZEOF_CURL_OFF_T 4
297 +# define CURL_SUFFIX_CURL_OFF_T L
298 +# define CURL_SUFFIX_CURL_OFF_TU UL
299 +# define CURL_TYPEOF_CURL_SOCKLEN_T int
300 +# define CURL_SIZEOF_CURL_SOCKLEN_T 4
301 +
302 +#elif defined(__SYMBIAN32__)
303 +# if defined(__EABI__) /* Treat all ARM compilers equally */
304 +# define CURL_SIZEOF_LONG 4
305 +# define CURL_TYPEOF_CURL_OFF_T long long
306 +# define CURL_FORMAT_CURL_OFF_T "lld"
307 +# define CURL_FORMAT_CURL_OFF_TU "llu"
308 +# define CURL_FORMAT_OFF_T "%lld"
309 +# define CURL_SIZEOF_CURL_OFF_T 8
310 +# define CURL_SUFFIX_CURL_OFF_T LL
311 +# define CURL_SUFFIX_CURL_OFF_TU ULL
312 +# elif defined(__CW32__)
313 +# pragma longlong on
314 +# define CURL_SIZEOF_LONG 4
315 +# define CURL_TYPEOF_CURL_OFF_T long long
316 +# define CURL_FORMAT_CURL_OFF_T "lld"
317 +# define CURL_FORMAT_CURL_OFF_TU "llu"
318 +# define CURL_FORMAT_OFF_T "%lld"
319 +# define CURL_SIZEOF_CURL_OFF_T 8
320 +# define CURL_SUFFIX_CURL_OFF_T LL
321 +# define CURL_SUFFIX_CURL_OFF_TU ULL
322 +# elif defined(__VC32__)
323 +# define CURL_SIZEOF_LONG 4
324 +# define CURL_TYPEOF_CURL_OFF_T __int64
325 +# define CURL_FORMAT_CURL_OFF_T "lld"
326 +# define CURL_FORMAT_CURL_OFF_TU "llu"
327 +# define CURL_FORMAT_OFF_T "%lld"
328 +# define CURL_SIZEOF_CURL_OFF_T 8
329 +# define CURL_SUFFIX_CURL_OFF_T LL
330 +# define CURL_SUFFIX_CURL_OFF_TU ULL
331 +# endif
332 +# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
333 +# define CURL_SIZEOF_CURL_SOCKLEN_T 4
334 +
335 +#elif defined(__MWERKS__)
336 +# define CURL_SIZEOF_LONG 4
337 +# define CURL_TYPEOF_CURL_OFF_T long long
338 +# define CURL_FORMAT_CURL_OFF_T "lld"
339 +# define CURL_FORMAT_CURL_OFF_TU "llu"
340 +# define CURL_FORMAT_OFF_T "%lld"
341 +# define CURL_SIZEOF_CURL_OFF_T 8
342 +# define CURL_SUFFIX_CURL_OFF_T LL
343 +# define CURL_SUFFIX_CURL_OFF_TU ULL
344 +# define CURL_TYPEOF_CURL_SOCKLEN_T int
345 +# define CURL_SIZEOF_CURL_SOCKLEN_T 4
346 +
347 +#elif defined(_WIN32_WCE)
348 +# define CURL_SIZEOF_LONG 4
349 +# define CURL_TYPEOF_CURL_OFF_T __int64
350 +# define CURL_FORMAT_CURL_OFF_T "I64d"
351 +# define CURL_FORMAT_CURL_OFF_TU "I64u"
352 +# define CURL_FORMAT_OFF_T "%I64d"
353 +# define CURL_SIZEOF_CURL_OFF_T 8
354 +# define CURL_SUFFIX_CURL_OFF_T i64
355 +# define CURL_SUFFIX_CURL_OFF_TU ui64
356 +# define CURL_TYPEOF_CURL_SOCKLEN_T int
357 +# define CURL_SIZEOF_CURL_SOCKLEN_T 4
358 +
359 +#elif defined(__MINGW32__)
360 +# define CURL_SIZEOF_LONG 4
361 +# define CURL_TYPEOF_CURL_OFF_T long long
362 +# define CURL_FORMAT_CURL_OFF_T "I64d"
363 +# define CURL_FORMAT_CURL_OFF_TU "I64u"
364 +# define CURL_FORMAT_OFF_T "%I64d"
365 +# define CURL_SIZEOF_CURL_OFF_T 8
366 +# define CURL_SUFFIX_CURL_OFF_T LL
367 +# define CURL_SUFFIX_CURL_OFF_TU ULL
368 +# define CURL_TYPEOF_CURL_SOCKLEN_T int
369 +# define CURL_SIZEOF_CURL_SOCKLEN_T 4
370 +
371 +#elif defined(__VMS)
372 +# if defined(__VAX)
373 +# define CURL_SIZEOF_LONG 4
374 +# define CURL_TYPEOF_CURL_OFF_T long
375 +# define CURL_FORMAT_CURL_OFF_T "ld"
376 +# define CURL_FORMAT_CURL_OFF_TU "lu"
377 +# define CURL_FORMAT_OFF_T "%ld"
378 +# define CURL_SIZEOF_CURL_OFF_T 4
379 +# define CURL_SUFFIX_CURL_OFF_T L
380 +# define CURL_SUFFIX_CURL_OFF_TU UL
381 +# else
382 +# define CURL_SIZEOF_LONG 4
383 +# define CURL_TYPEOF_CURL_OFF_T long long
384 +# define CURL_FORMAT_CURL_OFF_T "lld"
385 +# define CURL_FORMAT_CURL_OFF_TU "llu"
386 +# define CURL_FORMAT_OFF_T "%lld"
387 +# define CURL_SIZEOF_CURL_OFF_T 8
388 +# define CURL_SUFFIX_CURL_OFF_T LL
389 +# define CURL_SUFFIX_CURL_OFF_TU ULL
390 +# endif
391 +# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
392 +# define CURL_SIZEOF_CURL_SOCKLEN_T 4
393 +
394 +#elif defined(__OS400__)
395 +# if defined(__ILEC400__)
396 +# define CURL_SIZEOF_LONG 4
397 +# define CURL_TYPEOF_CURL_OFF_T long long
398 +# define CURL_FORMAT_CURL_OFF_T "lld"
399 +# define CURL_FORMAT_CURL_OFF_TU "llu"
400 +# define CURL_FORMAT_OFF_T "%lld"
401 +# define CURL_SIZEOF_CURL_OFF_T 8
402 +# define CURL_SUFFIX_CURL_OFF_T LL
403 +# define CURL_SUFFIX_CURL_OFF_TU ULL
404 +# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
405 +# define CURL_SIZEOF_CURL_SOCKLEN_T 4
406 +# define CURL_PULL_SYS_TYPES_H 1
407 +# define CURL_PULL_SYS_SOCKET_H 1
408 +# endif
409 +
410 +#elif defined(__MVS__)
411 +# if defined(__IBMC__) || defined(__IBMCPP__)
412 +# if defined(_ILP32)
413 +# define CURL_SIZEOF_LONG 4
414 +# elif defined(_LP64)
415 +# define CURL_SIZEOF_LONG 8
416 +# endif
417 +# if defined(_LONG_LONG)
418 +# define CURL_TYPEOF_CURL_OFF_T long long
419 +# define CURL_FORMAT_CURL_OFF_T "lld"
420 +# define CURL_FORMAT_CURL_OFF_TU "llu"
421 +# define CURL_FORMAT_OFF_T "%lld"
422 +# define CURL_SIZEOF_CURL_OFF_T 8
423 +# define CURL_SUFFIX_CURL_OFF_T LL
424 +# define CURL_SUFFIX_CURL_OFF_TU ULL
425 +# elif defined(_LP64)
426 +# define CURL_TYPEOF_CURL_OFF_T long
427 +# define CURL_FORMAT_CURL_OFF_T "ld"
428 +# define CURL_FORMAT_CURL_OFF_TU "lu"
429 +# define CURL_FORMAT_OFF_T "%ld"
430 +# define CURL_SIZEOF_CURL_OFF_T 8
431 +# define CURL_SUFFIX_CURL_OFF_T L
432 +# define CURL_SUFFIX_CURL_OFF_TU UL
433 +# else
434 +# define CURL_TYPEOF_CURL_OFF_T long
435 +# define CURL_FORMAT_CURL_OFF_T "ld"
436 +# define CURL_FORMAT_CURL_OFF_TU "lu"
437 +# define CURL_FORMAT_OFF_T "%ld"
438 +# define CURL_SIZEOF_CURL_OFF_T 4
439 +# define CURL_SUFFIX_CURL_OFF_T L
440 +# define CURL_SUFFIX_CURL_OFF_TU UL
441 +# endif
442 +# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
443 +# define CURL_SIZEOF_CURL_SOCKLEN_T 4
444 +# define CURL_PULL_SYS_TYPES_H 1
445 +# define CURL_PULL_SYS_SOCKET_H 1
446 +# endif
447 +
448 +#elif defined(__370__)
449 +# if defined(__IBMC__) || defined(__IBMCPP__)
450 +# if defined(_ILP32)
451 +# define CURL_SIZEOF_LONG 4
452 +# elif defined(_LP64)
453 +# define CURL_SIZEOF_LONG 8
454 +# endif
455 +# if defined(_LONG_LONG)
456 +# define CURL_TYPEOF_CURL_OFF_T long long
457 +# define CURL_FORMAT_CURL_OFF_T "lld"
458 +# define CURL_FORMAT_CURL_OFF_TU "llu"
459 +# define CURL_FORMAT_OFF_T "%lld"
460 +# define CURL_SIZEOF_CURL_OFF_T 8
461 +# define CURL_SUFFIX_CURL_OFF_T LL
462 +# define CURL_SUFFIX_CURL_OFF_TU ULL
463 +# elif defined(_LP64)
464 +# define CURL_TYPEOF_CURL_OFF_T long
465 +# define CURL_FORMAT_CURL_OFF_T "ld"
466 +# define CURL_FORMAT_CURL_OFF_TU "lu"
467 +# define CURL_FORMAT_OFF_T "%ld"
468 +# define CURL_SIZEOF_CURL_OFF_T 8
469 +# define CURL_SUFFIX_CURL_OFF_T L
470 +# define CURL_SUFFIX_CURL_OFF_TU UL
471 +# else
472 +# define CURL_TYPEOF_CURL_OFF_T long
473 +# define CURL_FORMAT_CURL_OFF_T "ld"
474 +# define CURL_FORMAT_CURL_OFF_TU "lu"
475 +# define CURL_FORMAT_OFF_T "%ld"
476 +# define CURL_SIZEOF_CURL_OFF_T 4
477 +# define CURL_SUFFIX_CURL_OFF_T L
478 +# define CURL_SUFFIX_CURL_OFF_TU UL
479 +# endif
480 +# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
481 +# define CURL_SIZEOF_CURL_SOCKLEN_T 4
482 +# define CURL_PULL_SYS_TYPES_H 1
483 +# define CURL_PULL_SYS_SOCKET_H 1
484 +# endif
485 +
486 +#elif defined(TPF)
487 +# define CURL_SIZEOF_LONG 8
488 +# define CURL_TYPEOF_CURL_OFF_T long
489 +# define CURL_FORMAT_CURL_OFF_T "ld"
490 +# define CURL_FORMAT_CURL_OFF_TU "lu"
491 +# define CURL_FORMAT_OFF_T "%ld"
492 +# define CURL_SIZEOF_CURL_OFF_T 8
493 +# define CURL_SUFFIX_CURL_OFF_T L
494 +# define CURL_SUFFIX_CURL_OFF_TU UL
495 +# define CURL_TYPEOF_CURL_SOCKLEN_T int
496 +# define CURL_SIZEOF_CURL_SOCKLEN_T 4
497 +
498 +/* ===================================== */
499 +/* KEEP MSVC THE PENULTIMATE ENTRY */
500 +/* ===================================== */
501 +
502 +#elif defined(_MSC_VER)
503 +# if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
504 +# define CURL_SIZEOF_LONG 4
505 +# define CURL_TYPEOF_CURL_OFF_T __int64
506 +# define CURL_FORMAT_CURL_OFF_T "I64d"
507 +# define CURL_FORMAT_CURL_OFF_TU "I64u"
508 +# define CURL_FORMAT_OFF_T "%I64d"
509 +# define CURL_SIZEOF_CURL_OFF_T 8
510 +# define CURL_SUFFIX_CURL_OFF_T i64
511 +# define CURL_SUFFIX_CURL_OFF_TU ui64
512 +# else
513 +# define CURL_SIZEOF_LONG 4
514 +# define CURL_TYPEOF_CURL_OFF_T long
515 +# define CURL_FORMAT_CURL_OFF_T "ld"
516 +# define CURL_FORMAT_CURL_OFF_TU "lu"
517 +# define CURL_FORMAT_OFF_T "%ld"
518 +# define CURL_SIZEOF_CURL_OFF_T 4
519 +# define CURL_SUFFIX_CURL_OFF_T L
520 +# define CURL_SUFFIX_CURL_OFF_TU UL
521 +# endif
522 +# define CURL_TYPEOF_CURL_SOCKLEN_T int
523 +# define CURL_SIZEOF_CURL_SOCKLEN_T 4
524 +
525 +/* ===================================== */
526 +/* KEEP GENERIC GCC THE LAST ENTRY */
527 +/* ===================================== */
528 +
529 +#elif defined(__GNUC__)
530 +# if !defined(__LP64__) && (defined(__ILP32__) || \
531 + defined(__i386__) || defined(__ppc__) || defined(__arm__) || \
532 + defined(__sparc__) || defined(__mips__) || defined(__sh__))
533 +# define CURL_SIZEOF_LONG 4
534 +# define CURL_TYPEOF_CURL_OFF_T long long
535 +# define CURL_FORMAT_CURL_OFF_T "lld"
536 +# define CURL_FORMAT_CURL_OFF_TU "llu"
537 +# define CURL_FORMAT_OFF_T "%lld"
538 +# define CURL_SIZEOF_CURL_OFF_T 8
539 +# define CURL_SUFFIX_CURL_OFF_T LL
540 +# define CURL_SUFFIX_CURL_OFF_TU ULL
541 +# elif defined(__LP64__) || \
542 + defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__)
543 +# define CURL_SIZEOF_LONG 8
544 +# define CURL_TYPEOF_CURL_OFF_T long
545 +# define CURL_FORMAT_CURL_OFF_T "ld"
546 +# define CURL_FORMAT_CURL_OFF_TU "lu"
547 +# define CURL_FORMAT_OFF_T "%ld"
548 +# define CURL_SIZEOF_CURL_OFF_T 8
549 +# define CURL_SUFFIX_CURL_OFF_T L
550 +# define CURL_SUFFIX_CURL_OFF_TU UL
551 +# endif
552 +# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
553 +# define CURL_SIZEOF_CURL_SOCKLEN_T 4
554 +# define CURL_PULL_SYS_TYPES_H 1
555 +# define CURL_PULL_SYS_SOCKET_H 1
556 +
557 +#else
558 +# error "Unknown non-configure build target!"
559 + Error Compilation_aborted_Unknown_non_configure_build_target
560 +#endif
561 +
562 +/* CURL_PULL_SYS_TYPES_H is defined above when inclusion of header file */
563 +/* sys/types.h is required here to properly make type definitions below. */
564 +#ifdef CURL_PULL_SYS_TYPES_H
565 +# include <sys/types.h>
566 +#endif
567 +
568 +/* CURL_PULL_SYS_SOCKET_H is defined above when inclusion of header file */
569 +/* sys/socket.h is required here to properly make type definitions below. */
570 +#ifdef CURL_PULL_SYS_SOCKET_H
571 +# include <sys/socket.h>
572 +#endif
573 +
574 +/* Data type definition of curl_socklen_t. */
575 +
576 +#ifdef CURL_TYPEOF_CURL_SOCKLEN_T
577 + typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;
578 +#endif
579 +
580 +/* Data type definition of curl_off_t. */
581 +
582 +#ifdef CURL_TYPEOF_CURL_OFF_T
583 + typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;
584 +#endif
585 +
586 +#endif /* __CURL_CURLBUILD_H */
1 +#ifndef __CURL_CURLBUILD_H
2 +#define __CURL_CURLBUILD_H
3 +/***************************************************************************
4 + * _ _ ____ _
5 + * Project ___| | | | _ \| |
6 + * / __| | | | |_) | |
7 + * | (__| |_| | _ <| |___
8 + * \___|\___/|_| \_\_____|
9 + *
10 + * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
11 + *
12 + * This software is licensed as described in the file COPYING, which
13 + * you should have received as part of this distribution. The terms
14 + * are also available at https://curl.haxx.se/docs/copyright.html.
15 + *
16 + * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 + * copies of the Software, and permit persons to whom the Software is
18 + * furnished to do so, under the terms of the COPYING file.
19 + *
20 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 + * KIND, either express or implied.
22 + *
23 + ***************************************************************************/
24 +
25 +/* ================================================================ */
26 +/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */
27 +/* ================================================================ */
28 +
29 +/*
30 + * NOTE 1:
31 + * -------
32 + *
33 + * Nothing in this file is intended to be modified or adjusted by the
34 + * curl library user nor by the curl library builder.
35 + *
36 + * If you think that something actually needs to be changed, adjusted
37 + * or fixed in this file, then, report it on the libcurl development
38 + * mailing list: https://cool.haxx.se/mailman/listinfo/curl-library/
39 + *
40 + * This header file shall only export symbols which are 'curl' or 'CURL'
41 + * prefixed, otherwise public name space would be polluted.
42 + *
43 + * NOTE 2:
44 + * -------
45 + *
46 + * Right now you might be staring at file include/curl/curlbuild.h.in or
47 + * at file include/curl/curlbuild.h, this is due to the following reason:
48 + *
49 + * On systems capable of running the configure script, the configure process
50 + * will overwrite the distributed include/curl/curlbuild.h file with one that
51 + * is suitable and specific to the library being configured and built, which
52 + * is generated from the include/curl/curlbuild.h.in template file.
53 + *
54 + */
55 +
56 +/* ================================================================ */
57 +/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */
58 +/* ================================================================ */
59 +
60 +#ifdef CURL_SIZEOF_LONG
61 +#error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h"
62 + Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined
63 +#endif
64 +
65 +#ifdef CURL_TYPEOF_CURL_SOCKLEN_T
66 +#error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
67 + Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined
68 +#endif
69 +
70 +#ifdef CURL_SIZEOF_CURL_SOCKLEN_T
71 +#error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
72 + Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined
73 +#endif
74 +
75 +#ifdef CURL_TYPEOF_CURL_OFF_T
76 +#error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
77 + Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined
78 +#endif
79 +
80 +#ifdef CURL_FORMAT_CURL_OFF_T
81 +#error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h"
82 + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined
83 +#endif
84 +
85 +#ifdef CURL_FORMAT_CURL_OFF_TU
86 +#error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h"
87 + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined
88 +#endif
89 +
90 +#ifdef CURL_FORMAT_OFF_T
91 +#error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h"
92 + Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined
93 +#endif
94 +
95 +#ifdef CURL_SIZEOF_CURL_OFF_T
96 +#error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
97 + Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined
98 +#endif
99 +
100 +#ifdef CURL_SUFFIX_CURL_OFF_T
101 +#error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h"
102 + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined
103 +#endif
104 +
105 +#ifdef CURL_SUFFIX_CURL_OFF_TU
106 +#error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h"
107 + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined
108 +#endif
109 +
110 +/* ================================================================ */
111 +/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */
112 +/* ================================================================ */
113 +
114 +/* Configure process defines this to 1 when it finds out that system */
115 +/* header file ws2tcpip.h must be included by the external interface. */
116 +#cmakedefine CURL_PULL_WS2TCPIP_H
117 +#ifdef CURL_PULL_WS2TCPIP_H
118 +# ifndef WIN32_LEAN_AND_MEAN
119 +# define WIN32_LEAN_AND_MEAN
120 +# endif
121 +# include <windows.h>
122 +# include <winsock2.h>
123 +# include <ws2tcpip.h>
124 +#endif
125 +
126 +/* Configure process defines this to 1 when it finds out that system */
127 +/* header file sys/types.h must be included by the external interface. */
128 +#cmakedefine CURL_PULL_SYS_TYPES_H
129 +#ifdef CURL_PULL_SYS_TYPES_H
130 +# include <sys/types.h>
131 +#endif
132 +
133 +/* Configure process defines this to 1 when it finds out that system */
134 +/* header file stdint.h must be included by the external interface. */
135 +#cmakedefine CURL_PULL_STDINT_H
136 +#ifdef CURL_PULL_STDINT_H
137 +# include <stdint.h>
138 +#endif
139 +
140 +/* Configure process defines this to 1 when it finds out that system */
141 +/* header file inttypes.h must be included by the external interface. */
142 +#cmakedefine CURL_PULL_INTTYPES_H
143 +#ifdef CURL_PULL_INTTYPES_H
144 +# include <inttypes.h>
145 +#endif
146 +
147 +/* Configure process defines this to 1 when it finds out that system */
148 +/* header file sys/socket.h must be included by the external interface. */
149 +#cmakedefine CURL_PULL_SYS_SOCKET_H
150 +#ifdef CURL_PULL_SYS_SOCKET_H
151 +# include <sys/socket.h>
152 +#endif
153 +
154 +/* Configure process defines this to 1 when it finds out that system */
155 +/* header file sys/poll.h must be included by the external interface. */
156 +#cmakedefine CURL_PULL_SYS_POLL_H
157 +#ifdef CURL_PULL_SYS_POLL_H
158 +# include <sys/poll.h>
159 +#endif
160 +
161 +/* The size of `long', as computed by sizeof. */
162 +#define CURL_SIZEOF_LONG ${CURL_SIZEOF_LONG}
163 +
164 +/* Integral data type used for curl_socklen_t. */
165 +#define CURL_TYPEOF_CURL_SOCKLEN_T ${CURL_TYPEOF_CURL_SOCKLEN_T}
166 +
167 +/* The size of `curl_socklen_t', as computed by sizeof. */
168 +#define CURL_SIZEOF_CURL_SOCKLEN_T ${CURL_SIZEOF_CURL_SOCKLEN_T}
169 +
170 +/* Data type definition of curl_socklen_t. */
171 +typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;
172 +
173 +/* Signed integral data type used for curl_off_t. */
174 +#define CURL_TYPEOF_CURL_OFF_T ${CURL_TYPEOF_CURL_OFF_T}
175 +
176 +/* Data type definition of curl_off_t. */
177 +typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;
178 +
179 +/* curl_off_t formatting string directive without "%" conversion specifier. */
180 +#define CURL_FORMAT_CURL_OFF_T "${CURL_FORMAT_CURL_OFF_T}"
181 +
182 +/* unsigned curl_off_t formatting string without "%" conversion specifier. */
183 +#define CURL_FORMAT_CURL_OFF_TU "${CURL_FORMAT_CURL_OFF_TU}"
184 +
185 +/* curl_off_t formatting string directive with "%" conversion specifier. */
186 +#define CURL_FORMAT_OFF_T "${CURL_FORMAT_OFF_T}"
187 +
188 +/* The size of `curl_off_t', as computed by sizeof. */
189 +#define CURL_SIZEOF_CURL_OFF_T ${CURL_SIZEOF_CURL_OFF_T}
190 +
191 +/* curl_off_t constant suffix. */
192 +#define CURL_SUFFIX_CURL_OFF_T ${CURL_SUFFIX_CURL_OFF_T}
193 +
194 +/* unsigned curl_off_t constant suffix. */
195 +#define CURL_SUFFIX_CURL_OFF_TU ${CURL_SUFFIX_CURL_OFF_TU}
196 +
197 +#endif /* __CURL_CURLBUILD_H */
1 +#ifndef __CURL_CURLBUILD_H
2 +#define __CURL_CURLBUILD_H
3 +/***************************************************************************
4 + * _ _ ____ _
5 + * Project ___| | | | _ \| |
6 + * / __| | | | |_) | |
7 + * | (__| |_| | _ <| |___
8 + * \___|\___/|_| \_\_____|
9 + *
10 + * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
11 + *
12 + * This software is licensed as described in the file COPYING, which
13 + * you should have received as part of this distribution. The terms
14 + * are also available at https://curl.haxx.se/docs/copyright.html.
15 + *
16 + * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 + * copies of the Software, and permit persons to whom the Software is
18 + * furnished to do so, under the terms of the COPYING file.
19 + *
20 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 + * KIND, either express or implied.
22 + *
23 + ***************************************************************************/
24 +
25 +/* ================================================================ */
26 +/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */
27 +/* ================================================================ */
28 +
29 +/*
30 + * NOTE 1:
31 + * -------
32 + *
33 + * Nothing in this file is intended to be modified or adjusted by the
34 + * curl library user nor by the curl library builder.
35 + *
36 + * If you think that something actually needs to be changed, adjusted
37 + * or fixed in this file, then, report it on the libcurl development
38 + * mailing list: https://cool.haxx.se/mailman/listinfo/curl-library/
39 + *
40 + * This header file shall only export symbols which are 'curl' or 'CURL'
41 + * prefixed, otherwise public name space would be polluted.
42 + *
43 + * NOTE 2:
44 + * -------
45 + *
46 + * Right now you might be staring at file include/curl/curlbuild.h.in or
47 + * at file include/curl/curlbuild.h, this is due to the following reason:
48 + *
49 + * On systems capable of running the configure script, the configure process
50 + * will overwrite the distributed include/curl/curlbuild.h file with one that
51 + * is suitable and specific to the library being configured and built, which
52 + * is generated from the include/curl/curlbuild.h.in template file.
53 + *
54 + */
55 +
56 +/* ================================================================ */
57 +/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */
58 +/* ================================================================ */
59 +
60 +#ifdef CURL_SIZEOF_LONG
61 +#error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h"
62 + Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined
63 +#endif
64 +
65 +#ifdef CURL_TYPEOF_CURL_SOCKLEN_T
66 +#error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
67 + Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined
68 +#endif
69 +
70 +#ifdef CURL_SIZEOF_CURL_SOCKLEN_T
71 +#error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
72 + Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined
73 +#endif
74 +
75 +#ifdef CURL_TYPEOF_CURL_OFF_T
76 +#error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
77 + Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined
78 +#endif
79 +
80 +#ifdef CURL_FORMAT_CURL_OFF_T
81 +#error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h"
82 + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined
83 +#endif
84 +
85 +#ifdef CURL_FORMAT_CURL_OFF_TU
86 +#error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h"
87 + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined
88 +#endif
89 +
90 +#ifdef CURL_FORMAT_OFF_T
91 +#error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h"
92 + Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined
93 +#endif
94 +
95 +#ifdef CURL_SIZEOF_CURL_OFF_T
96 +#error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
97 + Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined
98 +#endif
99 +
100 +#ifdef CURL_SUFFIX_CURL_OFF_T
101 +#error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h"
102 + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined
103 +#endif
104 +
105 +#ifdef CURL_SUFFIX_CURL_OFF_TU
106 +#error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h"
107 + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined
108 +#endif
109 +
110 +/* ================================================================ */
111 +/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */
112 +/* ================================================================ */
113 +
114 +/* Configure process defines this to 1 when it finds out that system */
115 +/* header file ws2tcpip.h must be included by the external interface. */
116 +#undef CURL_PULL_WS2TCPIP_H
117 +#ifdef CURL_PULL_WS2TCPIP_H
118 +# ifndef WIN32_LEAN_AND_MEAN
119 +# define WIN32_LEAN_AND_MEAN
120 +# endif
121 +# include <windows.h>
122 +# include <winsock2.h>
123 +# include <ws2tcpip.h>
124 +#endif
125 +
126 +/* Configure process defines this to 1 when it finds out that system */
127 +/* header file sys/types.h must be included by the external interface. */
128 +#undef CURL_PULL_SYS_TYPES_H
129 +#ifdef CURL_PULL_SYS_TYPES_H
130 +# include <sys/types.h>
131 +#endif
132 +
133 +/* Configure process defines this to 1 when it finds out that system */
134 +/* header file stdint.h must be included by the external interface. */
135 +#undef CURL_PULL_STDINT_H
136 +#ifdef CURL_PULL_STDINT_H
137 +# include <stdint.h>
138 +#endif
139 +
140 +/* Configure process defines this to 1 when it finds out that system */
141 +/* header file inttypes.h must be included by the external interface. */
142 +#undef CURL_PULL_INTTYPES_H
143 +#ifdef CURL_PULL_INTTYPES_H
144 +# include <inttypes.h>
145 +#endif
146 +
147 +/* Configure process defines this to 1 when it finds out that system */
148 +/* header file sys/socket.h must be included by the external interface. */
149 +#undef CURL_PULL_SYS_SOCKET_H
150 +#ifdef CURL_PULL_SYS_SOCKET_H
151 +# include <sys/socket.h>
152 +#endif
153 +
154 +/* Configure process defines this to 1 when it finds out that system */
155 +/* header file sys/poll.h must be included by the external interface. */
156 +#undef CURL_PULL_SYS_POLL_H
157 +#ifdef CURL_PULL_SYS_POLL_H
158 +# include <sys/poll.h>
159 +#endif
160 +
161 +/* The size of `long', as computed by sizeof. */
162 +#undef CURL_SIZEOF_LONG
163 +
164 +/* Integral data type used for curl_socklen_t. */
165 +#undef CURL_TYPEOF_CURL_SOCKLEN_T
166 +
167 +/* The size of `curl_socklen_t', as computed by sizeof. */
168 +#undef CURL_SIZEOF_CURL_SOCKLEN_T
169 +
170 +/* Data type definition of curl_socklen_t. */
171 +typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;
172 +
173 +/* Signed integral data type used for curl_off_t. */
174 +#undef CURL_TYPEOF_CURL_OFF_T
175 +
176 +/* Data type definition of curl_off_t. */
177 +typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;
178 +
179 +/* curl_off_t formatting string directive without "%" conversion specifier. */
180 +#undef CURL_FORMAT_CURL_OFF_T
181 +
182 +/* unsigned curl_off_t formatting string without "%" conversion specifier. */
183 +#undef CURL_FORMAT_CURL_OFF_TU
184 +
185 +/* curl_off_t formatting string directive with "%" conversion specifier. */
186 +#undef CURL_FORMAT_OFF_T
187 +
188 +/* The size of `curl_off_t', as computed by sizeof. */
189 +#undef CURL_SIZEOF_CURL_OFF_T
190 +
191 +/* curl_off_t constant suffix. */
192 +#undef CURL_SUFFIX_CURL_OFF_T
193 +
194 +/* unsigned curl_off_t constant suffix. */
195 +#undef CURL_SUFFIX_CURL_OFF_TU
196 +
197 +#endif /* __CURL_CURLBUILD_H */
1 +#ifndef __CURL_CURLRULES_H
2 +#define __CURL_CURLRULES_H
3 +/***************************************************************************
4 + * _ _ ____ _
5 + * Project ___| | | | _ \| |
6 + * / __| | | | |_) | |
7 + * | (__| |_| | _ <| |___
8 + * \___|\___/|_| \_\_____|
9 + *
10 + * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
11 + *
12 + * This software is licensed as described in the file COPYING, which
13 + * you should have received as part of this distribution. The terms
14 + * are also available at https://curl.haxx.se/docs/copyright.html.
15 + *
16 + * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 + * copies of the Software, and permit persons to whom the Software is
18 + * furnished to do so, under the terms of the COPYING file.
19 + *
20 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 + * KIND, either express or implied.
22 + *
23 + ***************************************************************************/
24 +
25 +/* ================================================================ */
26 +/* COMPILE TIME SANITY CHECKS */
27 +/* ================================================================ */
28 +
29 +/*
30 + * NOTE 1:
31 + * -------
32 + *
33 + * All checks done in this file are intentionally placed in a public
34 + * header file which is pulled by curl/curl.h when an application is
35 + * being built using an already built libcurl library. Additionally
36 + * this file is also included and used when building the library.
37 + *
38 + * If compilation fails on this file it is certainly sure that the
39 + * problem is elsewhere. It could be a problem in the curlbuild.h
40 + * header file, or simply that you are using different compilation
41 + * settings than those used to build the library.
42 + *
43 + * Nothing in this file is intended to be modified or adjusted by the
44 + * curl library user nor by the curl library builder.
45 + *
46 + * Do not deactivate any check, these are done to make sure that the
47 + * library is properly built and used.
48 + *
49 + * You can find further help on the libcurl development mailing list:
50 + * https://cool.haxx.se/mailman/listinfo/curl-library/
51 + *
52 + * NOTE 2
53 + * ------
54 + *
55 + * Some of the following compile time checks are based on the fact
56 + * that the dimension of a constant array can not be a negative one.
57 + * In this way if the compile time verification fails, the compilation
58 + * will fail issuing an error. The error description wording is compiler
59 + * dependent but it will be quite similar to one of the following:
60 + *
61 + * "negative subscript or subscript is too large"
62 + * "array must have at least one element"
63 + * "-1 is an illegal array size"
64 + * "size of array is negative"
65 + *
66 + * If you are building an application which tries to use an already
67 + * built libcurl library and you are getting this kind of errors on
68 + * this file, it is a clear indication that there is a mismatch between
69 + * how the library was built and how you are trying to use it for your
70 + * application. Your already compiled or binary library provider is the
71 + * only one who can give you the details you need to properly use it.
72 + */
73 +
74 +/*
75 + * Verify that some macros are actually defined.
76 + */
77 +
78 +#ifndef CURL_SIZEOF_LONG
79 +# error "CURL_SIZEOF_LONG definition is missing!"
80 + Error Compilation_aborted_CURL_SIZEOF_LONG_is_missing
81 +#endif
82 +
83 +#ifndef CURL_TYPEOF_CURL_SOCKLEN_T
84 +# error "CURL_TYPEOF_CURL_SOCKLEN_T definition is missing!"
85 + Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_is_missing
86 +#endif
87 +
88 +#ifndef CURL_SIZEOF_CURL_SOCKLEN_T
89 +# error "CURL_SIZEOF_CURL_SOCKLEN_T definition is missing!"
90 + Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_is_missing
91 +#endif
92 +
93 +#ifndef CURL_TYPEOF_CURL_OFF_T
94 +# error "CURL_TYPEOF_CURL_OFF_T definition is missing!"
95 + Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_is_missing
96 +#endif
97 +
98 +#ifndef CURL_FORMAT_CURL_OFF_T
99 +# error "CURL_FORMAT_CURL_OFF_T definition is missing!"
100 + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_is_missing
101 +#endif
102 +
103 +#ifndef CURL_FORMAT_CURL_OFF_TU
104 +# error "CURL_FORMAT_CURL_OFF_TU definition is missing!"
105 + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_is_missing
106 +#endif
107 +
108 +#ifndef CURL_SIZEOF_CURL_OFF_T
109 +# error "CURL_SIZEOF_CURL_OFF_T definition is missing!"
110 + Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_is_missing
111 +#endif
112 +
113 +#ifndef CURL_SUFFIX_CURL_OFF_T
114 +# error "CURL_SUFFIX_CURL_OFF_T definition is missing!"
115 + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_is_missing
116 +#endif
117 +
118 +#ifndef CURL_SUFFIX_CURL_OFF_TU
119 +# error "CURL_SUFFIX_CURL_OFF_TU definition is missing!"
120 + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_is_missing
121 +#endif
122 +
123 +/*
124 + * Macros private to this header file.
125 + */
126 +
127 +#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1
128 +
129 +#define CurlchkszGE(t1, t2) sizeof(t1) >= sizeof(t2) ? 1 : -1
130 +
131 +/*
132 + * Verify that the size previously defined and expected for long
133 + * is the same as the one reported by sizeof() at compile time.
134 + */
135 +
136 +typedef char
137 + __curl_rule_01__
138 + [CurlchkszEQ(long, CURL_SIZEOF_LONG)];
139 +
140 +/*
141 + * Verify that the size previously defined and expected for
142 + * curl_off_t is actually the the same as the one reported
143 + * by sizeof() at compile time.
144 + */
145 +
146 +typedef char
147 + __curl_rule_02__
148 + [CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)];
149 +
150 +/*
151 + * Verify at compile time that the size of curl_off_t as reported
152 + * by sizeof() is greater or equal than the one reported for long
153 + * for the current compilation.
154 + */
155 +
156 +typedef char
157 + __curl_rule_03__
158 + [CurlchkszGE(curl_off_t, long)];
159 +
160 +/*
161 + * Verify that the size previously defined and expected for
162 + * curl_socklen_t is actually the the same as the one reported
163 + * by sizeof() at compile time.
164 + */
165 +
166 +typedef char
167 + __curl_rule_04__
168 + [CurlchkszEQ(curl_socklen_t, CURL_SIZEOF_CURL_SOCKLEN_T)];
169 +
170 +/*
171 + * Verify at compile time that the size of curl_socklen_t as reported
172 + * by sizeof() is greater or equal than the one reported for int for
173 + * the current compilation.
174 + */
175 +
176 +typedef char
177 + __curl_rule_05__
178 + [CurlchkszGE(curl_socklen_t, int)];
179 +
180 +/* ================================================================ */
181 +/* EXTERNALLY AND INTERNALLY VISIBLE DEFINITIONS */
182 +/* ================================================================ */
183 +
184 +/*
185 + * CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow
186 + * these to be visible and exported by the external libcurl interface API,
187 + * while also making them visible to the library internals, simply including
188 + * curl_setup.h, without actually needing to include curl.h internally.
189 + * If some day this section would grow big enough, all this should be moved
190 + * to its own header file.
191 + */
192 +
193 +/*
194 + * Figure out if we can use the ## preprocessor operator, which is supported
195 + * by ISO/ANSI C and C++. Some compilers support it without setting __STDC__
196 + * or __cplusplus so we need to carefully check for them too.
197 + */
198 +
199 +#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \
200 + defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \
201 + defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \
202 + defined(__ILEC400__)
203 + /* This compiler is believed to have an ISO compatible preprocessor */
204 +#define CURL_ISOCPP
205 +#else
206 + /* This compiler is believed NOT to have an ISO compatible preprocessor */
207 +#undef CURL_ISOCPP
208 +#endif
209 +
210 +/*
211 + * Macros for minimum-width signed and unsigned curl_off_t integer constants.
212 + */
213 +
214 +#if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551)
215 +# define __CURL_OFF_T_C_HLPR2(x) x
216 +# define __CURL_OFF_T_C_HLPR1(x) __CURL_OFF_T_C_HLPR2(x)
217 +# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \
218 + __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T)
219 +# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \
220 + __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU)
221 +#else
222 +# ifdef CURL_ISOCPP
223 +# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix
224 +# else
225 +# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix
226 +# endif
227 +# define __CURL_OFF_T_C_HLPR1(Val,Suffix) __CURL_OFF_T_C_HLPR2(Val,Suffix)
228 +# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T)
229 +# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU)
230 +#endif
231 +
232 +/*
233 + * Get rid of macros private to this header file.
234 + */
235 +
236 +#undef CurlchkszEQ
237 +#undef CurlchkszGE
238 +
239 +#endif /* __CURL_CURLRULES_H */
1 +#ifndef __CURL_CURLVER_H
2 +#define __CURL_CURLVER_H
3 +/***************************************************************************
4 + * _ _ ____ _
5 + * Project ___| | | | _ \| |
6 + * / __| | | | |_) | |
7 + * | (__| |_| | _ <| |___
8 + * \___|\___/|_| \_\_____|
9 + *
10 + * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
11 + *
12 + * This software is licensed as described in the file COPYING, which
13 + * you should have received as part of this distribution. The terms
14 + * are also available at https://curl.haxx.se/docs/copyright.html.
15 + *
16 + * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 + * copies of the Software, and permit persons to whom the Software is
18 + * furnished to do so, under the terms of the COPYING file.
19 + *
20 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 + * KIND, either express or implied.
22 + *
23 + ***************************************************************************/
24 +
25 +/* This header file contains nothing but libcurl version info, generated by
26 + a script at release-time. This was made its own header file in 7.11.2 */
27 +
28 +/* This is the global package copyright */
29 +#define LIBCURL_COPYRIGHT "1996 - 2017 Daniel Stenberg, <daniel@haxx.se>."
30 +
31 +/* This is the version number of the libcurl package from which this header
32 + file origins: */
33 +#define LIBCURL_VERSION "7.54.1"
34 +
35 +/* The numeric version number is also available "in parts" by using these
36 + defines: */
37 +#define LIBCURL_VERSION_MAJOR 7
38 +#define LIBCURL_VERSION_MINOR 54
39 +#define LIBCURL_VERSION_PATCH 1
40 +
41 +/* This is the numeric version of the libcurl version number, meant for easier
42 + parsing and comparions by programs. The LIBCURL_VERSION_NUM define will
43 + always follow this syntax:
44 +
45 + 0xXXYYZZ
46 +
47 + Where XX, YY and ZZ are the main version, release and patch numbers in
48 + hexadecimal (using 8 bits each). All three numbers are always represented
49 + using two digits. 1.2 would appear as "0x010200" while version 9.11.7
50 + appears as "0x090b07".
51 +
52 + This 6-digit (24 bits) hexadecimal number does not show pre-release number,
53 + and it is always a greater number in a more recent release. It makes
54 + comparisons with greater than and less than work.
55 +
56 + Note: This define is the full hex number and _does not_ use the
57 + CURL_VERSION_BITS() macro since curl's own configure script greps for it
58 + and needs it to contain the full number.
59 +*/
60 +#define LIBCURL_VERSION_NUM 0x073601
61 +
62 +/*
63 + * This is the date and time when the full source package was created. The
64 + * timestamp is not stored in git, as the timestamp is properly set in the
65 + * tarballs by the maketgz script.
66 + *
67 + * The format of the date follows this template:
68 + *
69 + * "2007-11-23"
70 + */
71 +#define LIBCURL_TIMESTAMP "2017-06-14"
72 +
73 +#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|z)
74 +#define CURL_AT_LEAST_VERSION(x,y,z) \
75 + (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z))
76 +
77 +#endif /* __CURL_CURLVER_H */
1 +#ifndef __CURL_EASY_H
2 +#define __CURL_EASY_H
3 +/***************************************************************************
4 + * _ _ ____ _
5 + * Project ___| | | | _ \| |
6 + * / __| | | | |_) | |
7 + * | (__| |_| | _ <| |___
8 + * \___|\___/|_| \_\_____|
9 + *
10 + * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
11 + *
12 + * This software is licensed as described in the file COPYING, which
13 + * you should have received as part of this distribution. The terms
14 + * are also available at https://curl.haxx.se/docs/copyright.html.
15 + *
16 + * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 + * copies of the Software, and permit persons to whom the Software is
18 + * furnished to do so, under the terms of the COPYING file.
19 + *
20 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 + * KIND, either express or implied.
22 + *
23 + ***************************************************************************/
24 +#ifdef __cplusplus
25 +extern "C" {
26 +#endif
27 +
28 +CURL_EXTERN CURL *curl_easy_init(void);
29 +CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...);
30 +CURL_EXTERN CURLcode curl_easy_perform(CURL *curl);
31 +CURL_EXTERN void curl_easy_cleanup(CURL *curl);
32 +
33 +/*
34 + * NAME curl_easy_getinfo()
35 + *
36 + * DESCRIPTION
37 + *
38 + * Request internal information from the curl session with this function. The
39 + * third argument MUST be a pointer to a long, a pointer to a char * or a
40 + * pointer to a double (as the documentation describes elsewhere). The data
41 + * pointed to will be filled in accordingly and can be relied upon only if the
42 + * function returns CURLE_OK. This function is intended to get used *AFTER* a
43 + * performed transfer, all results from this function are undefined until the
44 + * transfer is completed.
45 + */
46 +CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);
47 +
48 +
49 +/*
50 + * NAME curl_easy_duphandle()
51 + *
52 + * DESCRIPTION
53 + *
54 + * Creates a new curl session handle with the same options set for the handle
55 + * passed in. Duplicating a handle could only be a matter of cloning data and
56 + * options, internal state info and things like persistent connections cannot
57 + * be transferred. It is useful in multithreaded applications when you can run
58 + * curl_easy_duphandle() for each new thread to avoid a series of identical
59 + * curl_easy_setopt() invokes in every thread.
60 + */
61 +CURL_EXTERN CURL *curl_easy_duphandle(CURL *curl);
62 +
63 +/*
64 + * NAME curl_easy_reset()
65 + *
66 + * DESCRIPTION
67 + *
68 + * Re-initializes a CURL handle to the default values. This puts back the
69 + * handle to the same state as it was in when it was just created.
70 + *
71 + * It does keep: live connections, the Session ID cache, the DNS cache and the
72 + * cookies.
73 + */
74 +CURL_EXTERN void curl_easy_reset(CURL *curl);
75 +
76 +/*
77 + * NAME curl_easy_recv()
78 + *
79 + * DESCRIPTION
80 + *
81 + * Receives data from the connected socket. Use after successful
82 + * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
83 + */
84 +CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen,
85 + size_t *n);
86 +
87 +/*
88 + * NAME curl_easy_send()
89 + *
90 + * DESCRIPTION
91 + *
92 + * Sends data over the connected socket. Use after successful
93 + * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
94 + */
95 +CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer,
96 + size_t buflen, size_t *n);
97 +
98 +#ifdef __cplusplus
99 +}
100 +#endif
101 +
102 +#endif
1 +#ifndef __CURL_MPRINTF_H
2 +#define __CURL_MPRINTF_H
3 +/***************************************************************************
4 + * _ _ ____ _
5 + * Project ___| | | | _ \| |
6 + * / __| | | | |_) | |
7 + * | (__| |_| | _ <| |___
8 + * \___|\___/|_| \_\_____|
9 + *
10 + * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
11 + *
12 + * This software is licensed as described in the file COPYING, which
13 + * you should have received as part of this distribution. The terms
14 + * are also available at https://curl.haxx.se/docs/copyright.html.
15 + *
16 + * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 + * copies of the Software, and permit persons to whom the Software is
18 + * furnished to do so, under the terms of the COPYING file.
19 + *
20 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 + * KIND, either express or implied.
22 + *
23 + ***************************************************************************/
24 +
25 +#include <stdarg.h>
26 +#include <stdio.h> /* needed for FILE */
27 +#include "curl.h" /* for CURL_EXTERN */
28 +
29 +#ifdef __cplusplus
30 +extern "C" {
31 +#endif
32 +
33 +CURL_EXTERN int curl_mprintf(const char *format, ...);
34 +CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...);
35 +CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...);
36 +CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength,
37 + const char *format, ...);
38 +CURL_EXTERN int curl_mvprintf(const char *format, va_list args);
39 +CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args);
40 +CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args);
41 +CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength,
42 + const char *format, va_list args);
43 +CURL_EXTERN char *curl_maprintf(const char *format, ...);
44 +CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args);
45 +
46 +#ifdef __cplusplus
47 +}
48 +#endif
49 +
50 +#endif /* __CURL_MPRINTF_H */
1 +#ifndef __CURL_MULTI_H
2 +#define __CURL_MULTI_H
3 +/***************************************************************************
4 + * _ _ ____ _
5 + * Project ___| | | | _ \| |
6 + * / __| | | | |_) | |
7 + * | (__| |_| | _ <| |___
8 + * \___|\___/|_| \_\_____|
9 + *
10 + * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
11 + *
12 + * This software is licensed as described in the file COPYING, which
13 + * you should have received as part of this distribution. The terms
14 + * are also available at https://curl.haxx.se/docs/copyright.html.
15 + *
16 + * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 + * copies of the Software, and permit persons to whom the Software is
18 + * furnished to do so, under the terms of the COPYING file.
19 + *
20 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 + * KIND, either express or implied.
22 + *
23 + ***************************************************************************/
24 +/*
25 + This is an "external" header file. Don't give away any internals here!
26 +
27 + GOALS
28 +
29 + o Enable a "pull" interface. The application that uses libcurl decides where
30 + and when to ask libcurl to get/send data.
31 +
32 + o Enable multiple simultaneous transfers in the same thread without making it
33 + complicated for the application.
34 +
35 + o Enable the application to select() on its own file descriptors and curl's
36 + file descriptors simultaneous easily.
37 +
38 +*/
39 +
40 +/*
41 + * This header file should not really need to include "curl.h" since curl.h
42 + * itself includes this file and we expect user applications to do #include
43 + * <curl/curl.h> without the need for especially including multi.h.
44 + *
45 + * For some reason we added this include here at one point, and rather than to
46 + * break existing (wrongly written) libcurl applications, we leave it as-is
47 + * but with this warning attached.
48 + */
49 +#include "curl.h"
50 +
51 +#ifdef __cplusplus
52 +extern "C" {
53 +#endif
54 +
55 +#if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER)
56 +typedef struct Curl_multi CURLM;
57 +#else
58 +typedef void CURLM;
59 +#endif
60 +
61 +typedef enum {
62 + CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or
63 + curl_multi_socket*() soon */
64 + CURLM_OK,
65 + CURLM_BAD_HANDLE, /* the passed-in handle is not a valid CURLM handle */
66 + CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */
67 + CURLM_OUT_OF_MEMORY, /* if you ever get this, you're in deep sh*t */
68 + CURLM_INTERNAL_ERROR, /* this is a libcurl bug */
69 + CURLM_BAD_SOCKET, /* the passed in socket argument did not match */
70 + CURLM_UNKNOWN_OPTION, /* curl_multi_setopt() with unsupported option */
71 + CURLM_ADDED_ALREADY, /* an easy handle already added to a multi handle was
72 + attempted to get added - again */
73 + CURLM_LAST
74 +} CURLMcode;
75 +
76 +/* just to make code nicer when using curl_multi_socket() you can now check
77 + for CURLM_CALL_MULTI_SOCKET too in the same style it works for
78 + curl_multi_perform() and CURLM_CALL_MULTI_PERFORM */
79 +#define CURLM_CALL_MULTI_SOCKET CURLM_CALL_MULTI_PERFORM
80 +
81 +/* bitmask bits for CURLMOPT_PIPELINING */
82 +#define CURLPIPE_NOTHING 0L
83 +#define CURLPIPE_HTTP1 1L
84 +#define CURLPIPE_MULTIPLEX 2L
85 +
86 +typedef enum {
87 + CURLMSG_NONE, /* first, not used */
88 + CURLMSG_DONE, /* This easy handle has completed. 'result' contains
89 + the CURLcode of the transfer */
90 + CURLMSG_LAST /* last, not used */
91 +} CURLMSG;
92 +
93 +struct CURLMsg {
94 + CURLMSG msg; /* what this message means */
95 + CURL *easy_handle; /* the handle it concerns */
96 + union {
97 + void *whatever; /* message-specific data */
98 + CURLcode result; /* return code for transfer */
99 + } data;
100 +};
101 +typedef struct CURLMsg CURLMsg;
102 +
103 +/* Based on poll(2) structure and values.
104 + * We don't use pollfd and POLL* constants explicitly
105 + * to cover platforms without poll(). */
106 +#define CURL_WAIT_POLLIN 0x0001
107 +#define CURL_WAIT_POLLPRI 0x0002
108 +#define CURL_WAIT_POLLOUT 0x0004
109 +
110 +struct curl_waitfd {
111 + curl_socket_t fd;
112 + short events;
113 + short revents; /* not supported yet */
114 +};
115 +
116 +/*
117 + * Name: curl_multi_init()
118 + *
119 + * Desc: inititalize multi-style curl usage
120 + *
121 + * Returns: a new CURLM handle to use in all 'curl_multi' functions.
122 + */
123 +CURL_EXTERN CURLM *curl_multi_init(void);
124 +
125 +/*
126 + * Name: curl_multi_add_handle()
127 + *
128 + * Desc: add a standard curl handle to the multi stack
129 + *
130 + * Returns: CURLMcode type, general multi error code.
131 + */
132 +CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle,
133 + CURL *curl_handle);
134 +
135 + /*
136 + * Name: curl_multi_remove_handle()
137 + *
138 + * Desc: removes a curl handle from the multi stack again
139 + *
140 + * Returns: CURLMcode type, general multi error code.
141 + */
142 +CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
143 + CURL *curl_handle);
144 +
145 + /*
146 + * Name: curl_multi_fdset()
147 + *
148 + * Desc: Ask curl for its fd_set sets. The app can use these to select() or
149 + * poll() on. We want curl_multi_perform() called as soon as one of
150 + * them are ready.
151 + *
152 + * Returns: CURLMcode type, general multi error code.
153 + */
154 +CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle,
155 + fd_set *read_fd_set,
156 + fd_set *write_fd_set,
157 + fd_set *exc_fd_set,
158 + int *max_fd);
159 +
160 +/*
161 + * Name: curl_multi_wait()
162 + *
163 + * Desc: Poll on all fds within a CURLM set as well as any
164 + * additional fds passed to the function.
165 + *
166 + * Returns: CURLMcode type, general multi error code.
167 + */
168 +CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle,
169 + struct curl_waitfd extra_fds[],
170 + unsigned int extra_nfds,
171 + int timeout_ms,
172 + int *ret);
173 +
174 + /*
175 + * Name: curl_multi_perform()
176 + *
177 + * Desc: When the app thinks there's data available for curl it calls this
178 + * function to read/write whatever there is right now. This returns
179 + * as soon as the reads and writes are done. This function does not
180 + * require that there actually is data available for reading or that
181 + * data can be written, it can be called just in case. It returns
182 + * the number of handles that still transfer data in the second
183 + * argument's integer-pointer.
184 + *
185 + * Returns: CURLMcode type, general multi error code. *NOTE* that this only
186 + * returns errors etc regarding the whole multi stack. There might
187 + * still have occurred problems on invidual transfers even when this
188 + * returns OK.
189 + */
190 +CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle,
191 + int *running_handles);
192 +
193 + /*
194 + * Name: curl_multi_cleanup()
195 + *
196 + * Desc: Cleans up and removes a whole multi stack. It does not free or
197 + * touch any individual easy handles in any way. We need to define
198 + * in what state those handles will be if this function is called
199 + * in the middle of a transfer.
200 + *
201 + * Returns: CURLMcode type, general multi error code.
202 + */
203 +CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle);
204 +
205 +/*
206 + * Name: curl_multi_info_read()
207 + *
208 + * Desc: Ask the multi handle if there's any messages/informationals from
209 + * the individual transfers. Messages include informationals such as
210 + * error code from the transfer or just the fact that a transfer is
211 + * completed. More details on these should be written down as well.
212 + *
213 + * Repeated calls to this function will return a new struct each
214 + * time, until a special "end of msgs" struct is returned as a signal
215 + * that there is no more to get at this point.
216 + *
217 + * The data the returned pointer points to will not survive calling
218 + * curl_multi_cleanup().
219 + *
220 + * The 'CURLMsg' struct is meant to be very simple and only contain
221 + * very basic information. If more involved information is wanted,
222 + * we will provide the particular "transfer handle" in that struct
223 + * and that should/could/would be used in subsequent
224 + * curl_easy_getinfo() calls (or similar). The point being that we
225 + * must never expose complex structs to applications, as then we'll
226 + * undoubtably get backwards compatibility problems in the future.
227 + *
228 + * Returns: A pointer to a filled-in struct, or NULL if it failed or ran out
229 + * of structs. It also writes the number of messages left in the
230 + * queue (after this read) in the integer the second argument points
231 + * to.
232 + */
233 +CURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *multi_handle,
234 + int *msgs_in_queue);
235 +
236 +/*
237 + * Name: curl_multi_strerror()
238 + *
239 + * Desc: The curl_multi_strerror function may be used to turn a CURLMcode
240 + * value into the equivalent human readable error string. This is
241 + * useful for printing meaningful error messages.
242 + *
243 + * Returns: A pointer to a zero-terminated error message.
244 + */
245 +CURL_EXTERN const char *curl_multi_strerror(CURLMcode);
246 +
247 +/*
248 + * Name: curl_multi_socket() and
249 + * curl_multi_socket_all()
250 + *
251 + * Desc: An alternative version of curl_multi_perform() that allows the
252 + * application to pass in one of the file descriptors that have been
253 + * detected to have "action" on them and let libcurl perform.
254 + * See man page for details.
255 + */
256 +#define CURL_POLL_NONE 0
257 +#define CURL_POLL_IN 1
258 +#define CURL_POLL_OUT 2
259 +#define CURL_POLL_INOUT 3
260 +#define CURL_POLL_REMOVE 4
261 +
262 +#define CURL_SOCKET_TIMEOUT CURL_SOCKET_BAD
263 +
264 +#define CURL_CSELECT_IN 0x01
265 +#define CURL_CSELECT_OUT 0x02
266 +#define CURL_CSELECT_ERR 0x04
267 +
268 +typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */
269 + curl_socket_t s, /* socket */
270 + int what, /* see above */
271 + void *userp, /* private callback
272 + pointer */
273 + void *socketp); /* private socket
274 + pointer */
275 +/*
276 + * Name: curl_multi_timer_callback
277 + *
278 + * Desc: Called by libcurl whenever the library detects a change in the
279 + * maximum number of milliseconds the app is allowed to wait before
280 + * curl_multi_socket() or curl_multi_perform() must be called
281 + * (to allow libcurl's timed events to take place).
282 + *
283 + * Returns: The callback should return zero.
284 + */
285 +typedef int (*curl_multi_timer_callback)(CURLM *multi, /* multi handle */
286 + long timeout_ms, /* see above */
287 + void *userp); /* private callback
288 + pointer */
289 +
290 +CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s,
291 + int *running_handles);
292 +
293 +CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle,
294 + curl_socket_t s,
295 + int ev_bitmask,
296 + int *running_handles);
297 +
298 +CURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle,
299 + int *running_handles);
300 +
301 +#ifndef CURL_ALLOW_OLD_MULTI_SOCKET
302 +/* This macro below was added in 7.16.3 to push users who recompile to use
303 + the new curl_multi_socket_action() instead of the old curl_multi_socket()
304 +*/
305 +#define curl_multi_socket(x,y,z) curl_multi_socket_action(x,y,0,z)
306 +#endif
307 +
308 +/*
309 + * Name: curl_multi_timeout()
310 + *
311 + * Desc: Returns the maximum number of milliseconds the app is allowed to
312 + * wait before curl_multi_socket() or curl_multi_perform() must be
313 + * called (to allow libcurl's timed events to take place).
314 + *
315 + * Returns: CURLM error code.
316 + */
317 +CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle,
318 + long *milliseconds);
319 +
320 +#undef CINIT /* re-using the same name as in curl.h */
321 +
322 +#ifdef CURL_ISOCPP
323 +#define CINIT(name,type,num) CURLMOPT_ ## name = CURLOPTTYPE_ ## type + num
324 +#else
325 +/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */
326 +#define LONG CURLOPTTYPE_LONG
327 +#define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT
328 +#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT
329 +#define OFF_T CURLOPTTYPE_OFF_T
330 +#define CINIT(name,type,number) CURLMOPT_/**/name = type + number
331 +#endif
332 +
333 +typedef enum {
334 + /* This is the socket callback function pointer */
335 + CINIT(SOCKETFUNCTION, FUNCTIONPOINT, 1),
336 +
337 + /* This is the argument passed to the socket callback */
338 + CINIT(SOCKETDATA, OBJECTPOINT, 2),
339 +
340 + /* set to 1 to enable pipelining for this multi handle */
341 + CINIT(PIPELINING, LONG, 3),
342 +
343 + /* This is the timer callback function pointer */
344 + CINIT(TIMERFUNCTION, FUNCTIONPOINT, 4),
345 +
346 + /* This is the argument passed to the timer callback */
347 + CINIT(TIMERDATA, OBJECTPOINT, 5),
348 +
349 + /* maximum number of entries in the connection cache */
350 + CINIT(MAXCONNECTS, LONG, 6),
351 +
352 + /* maximum number of (pipelining) connections to one host */
353 + CINIT(MAX_HOST_CONNECTIONS, LONG, 7),
354 +
355 + /* maximum number of requests in a pipeline */
356 + CINIT(MAX_PIPELINE_LENGTH, LONG, 8),
357 +
358 + /* a connection with a content-length longer than this
359 + will not be considered for pipelining */
360 + CINIT(CONTENT_LENGTH_PENALTY_SIZE, OFF_T, 9),
361 +
362 + /* a connection with a chunk length longer than this
363 + will not be considered for pipelining */
364 + CINIT(CHUNK_LENGTH_PENALTY_SIZE, OFF_T, 10),
365 +
366 + /* a list of site names(+port) that are blacklisted from
367 + pipelining */
368 + CINIT(PIPELINING_SITE_BL, OBJECTPOINT, 11),
369 +
370 + /* a list of server types that are blacklisted from
371 + pipelining */
372 + CINIT(PIPELINING_SERVER_BL, OBJECTPOINT, 12),
373 +
374 + /* maximum number of open connections in total */
375 + CINIT(MAX_TOTAL_CONNECTIONS, LONG, 13),
376 +
377 + /* This is the server push callback function pointer */
378 + CINIT(PUSHFUNCTION, FUNCTIONPOINT, 14),
379 +
380 + /* This is the argument passed to the server push callback */
381 + CINIT(PUSHDATA, OBJECTPOINT, 15),
382 +
383 + CURLMOPT_LASTENTRY /* the last unused */
384 +} CURLMoption;
385 +
386 +
387 +/*
388 + * Name: curl_multi_setopt()
389 + *
390 + * Desc: Sets options for the multi handle.
391 + *
392 + * Returns: CURLM error code.
393 + */
394 +CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle,
395 + CURLMoption option, ...);
396 +
397 +
398 +/*
399 + * Name: curl_multi_assign()
400 + *
401 + * Desc: This function sets an association in the multi handle between the
402 + * given socket and a private pointer of the application. This is
403 + * (only) useful for curl_multi_socket uses.
404 + *
405 + * Returns: CURLM error code.
406 + */
407 +CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle,
408 + curl_socket_t sockfd, void *sockp);
409 +
410 +
411 +/*
412 + * Name: curl_push_callback
413 + *
414 + * Desc: This callback gets called when a new stream is being pushed by the
415 + * server. It approves or denies the new stream.
416 + *
417 + * Returns: CURL_PUSH_OK or CURL_PUSH_DENY.
418 + */
419 +#define CURL_PUSH_OK 0
420 +#define CURL_PUSH_DENY 1
421 +
422 +struct curl_pushheaders; /* forward declaration only */
423 +
424 +CURL_EXTERN char *curl_pushheader_bynum(struct curl_pushheaders *h,
425 + size_t num);
426 +CURL_EXTERN char *curl_pushheader_byname(struct curl_pushheaders *h,
427 + const char *name);
428 +
429 +typedef int (*curl_push_callback)(CURL *parent,
430 + CURL *easy,
431 + size_t num_headers,
432 + struct curl_pushheaders *headers,
433 + void *userp);
434 +
435 +#ifdef __cplusplus
436 +} /* end of extern "C" */
437 +#endif
438 +
439 +#endif
1 +#ifndef __STDC_HEADERS_H
2 +#define __STDC_HEADERS_H
3 +/***************************************************************************
4 + * _ _ ____ _
5 + * Project ___| | | | _ \| |
6 + * / __| | | | |_) | |
7 + * | (__| |_| | _ <| |___
8 + * \___|\___/|_| \_\_____|
9 + *
10 + * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
11 + *
12 + * This software is licensed as described in the file COPYING, which
13 + * you should have received as part of this distribution. The terms
14 + * are also available at https://curl.haxx.se/docs/copyright.html.
15 + *
16 + * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 + * copies of the Software, and permit persons to whom the Software is
18 + * furnished to do so, under the terms of the COPYING file.
19 + *
20 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 + * KIND, either express or implied.
22 + *
23 + ***************************************************************************/
24 +
25 +#include <sys/types.h>
26 +
27 +size_t fread(void *, size_t, size_t, FILE *);
28 +size_t fwrite(const void *, size_t, size_t, FILE *);
29 +
30 +int strcasecmp(const char *, const char *);
31 +int strncasecmp(const char *, const char *, size_t);
32 +
33 +#endif /* __STDC_HEADERS_H */
1 +#ifndef __CURL_SYSTEM_H
2 +#define __CURL_SYSTEM_H
3 +/***************************************************************************
4 + * _ _ ____ _
5 + * Project ___| | | | _ \| |
6 + * / __| | | | |_) | |
7 + * | (__| |_| | _ <| |___
8 + * \___|\___/|_| \_\_____|
9 + *
10 + * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
11 + *
12 + * This software is licensed as described in the file COPYING, which
13 + * you should have received as part of this distribution. The terms
14 + * are also available at https://curl.haxx.se/docs/copyright.html.
15 + *
16 + * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 + * copies of the Software, and permit persons to whom the Software is
18 + * furnished to do so, under the terms of the COPYING file.
19 + *
20 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 + * KIND, either express or implied.
22 + *
23 + ***************************************************************************/
24 +
25 +/*
26 + * This header is supposed to eventually replace curlbuild.h. This little one
27 + * is still learning. During the experimental phase, this header files
28 + * defines symbols using the prefixes CURLSYS_ or curlsys_. When we feel
29 + * confident enough, we replace curlbuild.h with this file and rename all
30 + * prefixes to CURL_ and curl_.
31 + */
32 +
33 +/*
34 + * Try to keep one section per platform, compiler and architecture, otherwise,
35 + * if an existing section is reused for a different one and later on the
36 + * original is adjusted, probably the piggybacking one can be adversely
37 + * changed.
38 + *
39 + * In order to differentiate between platforms/compilers/architectures use
40 + * only compiler built in predefined preprocessor symbols.
41 + *
42 + * curl_off_t
43 + * ----------
44 + *
45 + * For any given platform/compiler curl_off_t must be typedef'ed to a 64-bit
46 + * wide signed integral data type. The width of this data type must remain
47 + * constant and independent of any possible large file support settings.
48 + *
49 + * As an exception to the above, curl_off_t shall be typedef'ed to a 32-bit
50 + * wide signed integral data type if there is no 64-bit type.
51 + *
52 + * As a general rule, curl_off_t shall not be mapped to off_t. This rule shall
53 + * only be violated if off_t is the only 64-bit data type available and the
54 + * size of off_t is independent of large file support settings. Keep your
55 + * build on the safe side avoiding an off_t gating. If you have a 64-bit
56 + * off_t then take for sure that another 64-bit data type exists, dig deeper
57 + * and you will find it.
58 + *
59 + */
60 +
61 +#if defined(__DJGPP__) || defined(__GO32__)
62 +# if defined(__DJGPP__) && (__DJGPP__ > 1)
63 +# define CURLSYS_SIZEOF_LONG 4
64 +# define CURLSYS_TYPEOF_CURL_OFF_T long long
65 +# define CURLSYS_FORMAT_CURL_OFF_T "lld"
66 +# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
67 +# define CURLSYS_SIZEOF_CURL_OFF_T 8
68 +# define CURLSYS_SUFFIX_CURL_OFF_T LL
69 +# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
70 +# else
71 +# define CURLSYS_SIZEOF_LONG 4
72 +# define CURLSYS_TYPEOF_CURL_OFF_T long
73 +# define CURLSYS_FORMAT_CURL_OFF_T "ld"
74 +# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
75 +# define CURLSYS_SIZEOF_CURL_OFF_T 4
76 +# define CURLSYS_SUFFIX_CURL_OFF_T L
77 +# define CURLSYS_SUFFIX_CURL_OFF_TU UL
78 +# endif
79 +# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
80 +# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
81 +
82 +#elif defined(__SALFORDC__)
83 +# define CURLSYS_SIZEOF_LONG 4
84 +# define CURLSYS_TYPEOF_CURL_OFF_T long
85 +# define CURLSYS_FORMAT_CURL_OFF_T "ld"
86 +# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
87 +# define CURLSYS_SIZEOF_CURL_OFF_T 4
88 +# define CURLSYS_SUFFIX_CURL_OFF_T L
89 +# define CURLSYS_SUFFIX_CURL_OFF_TU UL
90 +# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
91 +# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
92 +
93 +#elif defined(__BORLANDC__)
94 +# if (__BORLANDC__ < 0x520)
95 +# define CURLSYS_SIZEOF_LONG 4
96 +# define CURLSYS_TYPEOF_CURL_OFF_T long
97 +# define CURLSYS_FORMAT_CURL_OFF_T "ld"
98 +# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
99 +# define CURLSYS_SIZEOF_CURL_OFF_T 4
100 +# define CURLSYS_SUFFIX_CURL_OFF_T L
101 +# define CURLSYS_SUFFIX_CURL_OFF_TU UL
102 +# else
103 +# define CURLSYS_SIZEOF_LONG 4
104 +# define CURLSYS_TYPEOF_CURL_OFF_T __int64
105 +# define CURLSYS_FORMAT_CURL_OFF_T "I64d"
106 +# define CURLSYS_FORMAT_CURL_OFF_TU "I64u"
107 +# define CURLSYS_SIZEOF_CURL_OFF_T 8
108 +# define CURLSYS_SUFFIX_CURL_OFF_T i64
109 +# define CURLSYS_SUFFIX_CURL_OFF_TU ui64
110 +# endif
111 +# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
112 +# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
113 +
114 +#elif defined(__TURBOC__)
115 +# define CURLSYS_SIZEOF_LONG 4
116 +# define CURLSYS_TYPEOF_CURL_OFF_T long
117 +# define CURLSYS_FORMAT_CURL_OFF_T "ld"
118 +# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
119 +# define CURLSYS_SIZEOF_CURL_OFF_T 4
120 +# define CURLSYS_SUFFIX_CURL_OFF_T L
121 +# define CURLSYS_SUFFIX_CURL_OFF_TU UL
122 +# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
123 +# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
124 +
125 +#elif defined(__WATCOMC__)
126 +# if defined(__386__)
127 +# define CURLSYS_SIZEOF_LONG 4
128 +# define CURLSYS_TYPEOF_CURL_OFF_T __int64
129 +# define CURLSYS_FORMAT_CURL_OFF_T "I64d"
130 +# define CURLSYS_FORMAT_CURL_OFF_TU "I64u"
131 +# define CURLSYS_SIZEOF_CURL_OFF_T 8
132 +# define CURLSYS_SUFFIX_CURL_OFF_T i64
133 +# define CURLSYS_SUFFIX_CURL_OFF_TU ui64
134 +# else
135 +# define CURLSYS_SIZEOF_LONG 4
136 +# define CURLSYS_TYPEOF_CURL_OFF_T long
137 +# define CURLSYS_FORMAT_CURL_OFF_T "ld"
138 +# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
139 +# define CURLSYS_SIZEOF_CURL_OFF_T 4
140 +# define CURLSYS_SUFFIX_CURL_OFF_T L
141 +# define CURLSYS_SUFFIX_CURL_OFF_TU UL
142 +# endif
143 +# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
144 +# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
145 +
146 +#elif defined(__POCC__)
147 +# if (__POCC__ < 280)
148 +# define CURLSYS_SIZEOF_LONG 4
149 +# define CURLSYS_TYPEOF_CURL_OFF_T long
150 +# define CURLSYS_FORMAT_CURL_OFF_T "ld"
151 +# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
152 +# define CURLSYS_SIZEOF_CURL_OFF_T 4
153 +# define CURLSYS_SUFFIX_CURL_OFF_T L
154 +# define CURLSYS_SUFFIX_CURL_OFF_TU UL
155 +# elif defined(_MSC_VER)
156 +# define CURLSYS_SIZEOF_LONG 4
157 +# define CURLSYS_TYPEOF_CURL_OFF_T __int64
158 +# define CURLSYS_FORMAT_CURL_OFF_T "I64d"
159 +# define CURLSYS_FORMAT_CURL_OFF_TU "I64u"
160 +# define CURLSYS_SIZEOF_CURL_OFF_T 8
161 +# define CURLSYS_SUFFIX_CURL_OFF_T i64
162 +# define CURLSYS_SUFFIX_CURL_OFF_TU ui64
163 +# else
164 +# define CURLSYS_SIZEOF_LONG 4
165 +# define CURLSYS_TYPEOF_CURL_OFF_T long long
166 +# define CURLSYS_FORMAT_CURL_OFF_T "lld"
167 +# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
168 +# define CURLSYS_SIZEOF_CURL_OFF_T 8
169 +# define CURLSYS_SUFFIX_CURL_OFF_T LL
170 +# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
171 +# endif
172 +# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
173 +# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
174 +
175 +#elif defined(__LCC__)
176 +# define CURLSYS_SIZEOF_LONG 4
177 +# define CURLSYS_TYPEOF_CURL_OFF_T long
178 +# define CURLSYS_FORMAT_CURL_OFF_T "ld"
179 +# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
180 +# define CURLSYS_SIZEOF_CURL_OFF_T 4
181 +# define CURLSYS_SUFFIX_CURL_OFF_T L
182 +# define CURLSYS_SUFFIX_CURL_OFF_TU UL
183 +# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
184 +# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
185 +
186 +#elif defined(__SYMBIAN32__)
187 +# if defined(__EABI__) /* Treat all ARM compilers equally */
188 +# define CURLSYS_SIZEOF_LONG 4
189 +# define CURLSYS_TYPEOF_CURL_OFF_T long long
190 +# define CURLSYS_FORMAT_CURL_OFF_T "lld"
191 +# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
192 +# define CURLSYS_SIZEOF_CURL_OFF_T 8
193 +# define CURLSYS_SUFFIX_CURL_OFF_T LL
194 +# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
195 +# elif defined(__CW32__)
196 +# pragma longlong on
197 +# define CURLSYS_SIZEOF_LONG 4
198 +# define CURLSYS_TYPEOF_CURL_OFF_T long long
199 +# define CURLSYS_FORMAT_CURL_OFF_T "lld"
200 +# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
201 +# define CURLSYS_SIZEOF_CURL_OFF_T 8
202 +# define CURLSYS_SUFFIX_CURL_OFF_T LL
203 +# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
204 +# elif defined(__VC32__)
205 +# define CURLSYS_SIZEOF_LONG 4
206 +# define CURLSYS_TYPEOF_CURL_OFF_T __int64
207 +# define CURLSYS_FORMAT_CURL_OFF_T "lld"
208 +# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
209 +# define CURLSYS_SIZEOF_CURL_OFF_T 8
210 +# define CURLSYS_SUFFIX_CURL_OFF_T LL
211 +# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
212 +# endif
213 +# define CURLSYS_TYPEOF_CURL_SOCKLEN_T unsigned int
214 +# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
215 +
216 +#elif defined(__MWERKS__)
217 +# define CURLSYS_SIZEOF_LONG 4
218 +# define CURLSYS_TYPEOF_CURL_OFF_T long long
219 +# define CURLSYS_FORMAT_CURL_OFF_T "lld"
220 +# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
221 +# define CURLSYS_SIZEOF_CURL_OFF_T 8
222 +# define CURLSYS_SUFFIX_CURL_OFF_T LL
223 +# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
224 +# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
225 +# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
226 +
227 +#elif defined(_WIN32_WCE)
228 +# define CURLSYS_SIZEOF_LONG 4
229 +# define CURLSYS_TYPEOF_CURL_OFF_T __int64
230 +# define CURLSYS_FORMAT_CURL_OFF_T "I64d"
231 +# define CURLSYS_FORMAT_CURL_OFF_TU "I64u"
232 +# define CURLSYS_SIZEOF_CURL_OFF_T 8
233 +# define CURLSYS_SUFFIX_CURL_OFF_T i64
234 +# define CURLSYS_SUFFIX_CURL_OFF_TU ui64
235 +# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
236 +# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
237 +
238 +#elif defined(__MINGW32__)
239 +# define CURLSYS_SIZEOF_LONG 4
240 +# define CURLSYS_TYPEOF_CURL_OFF_T long long
241 +# define CURLSYS_FORMAT_CURL_OFF_T "I64d"
242 +# define CURLSYS_FORMAT_CURL_OFF_TU "I64u"
243 +# define CURLSYS_SIZEOF_CURL_OFF_T 8
244 +# define CURLSYS_SUFFIX_CURL_OFF_T LL
245 +# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
246 +# define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t
247 +# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
248 +# define CURLSYS_PULL_SYS_TYPES_H 1
249 +# define CURLSYS_PULL_WS2TCPIP_H 1
250 +
251 +#elif defined(__VMS)
252 +# if defined(__VAX)
253 +# define CURLSYS_SIZEOF_LONG 4
254 +# define CURLSYS_TYPEOF_CURL_OFF_T long
255 +# define CURLSYS_FORMAT_CURL_OFF_T "ld"
256 +# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
257 +# define CURLSYS_SIZEOF_CURL_OFF_T 4
258 +# define CURLSYS_SUFFIX_CURL_OFF_T L
259 +# define CURLSYS_SUFFIX_CURL_OFF_TU UL
260 +# else
261 +# define CURLSYS_SIZEOF_LONG 4
262 +# define CURLSYS_TYPEOF_CURL_OFF_T long long
263 +# define CURLSYS_FORMAT_CURL_OFF_T "lld"
264 +# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
265 +# define CURLSYS_SIZEOF_CURL_OFF_T 8
266 +# define CURLSYS_SUFFIX_CURL_OFF_T LL
267 +# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
268 +# endif
269 +# define CURLSYS_TYPEOF_CURL_SOCKLEN_T unsigned int
270 +# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
271 +
272 +#elif defined(__OS400__)
273 +# if defined(__ILEC400__)
274 +# define CURLSYS_SIZEOF_LONG 4
275 +# define CURLSYS_TYPEOF_CURL_OFF_T long long
276 +# define CURLSYS_FORMAT_CURL_OFF_T "lld"
277 +# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
278 +# define CURLSYS_SIZEOF_CURL_OFF_T 8
279 +# define CURLSYS_SUFFIX_CURL_OFF_T LL
280 +# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
281 +# define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t
282 +# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
283 +# define CURLSYS_PULL_SYS_TYPES_H 1
284 +# define CURLSYS_PULL_SYS_SOCKET_H 1
285 +# endif
286 +
287 +#elif defined(__MVS__)
288 +# if defined(__IBMC__) || defined(__IBMCPP__)
289 +# if defined(_ILP32)
290 +# define CURLSYS_SIZEOF_LONG 4
291 +# elif defined(_LP64)
292 +# define CURLSYS_SIZEOF_LONG 8
293 +# endif
294 +# if defined(_LONG_LONG)
295 +# define CURLSYS_TYPEOF_CURL_OFF_T long long
296 +# define CURLSYS_FORMAT_CURL_OFF_T "lld"
297 +# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
298 +# define CURLSYS_SIZEOF_CURL_OFF_T 8
299 +# define CURLSYS_SUFFIX_CURL_OFF_T LL
300 +# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
301 +# elif defined(_LP64)
302 +# define CURLSYS_TYPEOF_CURL_OFF_T long
303 +# define CURLSYS_FORMAT_CURL_OFF_T "ld"
304 +# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
305 +# define CURLSYS_SIZEOF_CURL_OFF_T 8
306 +# define CURLSYS_SUFFIX_CURL_OFF_T L
307 +# define CURLSYS_SUFFIX_CURL_OFF_TU UL
308 +# else
309 +# define CURLSYS_TYPEOF_CURL_OFF_T long
310 +# define CURLSYS_FORMAT_CURL_OFF_T "ld"
311 +# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
312 +# define CURLSYS_SIZEOF_CURL_OFF_T 4
313 +# define CURLSYS_SUFFIX_CURL_OFF_T L
314 +# define CURLSYS_SUFFIX_CURL_OFF_TU UL
315 +# endif
316 +# define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t
317 +# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
318 +# define CURLSYS_PULL_SYS_TYPES_H 1
319 +# define CURLSYS_PULL_SYS_SOCKET_H 1
320 +# endif
321 +
322 +#elif defined(__370__)
323 +# if defined(__IBMC__) || defined(__IBMCPP__)
324 +# if defined(_ILP32)
325 +# define CURLSYS_SIZEOF_LONG 4
326 +# elif defined(_LP64)
327 +# define CURLSYS_SIZEOF_LONG 8
328 +# endif
329 +# if defined(_LONG_LONG)
330 +# define CURLSYS_TYPEOF_CURL_OFF_T long long
331 +# define CURLSYS_FORMAT_CURL_OFF_T "lld"
332 +# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
333 +# define CURLSYS_SIZEOF_CURL_OFF_T 8
334 +# define CURLSYS_SUFFIX_CURL_OFF_T LL
335 +# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
336 +# elif defined(_LP64)
337 +# define CURLSYS_TYPEOF_CURL_OFF_T long
338 +# define CURLSYS_FORMAT_CURL_OFF_T "ld"
339 +# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
340 +# define CURLSYS_SIZEOF_CURL_OFF_T 8
341 +# define CURLSYS_SUFFIX_CURL_OFF_T L
342 +# define CURLSYS_SUFFIX_CURL_OFF_TU UL
343 +# else
344 +# define CURLSYS_TYPEOF_CURL_OFF_T long
345 +# define CURLSYS_FORMAT_CURL_OFF_T "ld"
346 +# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
347 +# define CURLSYS_SIZEOF_CURL_OFF_T 4
348 +# define CURLSYS_SUFFIX_CURL_OFF_T L
349 +# define CURLSYS_SUFFIX_CURL_OFF_TU UL
350 +# endif
351 +# define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t
352 +# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
353 +# define CURLSYS_PULL_SYS_TYPES_H 1
354 +# define CURLSYS_PULL_SYS_SOCKET_H 1
355 +# endif
356 +
357 +#elif defined(TPF)
358 +# define CURLSYS_SIZEOF_LONG 8
359 +# define CURLSYS_TYPEOF_CURL_OFF_T long
360 +# define CURLSYS_FORMAT_CURL_OFF_T "ld"
361 +# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
362 +# define CURLSYS_SIZEOF_CURL_OFF_T 8
363 +# define CURLSYS_SUFFIX_CURL_OFF_T L
364 +# define CURLSYS_SUFFIX_CURL_OFF_TU UL
365 +# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
366 +# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
367 +
368 +#elif defined(__TINYC__) /* also known as tcc */
369 +
370 +# define CURLSYS_SIZEOF_LONG 4
371 +# define CURLSYS_TYPEOF_CURL_OFF_T long long
372 +# define CURLSYS_FORMAT_CURL_OFF_T "lld"
373 +# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
374 +# define CURLSYS_SIZEOF_CURL_OFF_T 8
375 +# define CURLSYS_SUFFIX_CURL_OFF_T LL
376 +# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
377 +# define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t
378 +# define CURLSYS_PULL_SYS_TYPES_H 1
379 +# define CURLSYS_PULL_SYS_SOCKET_H 1
380 +
381 +/* ===================================== */
382 +/* KEEP MSVC THE PENULTIMATE ENTRY */
383 +/* ===================================== */
384 +
385 +#elif defined(_MSC_VER)
386 +# if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
387 +# define CURLSYS_SIZEOF_LONG 4
388 +# define CURLSYS_TYPEOF_CURL_OFF_T __int64
389 +# define CURLSYS_FORMAT_CURL_OFF_T "I64d"
390 +# define CURLSYS_FORMAT_CURL_OFF_TU "I64u"
391 +# define CURLSYS_SIZEOF_CURL_OFF_T 8
392 +# define CURLSYS_SUFFIX_CURL_OFF_T i64
393 +# define CURLSYS_SUFFIX_CURL_OFF_TU ui64
394 +# else
395 +# define CURLSYS_SIZEOF_LONG 4
396 +# define CURLSYS_TYPEOF_CURL_OFF_T long
397 +# define CURLSYS_FORMAT_CURL_OFF_T "ld"
398 +# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
399 +# define CURLSYS_SIZEOF_CURL_OFF_T 4
400 +# define CURLSYS_SUFFIX_CURL_OFF_T L
401 +# define CURLSYS_SUFFIX_CURL_OFF_TU UL
402 +# endif
403 +# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
404 +# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
405 +
406 +/* ===================================== */
407 +/* KEEP GENERIC GCC THE LAST ENTRY */
408 +/* ===================================== */
409 +
410 +#elif defined(__GNUC__)
411 +# if !defined(__LP64__) && (defined(__ILP32__) || \
412 + defined(__i386__) || defined(__ppc__) || defined(__arm__) || \
413 + defined(__sparc__) || defined(__mips__) || defined(__sh__))
414 +# define CURLSYS_SIZEOF_LONG 4
415 +# define CURLSYS_TYPEOF_CURL_OFF_T long long
416 +# define CURLSYS_FORMAT_CURL_OFF_T "lld"
417 +# define CURLSYS_FORMAT_CURL_OFF_TU "llu"
418 +# define CURLSYS_SIZEOF_CURL_OFF_T 8
419 +# define CURLSYS_SUFFIX_CURL_OFF_T LL
420 +# define CURLSYS_SUFFIX_CURL_OFF_TU ULL
421 +# elif defined(__LP64__) || \
422 + defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__)
423 +# define CURLSYS_SIZEOF_LONG 8
424 +# define CURLSYS_TYPEOF_CURL_OFF_T long
425 +# define CURLSYS_FORMAT_CURL_OFF_T "ld"
426 +# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
427 +# define CURLSYS_SIZEOF_CURL_OFF_T 8
428 +# define CURLSYS_SUFFIX_CURL_OFF_T L
429 +# define CURLSYS_SUFFIX_CURL_OFF_TU UL
430 +# endif
431 +# define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t
432 +# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
433 +# define CURLSYS_PULL_SYS_TYPES_H 1
434 +# define CURLSYS_PULL_SYS_SOCKET_H 1
435 +
436 +#else
437 +/* generic "safe guess" on old 32 bit style */
438 +# define CURLSYS_SIZEOF_LONG 4
439 +# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
440 +# define CURLSYS_SIZEOF_CURL_OFF_T 4
441 +# define CURLSYS_TYPEOF_CURL_OFF_T long
442 +# define CURLSYS_FORMAT_CURL_OFF_T "ld"
443 +# define CURLSYS_FORMAT_CURL_OFF_TU "lu"
444 +# define CURLSYS_SUFFIX_CURL_OFF_T L
445 +# define CURLSYS_SUFFIX_CURL_OFF_TU UL
446 +# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
447 +#endif
448 +
449 +/* CURLSYS_PULL_WS2TCPIP_H is defined above when inclusion of header file */
450 +/* ws2tcpip.h is required here to properly make type definitions below. */
451 +#ifdef CURLSYS_PULL_WS2TCPIP_H
452 +# ifndef WIN32_LEAN_AND_MEAN
453 +# define WIN32_LEAN_AND_MEAN
454 +# endif
455 +# include <windows.h>
456 +# include <winsock2.h>
457 +# include <ws2tcpip.h>
458 +#endif
459 +
460 +/* CURLSYS_PULL_SYS_TYPES_H is defined above when inclusion of header file */
461 +/* sys/types.h is required here to properly make type definitions below. */
462 +#ifdef CURLSYS_PULL_SYS_TYPES_H
463 +# include <sys/types.h>
464 +#endif
465 +
466 +/* CURLSYS_PULL_SYS_SOCKET_H is defined above when inclusion of header file */
467 +/* sys/socket.h is required here to properly make type definitions below. */
468 +#ifdef CURLSYS_PULL_SYS_SOCKET_H
469 +# include <sys/socket.h>
470 +#endif
471 +
472 +/* Data type definition of curl_socklen_t. */
473 +#ifdef CURLSYS_TYPEOF_CURL_SOCKLEN_T
474 + typedef CURLSYS_TYPEOF_CURL_SOCKLEN_T curlsys_socklen_t;
475 +#endif
476 +
477 +/* Data type definition of curl_off_t. */
478 +
479 +#ifdef CURLSYS_TYPEOF_CURL_OFF_T
480 + typedef CURLSYS_TYPEOF_CURL_OFF_T curlsys_off_t;
481 +#endif
482 +
483 +#endif /* __CURL_SYSTEM_H */
484 +
1 +#ifndef __CURL_TYPECHECK_GCC_H
2 +#define __CURL_TYPECHECK_GCC_H
3 +/***************************************************************************
4 + * _ _ ____ _
5 + * Project ___| | | | _ \| |
6 + * / __| | | | |_) | |
7 + * | (__| |_| | _ <| |___
8 + * \___|\___/|_| \_\_____|
9 + *
10 + * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
11 + *
12 + * This software is licensed as described in the file COPYING, which
13 + * you should have received as part of this distribution. The terms
14 + * are also available at https://curl.haxx.se/docs/copyright.html.
15 + *
16 + * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 + * copies of the Software, and permit persons to whom the Software is
18 + * furnished to do so, under the terms of the COPYING file.
19 + *
20 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 + * KIND, either express or implied.
22 + *
23 + ***************************************************************************/
24 +
25 +/* wraps curl_easy_setopt() with typechecking */
26 +
27 +/* To add a new kind of warning, add an
28 + * if(_curl_is_sometype_option(_curl_opt))
29 + * if(!_curl_is_sometype(value))
30 + * _curl_easy_setopt_err_sometype();
31 + * block and define _curl_is_sometype_option, _curl_is_sometype and
32 + * _curl_easy_setopt_err_sometype below
33 + *
34 + * NOTE: We use two nested 'if' statements here instead of the && operator, in
35 + * order to work around gcc bug #32061. It affects only gcc 4.3.x/4.4.x
36 + * when compiling with -Wlogical-op.
37 + *
38 + * To add an option that uses the same type as an existing option, you'll just
39 + * need to extend the appropriate _curl_*_option macro
40 + */
41 +#define curl_easy_setopt(handle, option, value) \
42 +__extension__ ({ \
43 + __typeof__(option) _curl_opt = option; \
44 + if(__builtin_constant_p(_curl_opt)) { \
45 + if(_curl_is_long_option(_curl_opt)) \
46 + if(!_curl_is_long(value)) \
47 + _curl_easy_setopt_err_long(); \
48 + if(_curl_is_off_t_option(_curl_opt)) \
49 + if(!_curl_is_off_t(value)) \
50 + _curl_easy_setopt_err_curl_off_t(); \
51 + if(_curl_is_string_option(_curl_opt)) \
52 + if(!_curl_is_string(value)) \
53 + _curl_easy_setopt_err_string(); \
54 + if(_curl_is_write_cb_option(_curl_opt)) \
55 + if(!_curl_is_write_cb(value)) \
56 + _curl_easy_setopt_err_write_callback(); \
57 + if((_curl_opt) == CURLOPT_READFUNCTION) \
58 + if(!_curl_is_read_cb(value)) \
59 + _curl_easy_setopt_err_read_cb(); \
60 + if((_curl_opt) == CURLOPT_IOCTLFUNCTION) \
61 + if(!_curl_is_ioctl_cb(value)) \
62 + _curl_easy_setopt_err_ioctl_cb(); \
63 + if((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \
64 + if(!_curl_is_sockopt_cb(value)) \
65 + _curl_easy_setopt_err_sockopt_cb(); \
66 + if((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \
67 + if(!_curl_is_opensocket_cb(value)) \
68 + _curl_easy_setopt_err_opensocket_cb(); \
69 + if((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \
70 + if(!_curl_is_progress_cb(value)) \
71 + _curl_easy_setopt_err_progress_cb(); \
72 + if((_curl_opt) == CURLOPT_DEBUGFUNCTION) \
73 + if(!_curl_is_debug_cb(value)) \
74 + _curl_easy_setopt_err_debug_cb(); \
75 + if((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \
76 + if(!_curl_is_ssl_ctx_cb(value)) \
77 + _curl_easy_setopt_err_ssl_ctx_cb(); \
78 + if(_curl_is_conv_cb_option(_curl_opt)) \
79 + if(!_curl_is_conv_cb(value)) \
80 + _curl_easy_setopt_err_conv_cb(); \
81 + if((_curl_opt) == CURLOPT_SEEKFUNCTION) \
82 + if(!_curl_is_seek_cb(value)) \
83 + _curl_easy_setopt_err_seek_cb(); \
84 + if(_curl_is_cb_data_option(_curl_opt)) \
85 + if(!_curl_is_cb_data(value)) \
86 + _curl_easy_setopt_err_cb_data(); \
87 + if((_curl_opt) == CURLOPT_ERRORBUFFER) \
88 + if(!_curl_is_error_buffer(value)) \
89 + _curl_easy_setopt_err_error_buffer(); \
90 + if((_curl_opt) == CURLOPT_STDERR) \
91 + if(!_curl_is_FILE(value)) \
92 + _curl_easy_setopt_err_FILE(); \
93 + if(_curl_is_postfields_option(_curl_opt)) \
94 + if(!_curl_is_postfields(value)) \
95 + _curl_easy_setopt_err_postfields(); \
96 + if((_curl_opt) == CURLOPT_HTTPPOST) \
97 + if(!_curl_is_arr((value), struct curl_httppost)) \
98 + _curl_easy_setopt_err_curl_httpost(); \
99 + if(_curl_is_slist_option(_curl_opt)) \
100 + if(!_curl_is_arr((value), struct curl_slist)) \
101 + _curl_easy_setopt_err_curl_slist(); \
102 + if((_curl_opt) == CURLOPT_SHARE) \
103 + if(!_curl_is_ptr((value), CURLSH)) \
104 + _curl_easy_setopt_err_CURLSH(); \
105 + } \
106 + curl_easy_setopt(handle, _curl_opt, value); \
107 +})
108 +
109 +/* wraps curl_easy_getinfo() with typechecking */
110 +/* FIXME: don't allow const pointers */
111 +#define curl_easy_getinfo(handle, info, arg) \
112 +__extension__ ({ \
113 + __typeof__(info) _curl_info = info; \
114 + if(__builtin_constant_p(_curl_info)) { \
115 + if(_curl_is_string_info(_curl_info)) \
116 + if(!_curl_is_arr((arg), char *)) \
117 + _curl_easy_getinfo_err_string(); \
118 + if(_curl_is_long_info(_curl_info)) \
119 + if(!_curl_is_arr((arg), long)) \
120 + _curl_easy_getinfo_err_long(); \
121 + if(_curl_is_double_info(_curl_info)) \
122 + if(!_curl_is_arr((arg), double)) \
123 + _curl_easy_getinfo_err_double(); \
124 + if(_curl_is_slist_info(_curl_info)) \
125 + if(!_curl_is_arr((arg), struct curl_slist *)) \
126 + _curl_easy_getinfo_err_curl_slist(); \
127 + if(_curl_is_tlssessioninfo_info(_curl_info)) \
128 + if(!_curl_is_arr((arg), struct curl_tlssessioninfo *)) \
129 + _curl_easy_getinfo_err_curl_tlssesssioninfo(); \
130 + if(_curl_is_certinfo_info(_curl_info)) \
131 + if(!_curl_is_arr((arg), struct curl_certinfo *)) \
132 + _curl_easy_getinfo_err_curl_certinfo(); \
133 + if(_curl_is_socket_info(_curl_info)) \
134 + if(!_curl_is_arr((arg), curl_socket_t)) \
135 + _curl_easy_getinfo_err_curl_socket(); \
136 + } \
137 + curl_easy_getinfo(handle, _curl_info, arg); \
138 +})
139 +
140 +/* TODO: typechecking for curl_share_setopt() and curl_multi_setopt(),
141 + * for now just make sure that the functions are called with three
142 + * arguments
143 + */
144 +#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)
145 +#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param)
146 +
147 +
148 +/* the actual warnings, triggered by calling the _curl_easy_setopt_err*
149 + * functions */
150 +
151 +/* To define a new warning, use _CURL_WARNING(identifier, "message") */
152 +#define _CURL_WARNING(id, message) \
153 + static void __attribute__((__warning__(message))) \
154 + __attribute__((__unused__)) __attribute__((__noinline__)) \
155 + id(void) { __asm__(""); }
156 +
157 +_CURL_WARNING(_curl_easy_setopt_err_long,
158 + "curl_easy_setopt expects a long argument for this option")
159 +_CURL_WARNING(_curl_easy_setopt_err_curl_off_t,
160 + "curl_easy_setopt expects a curl_off_t argument for this option")
161 +_CURL_WARNING(_curl_easy_setopt_err_string,
162 + "curl_easy_setopt expects a "
163 + "string ('char *' or char[]) argument for this option"
164 + )
165 +_CURL_WARNING(_curl_easy_setopt_err_write_callback,
166 + "curl_easy_setopt expects a curl_write_callback argument for this option")
167 +_CURL_WARNING(_curl_easy_setopt_err_read_cb,
168 + "curl_easy_setopt expects a curl_read_callback argument for this option")
169 +_CURL_WARNING(_curl_easy_setopt_err_ioctl_cb,
170 + "curl_easy_setopt expects a curl_ioctl_callback argument for this option")
171 +_CURL_WARNING(_curl_easy_setopt_err_sockopt_cb,
172 + "curl_easy_setopt expects a curl_sockopt_callback argument for this option")
173 +_CURL_WARNING(_curl_easy_setopt_err_opensocket_cb,
174 + "curl_easy_setopt expects a "
175 + "curl_opensocket_callback argument for this option"
176 + )
177 +_CURL_WARNING(_curl_easy_setopt_err_progress_cb,
178 + "curl_easy_setopt expects a curl_progress_callback argument for this option")
179 +_CURL_WARNING(_curl_easy_setopt_err_debug_cb,
180 + "curl_easy_setopt expects a curl_debug_callback argument for this option")
181 +_CURL_WARNING(_curl_easy_setopt_err_ssl_ctx_cb,
182 + "curl_easy_setopt expects a curl_ssl_ctx_callback argument for this option")
183 +_CURL_WARNING(_curl_easy_setopt_err_conv_cb,
184 + "curl_easy_setopt expects a curl_conv_callback argument for this option")
185 +_CURL_WARNING(_curl_easy_setopt_err_seek_cb,
186 + "curl_easy_setopt expects a curl_seek_callback argument for this option")
187 +_CURL_WARNING(_curl_easy_setopt_err_cb_data,
188 + "curl_easy_setopt expects a "
189 + "private data pointer as argument for this option")
190 +_CURL_WARNING(_curl_easy_setopt_err_error_buffer,
191 + "curl_easy_setopt expects a "
192 + "char buffer of CURL_ERROR_SIZE as argument for this option")
193 +_CURL_WARNING(_curl_easy_setopt_err_FILE,
194 + "curl_easy_setopt expects a 'FILE *' argument for this option")
195 +_CURL_WARNING(_curl_easy_setopt_err_postfields,
196 + "curl_easy_setopt expects a 'void *' or 'char *' argument for this option")
197 +_CURL_WARNING(_curl_easy_setopt_err_curl_httpost,
198 + "curl_easy_setopt expects a 'struct curl_httppost *' "
199 + "argument for this option")
200 +_CURL_WARNING(_curl_easy_setopt_err_curl_slist,
201 + "curl_easy_setopt expects a 'struct curl_slist *' argument for this option")
202 +_CURL_WARNING(_curl_easy_setopt_err_CURLSH,
203 + "curl_easy_setopt expects a CURLSH* argument for this option")
204 +
205 +_CURL_WARNING(_curl_easy_getinfo_err_string,
206 + "curl_easy_getinfo expects a pointer to 'char *' for this info")
207 +_CURL_WARNING(_curl_easy_getinfo_err_long,
208 + "curl_easy_getinfo expects a pointer to long for this info")
209 +_CURL_WARNING(_curl_easy_getinfo_err_double,
210 + "curl_easy_getinfo expects a pointer to double for this info")
211 +_CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
212 + "curl_easy_getinfo expects a pointer to 'struct curl_slist *' for this info")
213 +_CURL_WARNING(_curl_easy_getinfo_err_curl_tlssesssioninfo,
214 + "curl_easy_getinfo expects a pointer to "
215 + "'struct curl_tlssessioninfo *' for this info")
216 +_CURL_WARNING(_curl_easy_getinfo_err_curl_certinfo,
217 + "curl_easy_getinfo expects a pointer to "
218 + "'struct curl_certinfo *' for this info")
219 +_CURL_WARNING(_curl_easy_getinfo_err_curl_socket,
220 + "curl_easy_getinfo expects a pointer to curl_socket_t for this info")
221 +
222 +/* groups of curl_easy_setops options that take the same type of argument */
223 +
224 +/* To add a new option to one of the groups, just add
225 + * (option) == CURLOPT_SOMETHING
226 + * to the or-expression. If the option takes a long or curl_off_t, you don't
227 + * have to do anything
228 + */
229 +
230 +/* evaluates to true if option takes a long argument */
231 +#define _curl_is_long_option(option) \
232 + (0 < (option) && (option) < CURLOPTTYPE_OBJECTPOINT)
233 +
234 +#define _curl_is_off_t_option(option) \
235 + ((option) > CURLOPTTYPE_OFF_T)
236 +
237 +/* evaluates to true if option takes a char* argument */
238 +#define _curl_is_string_option(option) \
239 + ((option) == CURLOPT_ABSTRACT_UNIX_SOCKET || \
240 + (option) == CURLOPT_ACCEPT_ENCODING || \
241 + (option) == CURLOPT_CAINFO || \
242 + (option) == CURLOPT_CAPATH || \
243 + (option) == CURLOPT_COOKIE || \
244 + (option) == CURLOPT_COOKIEFILE || \
245 + (option) == CURLOPT_COOKIEJAR || \
246 + (option) == CURLOPT_COOKIELIST || \
247 + (option) == CURLOPT_CRLFILE || \
248 + (option) == CURLOPT_CUSTOMREQUEST || \
249 + (option) == CURLOPT_DEFAULT_PROTOCOL || \
250 + (option) == CURLOPT_DNS_INTERFACE || \
251 + (option) == CURLOPT_DNS_LOCAL_IP4 || \
252 + (option) == CURLOPT_DNS_LOCAL_IP6 || \
253 + (option) == CURLOPT_DNS_SERVERS || \
254 + (option) == CURLOPT_EGDSOCKET || \
255 + (option) == CURLOPT_FTPPORT || \
256 + (option) == CURLOPT_FTP_ACCOUNT || \
257 + (option) == CURLOPT_FTP_ALTERNATIVE_TO_USER || \
258 + (option) == CURLOPT_INTERFACE || \
259 + (option) == CURLOPT_ISSUERCERT || \
260 + (option) == CURLOPT_KEYPASSWD || \
261 + (option) == CURLOPT_KRBLEVEL || \
262 + (option) == CURLOPT_LOGIN_OPTIONS || \
263 + (option) == CURLOPT_MAIL_AUTH || \
264 + (option) == CURLOPT_MAIL_FROM || \
265 + (option) == CURLOPT_NETRC_FILE || \
266 + (option) == CURLOPT_NOPROXY || \
267 + (option) == CURLOPT_PASSWORD || \
268 + (option) == CURLOPT_PINNEDPUBLICKEY || \
269 + (option) == CURLOPT_PRE_PROXY || \
270 + (option) == CURLOPT_PROXY || \
271 + (option) == CURLOPT_PROXYPASSWORD || \
272 + (option) == CURLOPT_PROXYUSERNAME || \
273 + (option) == CURLOPT_PROXYUSERPWD || \
274 + (option) == CURLOPT_PROXY_CAINFO || \
275 + (option) == CURLOPT_PROXY_CAPATH || \
276 + (option) == CURLOPT_PROXY_CRLFILE || \
277 + (option) == CURLOPT_PROXY_KEYPASSWD || \
278 + (option) == CURLOPT_PROXY_PINNEDPUBLICKEY || \
279 + (option) == CURLOPT_PROXY_SERVICE_NAME || \
280 + (option) == CURLOPT_PROXY_SSLCERT || \
281 + (option) == CURLOPT_PROXY_SSLCERTTYPE || \
282 + (option) == CURLOPT_PROXY_SSLKEY || \
283 + (option) == CURLOPT_PROXY_SSLKEYTYPE || \
284 + (option) == CURLOPT_PROXY_SSL_CIPHER_LIST || \
285 + (option) == CURLOPT_PROXY_TLSAUTH_PASSWORD || \
286 + (option) == CURLOPT_PROXY_TLSAUTH_USERNAME || \
287 + (option) == CURLOPT_PROXY_TLSAUTH_TYPE || \
288 + (option) == CURLOPT_RANDOM_FILE || \
289 + (option) == CURLOPT_RANGE || \
290 + (option) == CURLOPT_REFERER || \
291 + (option) == CURLOPT_RTSP_SESSION_ID || \
292 + (option) == CURLOPT_RTSP_STREAM_URI || \
293 + (option) == CURLOPT_RTSP_TRANSPORT || \
294 + (option) == CURLOPT_SERVICE_NAME || \
295 + (option) == CURLOPT_SOCKS5_GSSAPI_SERVICE || \
296 + (option) == CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 || \
297 + (option) == CURLOPT_SSH_KNOWNHOSTS || \
298 + (option) == CURLOPT_SSH_PRIVATE_KEYFILE || \
299 + (option) == CURLOPT_SSH_PUBLIC_KEYFILE || \
300 + (option) == CURLOPT_SSLCERT || \
301 + (option) == CURLOPT_SSLCERTTYPE || \
302 + (option) == CURLOPT_SSLENGINE || \
303 + (option) == CURLOPT_SSLKEY || \
304 + (option) == CURLOPT_SSLKEYTYPE || \
305 + (option) == CURLOPT_SSL_CIPHER_LIST || \
306 + (option) == CURLOPT_TLSAUTH_PASSWORD || \
307 + (option) == CURLOPT_TLSAUTH_TYPE || \
308 + (option) == CURLOPT_TLSAUTH_USERNAME || \
309 + (option) == CURLOPT_UNIX_SOCKET_PATH || \
310 + (option) == CURLOPT_URL || \
311 + (option) == CURLOPT_USERAGENT || \
312 + (option) == CURLOPT_USERNAME || \
313 + (option) == CURLOPT_USERPWD || \
314 + (option) == CURLOPT_XOAUTH2_BEARER || \
315 + 0)
316 +
317 +/* evaluates to true if option takes a curl_write_callback argument */
318 +#define _curl_is_write_cb_option(option) \
319 + ((option) == CURLOPT_HEADERFUNCTION || \
320 + (option) == CURLOPT_WRITEFUNCTION)
321 +
322 +/* evaluates to true if option takes a curl_conv_callback argument */
323 +#define _curl_is_conv_cb_option(option) \
324 + ((option) == CURLOPT_CONV_TO_NETWORK_FUNCTION || \
325 + (option) == CURLOPT_CONV_FROM_NETWORK_FUNCTION || \
326 + (option) == CURLOPT_CONV_FROM_UTF8_FUNCTION)
327 +
328 +/* evaluates to true if option takes a data argument to pass to a callback */
329 +#define _curl_is_cb_data_option(option) \
330 + ((option) == CURLOPT_CHUNK_DATA || \
331 + (option) == CURLOPT_CLOSESOCKETDATA || \
332 + (option) == CURLOPT_DEBUGDATA || \
333 + (option) == CURLOPT_FNMATCH_DATA || \
334 + (option) == CURLOPT_HEADERDATA || \
335 + (option) == CURLOPT_INTERLEAVEDATA || \
336 + (option) == CURLOPT_IOCTLDATA || \
337 + (option) == CURLOPT_OPENSOCKETDATA || \
338 + (option) == CURLOPT_PRIVATE || \
339 + (option) == CURLOPT_PROGRESSDATA || \
340 + (option) == CURLOPT_READDATA || \
341 + (option) == CURLOPT_SEEKDATA || \
342 + (option) == CURLOPT_SOCKOPTDATA || \
343 + (option) == CURLOPT_SSH_KEYDATA || \
344 + (option) == CURLOPT_SSL_CTX_DATA || \
345 + (option) == CURLOPT_WRITEDATA || \
346 + 0)
347 +
348 +/* evaluates to true if option takes a POST data argument (void* or char*) */
349 +#define _curl_is_postfields_option(option) \
350 + ((option) == CURLOPT_POSTFIELDS || \
351 + (option) == CURLOPT_COPYPOSTFIELDS || \
352 + 0)
353 +
354 +/* evaluates to true if option takes a struct curl_slist * argument */
355 +#define _curl_is_slist_option(option) \
356 + ((option) == CURLOPT_HTTP200ALIASES || \
357 + (option) == CURLOPT_HTTPHEADER || \
358 + (option) == CURLOPT_MAIL_RCPT || \
359 + (option) == CURLOPT_POSTQUOTE || \
360 + (option) == CURLOPT_PREQUOTE || \
361 + (option) == CURLOPT_PROXYHEADER || \
362 + (option) == CURLOPT_QUOTE || \
363 + (option) == CURLOPT_RESOLVE || \
364 + (option) == CURLOPT_TELNETOPTIONS || \
365 + 0)
366 +
367 +/* groups of curl_easy_getinfo infos that take the same type of argument */
368 +
369 +/* evaluates to true if info expects a pointer to char * argument */
370 +#define _curl_is_string_info(info) \
371 + (CURLINFO_STRING < (info) && (info) < CURLINFO_LONG)
372 +
373 +/* evaluates to true if info expects a pointer to long argument */
374 +#define _curl_is_long_info(info) \
375 + (CURLINFO_LONG < (info) && (info) < CURLINFO_DOUBLE)
376 +
377 +/* evaluates to true if info expects a pointer to double argument */
378 +#define _curl_is_double_info(info) \
379 + (CURLINFO_DOUBLE < (info) && (info) < CURLINFO_SLIST)
380 +
381 +/* true if info expects a pointer to struct curl_slist * argument */
382 +#define _curl_is_slist_info(info) \
383 + (((info) == CURLINFO_SSL_ENGINES) || ((info) == CURLINFO_COOKIELIST))
384 +
385 +/* true if info expects a pointer to struct curl_tlssessioninfo * argument */
386 +#define _curl_is_tlssessioninfo_info(info) \
387 + (((info) == CURLINFO_TLS_SSL_PTR) || ((info) == CURLINFO_TLS_SESSION))
388 +
389 +/* true if info expects a pointer to struct curl_certinfo * argument */
390 +#define _curl_is_certinfo_info(info) ((info) == CURLINFO_CERTINFO)
391 +
392 +/* true if info expects a pointer to struct curl_socket_t argument */
393 +#define _curl_is_socket_info(info) \
394 + (CURLINFO_SOCKET < (info))
395 +
396 +
397 +/* typecheck helpers -- check whether given expression has requested type*/
398 +
399 +/* For pointers, you can use the _curl_is_ptr/_curl_is_arr macros,
400 + * otherwise define a new macro. Search for __builtin_types_compatible_p
401 + * in the GCC manual.
402 + * NOTE: these macros MUST NOT EVALUATE their arguments! The argument is
403 + * the actual expression passed to the curl_easy_setopt macro. This
404 + * means that you can only apply the sizeof and __typeof__ operators, no
405 + * == or whatsoever.
406 + */
407 +
408 +/* XXX: should evaluate to true iff expr is a pointer */
409 +#define _curl_is_any_ptr(expr) \
410 + (sizeof(expr) == sizeof(void *))
411 +
412 +/* evaluates to true if expr is NULL */
413 +/* XXX: must not evaluate expr, so this check is not accurate */
414 +#define _curl_is_NULL(expr) \
415 + (__builtin_types_compatible_p(__typeof__(expr), __typeof__(NULL)))
416 +
417 +/* evaluates to true if expr is type*, const type* or NULL */
418 +#define _curl_is_ptr(expr, type) \
419 + (_curl_is_NULL(expr) || \
420 + __builtin_types_compatible_p(__typeof__(expr), type *) || \
421 + __builtin_types_compatible_p(__typeof__(expr), const type *))
422 +
423 +/* evaluates to true if expr is one of type[], type*, NULL or const type* */
424 +#define _curl_is_arr(expr, type) \
425 + (_curl_is_ptr((expr), type) || \
426 + __builtin_types_compatible_p(__typeof__(expr), type []))
427 +
428 +/* evaluates to true if expr is a string */
429 +#define _curl_is_string(expr) \
430 + (_curl_is_arr((expr), char) || \
431 + _curl_is_arr((expr), signed char) || \
432 + _curl_is_arr((expr), unsigned char))
433 +
434 +/* evaluates to true if expr is a long (no matter the signedness)
435 + * XXX: for now, int is also accepted (and therefore short and char, which
436 + * are promoted to int when passed to a variadic function) */
437 +#define _curl_is_long(expr) \
438 + (__builtin_types_compatible_p(__typeof__(expr), long) || \
439 + __builtin_types_compatible_p(__typeof__(expr), signed long) || \
440 + __builtin_types_compatible_p(__typeof__(expr), unsigned long) || \
441 + __builtin_types_compatible_p(__typeof__(expr), int) || \
442 + __builtin_types_compatible_p(__typeof__(expr), signed int) || \
443 + __builtin_types_compatible_p(__typeof__(expr), unsigned int) || \
444 + __builtin_types_compatible_p(__typeof__(expr), short) || \
445 + __builtin_types_compatible_p(__typeof__(expr), signed short) || \
446 + __builtin_types_compatible_p(__typeof__(expr), unsigned short) || \
447 + __builtin_types_compatible_p(__typeof__(expr), char) || \
448 + __builtin_types_compatible_p(__typeof__(expr), signed char) || \
449 + __builtin_types_compatible_p(__typeof__(expr), unsigned char))
450 +
451 +/* evaluates to true if expr is of type curl_off_t */
452 +#define _curl_is_off_t(expr) \
453 + (__builtin_types_compatible_p(__typeof__(expr), curl_off_t))
454 +
455 +/* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */
456 +/* XXX: also check size of an char[] array? */
457 +#define _curl_is_error_buffer(expr) \
458 + (_curl_is_NULL(expr) || \
459 + __builtin_types_compatible_p(__typeof__(expr), char *) || \
460 + __builtin_types_compatible_p(__typeof__(expr), char[]))
461 +
462 +/* evaluates to true if expr is of type (const) void* or (const) FILE* */
463 +#if 0
464 +#define _curl_is_cb_data(expr) \
465 + (_curl_is_ptr((expr), void) || \
466 + _curl_is_ptr((expr), FILE))
467 +#else /* be less strict */
468 +#define _curl_is_cb_data(expr) \
469 + _curl_is_any_ptr(expr)
470 +#endif
471 +
472 +/* evaluates to true if expr is of type FILE* */
473 +#define _curl_is_FILE(expr) \
474 + (_curl_is_NULL(expr) || \
475 + (__builtin_types_compatible_p(__typeof__(expr), FILE *)))
476 +
477 +/* evaluates to true if expr can be passed as POST data (void* or char*) */
478 +#define _curl_is_postfields(expr) \
479 + (_curl_is_ptr((expr), void) || \
480 + _curl_is_arr((expr), char))
481 +
482 +/* FIXME: the whole callback checking is messy...
483 + * The idea is to tolerate char vs. void and const vs. not const
484 + * pointers in arguments at least
485 + */
486 +/* helper: __builtin_types_compatible_p distinguishes between functions and
487 + * function pointers, hide it */
488 +#define _curl_callback_compatible(func, type) \
489 + (__builtin_types_compatible_p(__typeof__(func), type) || \
490 + __builtin_types_compatible_p(__typeof__(func) *, type))
491 +
492 +/* evaluates to true if expr is of type curl_read_callback or "similar" */
493 +#define _curl_is_read_cb(expr) \
494 + (_curl_is_NULL(expr) || \
495 + _curl_callback_compatible((expr), __typeof__(fread) *) || \
496 + _curl_callback_compatible((expr), curl_read_callback) || \
497 + _curl_callback_compatible((expr), _curl_read_callback1) || \
498 + _curl_callback_compatible((expr), _curl_read_callback2) || \
499 + _curl_callback_compatible((expr), _curl_read_callback3) || \
500 + _curl_callback_compatible((expr), _curl_read_callback4) || \
501 + _curl_callback_compatible((expr), _curl_read_callback5) || \
502 + _curl_callback_compatible((expr), _curl_read_callback6))
503 +typedef size_t (*_curl_read_callback1)(char *, size_t, size_t, void *);
504 +typedef size_t (*_curl_read_callback2)(char *, size_t, size_t, const void *);
505 +typedef size_t (*_curl_read_callback3)(char *, size_t, size_t, FILE *);
506 +typedef size_t (*_curl_read_callback4)(void *, size_t, size_t, void *);
507 +typedef size_t (*_curl_read_callback5)(void *, size_t, size_t, const void *);
508 +typedef size_t (*_curl_read_callback6)(void *, size_t, size_t, FILE *);
509 +
510 +/* evaluates to true if expr is of type curl_write_callback or "similar" */
511 +#define _curl_is_write_cb(expr) \
512 + (_curl_is_read_cb(expr) || \
513 + _curl_callback_compatible((expr), __typeof__(fwrite) *) || \
514 + _curl_callback_compatible((expr), curl_write_callback) || \
515 + _curl_callback_compatible((expr), _curl_write_callback1) || \
516 + _curl_callback_compatible((expr), _curl_write_callback2) || \
517 + _curl_callback_compatible((expr), _curl_write_callback3) || \
518 + _curl_callback_compatible((expr), _curl_write_callback4) || \
519 + _curl_callback_compatible((expr), _curl_write_callback5) || \
520 + _curl_callback_compatible((expr), _curl_write_callback6))
521 +typedef size_t (*_curl_write_callback1)(const char *, size_t, size_t, void *);
522 +typedef size_t (*_curl_write_callback2)(const char *, size_t, size_t,
523 + const void *);
524 +typedef size_t (*_curl_write_callback3)(const char *, size_t, size_t, FILE *);
525 +typedef size_t (*_curl_write_callback4)(const void *, size_t, size_t, void *);
526 +typedef size_t (*_curl_write_callback5)(const void *, size_t, size_t,
527 + const void *);
528 +typedef size_t (*_curl_write_callback6)(const void *, size_t, size_t, FILE *);
529 +
530 +/* evaluates to true if expr is of type curl_ioctl_callback or "similar" */
531 +#define _curl_is_ioctl_cb(expr) \
532 + (_curl_is_NULL(expr) || \
533 + _curl_callback_compatible((expr), curl_ioctl_callback) || \
534 + _curl_callback_compatible((expr), _curl_ioctl_callback1) || \
535 + _curl_callback_compatible((expr), _curl_ioctl_callback2) || \
536 + _curl_callback_compatible((expr), _curl_ioctl_callback3) || \
537 + _curl_callback_compatible((expr), _curl_ioctl_callback4))
538 +typedef curlioerr (*_curl_ioctl_callback1)(CURL *, int, void *);
539 +typedef curlioerr (*_curl_ioctl_callback2)(CURL *, int, const void *);
540 +typedef curlioerr (*_curl_ioctl_callback3)(CURL *, curliocmd, void *);
541 +typedef curlioerr (*_curl_ioctl_callback4)(CURL *, curliocmd, const void *);
542 +
543 +/* evaluates to true if expr is of type curl_sockopt_callback or "similar" */
544 +#define _curl_is_sockopt_cb(expr) \
545 + (_curl_is_NULL(expr) || \
546 + _curl_callback_compatible((expr), curl_sockopt_callback) || \
547 + _curl_callback_compatible((expr), _curl_sockopt_callback1) || \
548 + _curl_callback_compatible((expr), _curl_sockopt_callback2))
549 +typedef int (*_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype);
550 +typedef int (*_curl_sockopt_callback2)(const void *, curl_socket_t,
551 + curlsocktype);
552 +
553 +/* evaluates to true if expr is of type curl_opensocket_callback or
554 + "similar" */
555 +#define _curl_is_opensocket_cb(expr) \
556 + (_curl_is_NULL(expr) || \
557 + _curl_callback_compatible((expr), curl_opensocket_callback) || \
558 + _curl_callback_compatible((expr), _curl_opensocket_callback1) || \
559 + _curl_callback_compatible((expr), _curl_opensocket_callback2) || \
560 + _curl_callback_compatible((expr), _curl_opensocket_callback3) || \
561 + _curl_callback_compatible((expr), _curl_opensocket_callback4))
562 +typedef curl_socket_t (*_curl_opensocket_callback1)
563 + (void *, curlsocktype, struct curl_sockaddr *);
564 +typedef curl_socket_t (*_curl_opensocket_callback2)
565 + (void *, curlsocktype, const struct curl_sockaddr *);
566 +typedef curl_socket_t (*_curl_opensocket_callback3)
567 + (const void *, curlsocktype, struct curl_sockaddr *);
568 +typedef curl_socket_t (*_curl_opensocket_callback4)
569 + (const void *, curlsocktype, const struct curl_sockaddr *);
570 +
571 +/* evaluates to true if expr is of type curl_progress_callback or "similar" */
572 +#define _curl_is_progress_cb(expr) \
573 + (_curl_is_NULL(expr) || \
574 + _curl_callback_compatible((expr), curl_progress_callback) || \
575 + _curl_callback_compatible((expr), _curl_progress_callback1) || \
576 + _curl_callback_compatible((expr), _curl_progress_callback2))
577 +typedef int (*_curl_progress_callback1)(void *,
578 + double, double, double, double);
579 +typedef int (*_curl_progress_callback2)(const void *,
580 + double, double, double, double);
581 +
582 +/* evaluates to true if expr is of type curl_debug_callback or "similar" */
583 +#define _curl_is_debug_cb(expr) \
584 + (_curl_is_NULL(expr) || \
585 + _curl_callback_compatible((expr), curl_debug_callback) || \
586 + _curl_callback_compatible((expr), _curl_debug_callback1) || \
587 + _curl_callback_compatible((expr), _curl_debug_callback2) || \
588 + _curl_callback_compatible((expr), _curl_debug_callback3) || \
589 + _curl_callback_compatible((expr), _curl_debug_callback4) || \
590 + _curl_callback_compatible((expr), _curl_debug_callback5) || \
591 + _curl_callback_compatible((expr), _curl_debug_callback6) || \
592 + _curl_callback_compatible((expr), _curl_debug_callback7) || \
593 + _curl_callback_compatible((expr), _curl_debug_callback8))
594 +typedef int (*_curl_debug_callback1) (CURL *,
595 + curl_infotype, char *, size_t, void *);
596 +typedef int (*_curl_debug_callback2) (CURL *,
597 + curl_infotype, char *, size_t, const void *);
598 +typedef int (*_curl_debug_callback3) (CURL *,
599 + curl_infotype, const char *, size_t, void *);
600 +typedef int (*_curl_debug_callback4) (CURL *,
601 + curl_infotype, const char *, size_t, const void *);
602 +typedef int (*_curl_debug_callback5) (CURL *,
603 + curl_infotype, unsigned char *, size_t, void *);
604 +typedef int (*_curl_debug_callback6) (CURL *,
605 + curl_infotype, unsigned char *, size_t, const void *);
606 +typedef int (*_curl_debug_callback7) (CURL *,
607 + curl_infotype, const unsigned char *, size_t, void *);
608 +typedef int (*_curl_debug_callback8) (CURL *,
609 + curl_infotype, const unsigned char *, size_t, const void *);
610 +
611 +/* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */
612 +/* this is getting even messier... */
613 +#define _curl_is_ssl_ctx_cb(expr) \
614 + (_curl_is_NULL(expr) || \
615 + _curl_callback_compatible((expr), curl_ssl_ctx_callback) || \
616 + _curl_callback_compatible((expr), _curl_ssl_ctx_callback1) || \
617 + _curl_callback_compatible((expr), _curl_ssl_ctx_callback2) || \
618 + _curl_callback_compatible((expr), _curl_ssl_ctx_callback3) || \
619 + _curl_callback_compatible((expr), _curl_ssl_ctx_callback4) || \
620 + _curl_callback_compatible((expr), _curl_ssl_ctx_callback5) || \
621 + _curl_callback_compatible((expr), _curl_ssl_ctx_callback6) || \
622 + _curl_callback_compatible((expr), _curl_ssl_ctx_callback7) || \
623 + _curl_callback_compatible((expr), _curl_ssl_ctx_callback8))
624 +typedef CURLcode (*_curl_ssl_ctx_callback1)(CURL *, void *, void *);
625 +typedef CURLcode (*_curl_ssl_ctx_callback2)(CURL *, void *, const void *);
626 +typedef CURLcode (*_curl_ssl_ctx_callback3)(CURL *, const void *, void *);
627 +typedef CURLcode (*_curl_ssl_ctx_callback4)(CURL *, const void *,
628 + const void *);
629 +#ifdef HEADER_SSL_H
630 +/* hack: if we included OpenSSL's ssl.h, we know about SSL_CTX
631 + * this will of course break if we're included before OpenSSL headers...
632 + */
633 +typedef CURLcode (*_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *);
634 +typedef CURLcode (*_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *);
635 +typedef CURLcode (*_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *);
636 +typedef CURLcode (*_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX,
637 + const void *);
638 +#else
639 +typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5;
640 +typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback6;
641 +typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback7;
642 +typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback8;
643 +#endif
644 +
645 +/* evaluates to true if expr is of type curl_conv_callback or "similar" */
646 +#define _curl_is_conv_cb(expr) \
647 + (_curl_is_NULL(expr) || \
648 + _curl_callback_compatible((expr), curl_conv_callback) || \
649 + _curl_callback_compatible((expr), _curl_conv_callback1) || \
650 + _curl_callback_compatible((expr), _curl_conv_callback2) || \
651 + _curl_callback_compatible((expr), _curl_conv_callback3) || \
652 + _curl_callback_compatible((expr), _curl_conv_callback4))
653 +typedef CURLcode (*_curl_conv_callback1)(char *, size_t length);
654 +typedef CURLcode (*_curl_conv_callback2)(const char *, size_t length);
655 +typedef CURLcode (*_curl_conv_callback3)(void *, size_t length);
656 +typedef CURLcode (*_curl_conv_callback4)(const void *, size_t length);
657 +
658 +/* evaluates to true if expr is of type curl_seek_callback or "similar" */
659 +#define _curl_is_seek_cb(expr) \
660 + (_curl_is_NULL(expr) || \
661 + _curl_callback_compatible((expr), curl_seek_callback) || \
662 + _curl_callback_compatible((expr), _curl_seek_callback1) || \
663 + _curl_callback_compatible((expr), _curl_seek_callback2))
664 +typedef CURLcode (*_curl_seek_callback1)(void *, curl_off_t, int);
665 +typedef CURLcode (*_curl_seek_callback2)(const void *, curl_off_t, int);
666 +
667 +
668 +#endif /* __CURL_TYPECHECK_GCC_H */
No preview for this file type
No preview for this file type
...@@ -2,8 +2,36 @@ ...@@ -2,8 +2,36 @@
2 #include "PaperGraphWidget.h" 2 #include "PaperGraphWidget.h"
3 #include "MainWindow.h" 3 #include "MainWindow.h"
4 4
5 +#include <stdio.h>
6 +#include <curl/curl.h>
7 +
5 int main(int argc, char *argv[]) 8 int main(int argc, char *argv[])
6 { 9 {
10 + if (1) {
11 + CURL *curl;
12 + CURLcode res;
13 +
14 + curl = curl_easy_init();
15 + if (curl) {
16 + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
17 + /* example.com is redirected, so we tell libcurl to follow redirection */
18 + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
19 +
20 + /* Perform the request, res will get the return code */
21 + res = curl_easy_perform(curl);
22 + /* Check for errors */
23 + if (res != CURLE_OK)
24 + fprintf(stderr, "curl_easy_perform() failed: %s\n",
25 + curl_easy_strerror(res));
26 +
27 + /* always cleanup */
28 + curl_easy_cleanup(curl);
29 + }
30 + return 0;
31 + }
32 +
33 +
34 +
7 QApplication app(argc, argv); 35 QApplication app(argc, argv);
8 36
9 MainWindow m; 37 MainWindow m;
......