]> granicus.if.org Git - php/commitdiff
Fixed the libcurl version checking for CURLOPT_MAIL_AUTH
authorYour Name <william.betts@gmail.com>
Sun, 27 May 2012 07:21:08 +0000 (00:21 -0700)
committerYour Name <william.betts@gmail.com>
Sun, 27 May 2012 07:21:08 +0000 (00:21 -0700)
ext/curl/interface.c

index 09f497452ca9a52c7972415d1ef764e3a84cdb2c..f6e0b053273b1fed68ac7941c3a49ce013d4e8e1 100644 (file)
@@ -1036,7 +1036,6 @@ PHP_MINIT_FUNCTION(curl)
        REGISTER_CURL_CONSTANT(CURLINFO_RTSP_SERVER_CSEQ);
        REGISTER_CURL_CONSTANT(CURLINFO_RTSP_SESSION_ID);
        REGISTER_CURL_CONSTANT(CURLOPT_FTP_USE_PRET);
-       REGISTER_CURL_CONSTANT(CURLOPT_MAIL_AUTH);
        REGISTER_CURL_CONSTANT(CURLOPT_MAIL_FROM);
        REGISTER_CURL_CONSTANT(CURLOPT_MAIL_RCPT);
        REGISTER_CURL_CONSTANT(CURLOPT_RTSP_CLIENT_CSEQ);
@@ -1107,6 +1106,10 @@ PHP_MINIT_FUNCTION(curl)
        REGISTER_CURL_CONSTANT(CURLOPT_DNS_SERVERS);
 #endif
 
+#if LIBCURL_VERSION_NUM >= 0x071900 /* Available since 7.25.0 */
+       REGISTER_CURL_CONSTANT(CURLOPT_MAIL_AUTH);
+#endif
+
 #if CURLOPT_FTPASCII != 0
        REGISTER_CURL_CONSTANT(CURLOPT_FTPASCII);
 #endif