Skip to content

Commit

Permalink
ntlm: get rid of unconditional use of long long
Browse files Browse the repository at this point in the history
... since some compilers don't have it and instead use other types, such
as __int64.

Reported by: gkinseyhpw
Closes #478
  • Loading branch information
bagder committed Oct 8, 2015
1 parent da2d3b5 commit 8256b44
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions lib/curl_ntlm_core.c
Expand Up @@ -664,21 +664,18 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash,
unsigned int len = 0;
unsigned char *ptr = NULL;
unsigned char hmac_output[NTLM_HMAC_MD5_LEN];
#if defined(HAVE_LONGLONG)
long long tw;
#else
__int64 tw;
#endif
curl_off_t tw;

CURLcode result = CURLE_OK;

/* Calculate the timestamp */
#ifdef DEBUGBUILD
char *force_timestamp = getenv("CURL_FORCETIME");
if(force_timestamp)
tw = 11644473600ULL * 10000000ULL;
tw = (curl_off_t)11644473600 * 10000000;
else
#endif
tw = ((long long)time(NULL) + 11644473600ULL) * 10000000ULL;
tw = ((curl_off_t)time(NULL) + 11644473600) * 10000000;

/* Calculate the response len */
len = NTLM_HMAC_MD5_LEN + NTLMv2_BLOB_LEN;
Expand Down

0 comments on commit 8256b44

Please sign in to comment.