]> granicus.if.org Git - curl/commitdiff
smb: Disable SMB when 64-bit integers are not supported
authorSteve Holme <steve_holme@hotmail.com>
Fri, 12 Dec 2014 22:08:03 +0000 (22:08 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Fri, 12 Dec 2014 22:34:18 +0000 (22:34 +0000)
This fixes compilation issues with compilers that don't support 64-bit
integers through long long or __int64.

lib/smb.c
lib/smb.h
lib/url.c
lib/version.c

index 4d556488ebe27bdcbd952587d08b7343d72c3a62..5e329c154d1414e32efe26a8ceadb7680ee0562a 100644 (file)
--- a/lib/smb.c
+++ b/lib/smb.c
@@ -22,7 +22,8 @@
 
 #include "curl_setup.h"
 
-#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM)
+#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) && \
+    (CURL_SIZEOF_CURL_OFF_T > 4)
 
 #if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO)
 
@@ -902,4 +903,4 @@ static CURLcode smb_parse_url_path(struct connectdata *conn)
 
 #endif /* !USE_WINDOWS_SSPI || USE_WIN32_CRYPTO */
 
-#endif /* CURL_DISABLE_SMB && USE_NTLM */
+#endif /* CURL_DISABLE_SMB && USE_NTLM && CURL_SIZEOF_CURL_OFF_T > 4 */
index 233f4abd602c625e744ebbc195c198667fc3834c..4dd7c9a321a0b502de7d90a3c394b57533b145b8 100644 (file)
--- a/lib/smb.h
+++ b/lib/smb.h
@@ -256,7 +256,8 @@ struct smb_tree_disconnect {
 
 #endif /* BUILDING_CURL_SMB_C */
 
-#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM)
+#if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) && \
+    (CURL_SIZEOF_CURL_OFF_T > 4)
 
 #if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO)
 
@@ -265,6 +266,6 @@ extern const struct Curl_handler Curl_handler_smbs;
 
 #endif /* !USE_WINDOWS_SSPI || USE_WIN32_CRYPTO */
 
-#endif /* CURL_DISABLE_SMB && USE_NTLM */
+#endif /* CURL_DISABLE_SMB && USE_NTLM && CURL_SIZEOF_CURL_OFF_T > 4 */
 
 #endif /* HEADER_CURL_SMB_H */
index d191678ca0565d85b9fc8b6ff75f246946533479..5b7870f32ac90c1f5dc63241490024d357eaf817 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -221,6 +221,7 @@ static const struct Curl_handler * const protocols[] = {
 #endif
 
 #if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) && \
+   (CURL_SIZEOF_CURL_OFF_T > 4) && \
    (!defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO))
   &Curl_handler_smb,
 #ifdef USE_SSL
index 83143f402e0ec2564330ceeba34301360b00f84d..9ac9226655405b1b1af92ae5c61ecc3f47fa88ef 100644 (file)
@@ -217,6 +217,7 @@ static const char * const protocols[] = {
   "sftp",
 #endif
 #if !defined(CURL_DISABLE_SMB) && defined(USE_NTLM) && \
+   (CURL_SIZEOF_CURL_OFF_T > 4) && \
    (!defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO))
   "smb",
 #  ifdef USE_SSL