#if LIBCURL_VERSION_NUM >= 0x071202
REGISTER_CURL_CONSTANT(CURLINFO_REDIRECT_URL);
#endif
+#if LIBCURL_VERSION_NUM >= 0x071300 /* 7.19.0 */
+ REGISTER_CURL_CONSTANT(CURLINFO_PRIMARY_IP);
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071500 /* 7.21.0 */
+ REGISTER_CURL_CONSTANT(CURLINFO_PRIMARY_PORT);
+ REGISTER_CURL_CONSTANT(CURLINFO_LOCAL_IP);
+ REGISTER_CURL_CONSTANT(CURLINFO_LOCAL_PORT);
+#endif
/* cURL protocol constants (curl_version) */
create_certinfo(ci, listcode TSRMLS_CC);
CAAZ("certinfo", listcode);
}
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071300 /* 7.19.0 */
if (curl_easy_getinfo(ch->cp, CURLINFO_PRIMARY_IP, &s_code) == CURLE_OK) {
CAAS("primary_ip", s_code);
}
} else {
switch (option) {
/* string variable types */
-#if LIBCURL_VERSION_NUM >= 0x071500
+#if LIBCURL_VERSION_NUM >= 0x071300 /* 7.19.0 */
case CURLINFO_PRIMARY_IP:
#endif
-#if LIBCURL_VERSION_NUM >= 0x071500
+#if LIBCURL_VERSION_NUM >= 0x071500 /* 7.21.0 */
case CURLINFO_LOCAL_IP:
#endif
case CURLINFO_PRIVATE:
break;
}
/* Long variable types */
-#if LIBCURL_VERSION_NUM >= 0x071500
+#if LIBCURL_VERSION_NUM >= 0x071500 /* 7.21.0 */
case CURLINFO_PRIMARY_PORT:
case CURLINFO_LOCAL_PORT:
#endif