Skip to content

Commit

Permalink
smb: Disable SMB when 64-bit integers are not supported
Browse files Browse the repository at this point in the history
This fixes compilation issues with compilers that don't support 64-bit
integers through long long or __int64.
  • Loading branch information
captain-caveman2k committed Dec 12, 2014
1 parent 82fdb87 commit 24b30d2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/smb.c
Expand Up @@ -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)

Expand Down Expand Up @@ -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 */
5 changes: 3 additions & 2 deletions lib/smb.h
Expand Up @@ -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)

Expand All @@ -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 */
1 change: 1 addition & 0 deletions lib/url.c
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/version.c
Expand Up @@ -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
Expand Down

0 comments on commit 24b30d2

Please sign in to comment.