From 1e733ffc1103667dd6cf0eae01f5dfd0c84c5108 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 29 Sep 2009 04:38:23 +0000 Subject: [PATCH] 2792. [port] win32: 32/64 bit cleanups. [RT #128244] --- CHANGES | 2 ++ bin/win32/BINDInstall/AccountInfo.cpp | 8 ++++---- bin/win32/BINDInstall/BINDInstall.cpp | 4 ++-- bin/win32/BINDInstall/BINDInstallDlg.cpp | 6 +++--- lib/isc/win32/include/isc/thread.h | 4 ++-- lib/isc/win32/ntgroups.c | 4 ++-- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/CHANGES b/CHANGES index f3926a5c9f..62018c56dd 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +2792. [port] win32: 32/64 bit cleanups. [RT #128244] + 2691. [func] dnssec-signzone: retain the existing NSEC or NSEC3 chain when re-signing a previously-signed zone. Use -u to modify NSEC3 parameters or switch diff --git a/bin/win32/BINDInstall/AccountInfo.cpp b/bin/win32/BINDInstall/AccountInfo.cpp index 5b28a2362d..7503e90d3b 100644 --- a/bin/win32/BINDInstall/AccountInfo.cpp +++ b/bin/win32/BINDInstall/AccountInfo.cpp @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: AccountInfo.cpp,v 1.8 2007/06/19 23:47:07 tbox Exp $ */ +/* $Id: AccountInfo.cpp,v 1.9 2009/09/29 04:37:08 marka Exp $ */ #ifndef UNICODE #define UNICODE @@ -183,8 +183,8 @@ CreateServiceAccount(char *name, char *password) { DWORD dwError = 0; NET_API_STATUS nStatus; - unsigned int namelen = strlen(name); - unsigned int passwdlen = strlen(password); + size_t namelen = strlen(name); + size_t passwdlen = strlen(password); wchar_t AccountName[MAX_NAME_LENGTH]; wchar_t AccountPassword[MAX_NAME_LENGTH]; @@ -251,7 +251,7 @@ AddPrivilegeToAcccount(LPTSTR name, LPWSTR PrivilegeName) { void InitLsaString(PLSA_UNICODE_STRING LsaString, LPWSTR String){ - DWORD StringLength; + size_t StringLength; if (String == NULL) { LsaString->Buffer = NULL; diff --git a/bin/win32/BINDInstall/BINDInstall.cpp b/bin/win32/BINDInstall/BINDInstall.cpp index f9dc5bcac1..3d430e1c3c 100644 --- a/bin/win32/BINDInstall/BINDInstall.cpp +++ b/bin/win32/BINDInstall/BINDInstall.cpp @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: BINDInstall.cpp,v 1.7 2007/06/19 23:47:07 tbox Exp $ */ +/* $Id: BINDInstall.cpp,v 1.8 2009/09/29 04:37:08 marka Exp $ */ /* * Copyright (c) 1999-2000 by Nortel Networks Corporation @@ -88,7 +88,7 @@ BOOL CBINDInstallApp::InitInstance() CBINDInstallDlg dlg; m_pMainWnd = &dlg; - int nResponse = dlg.DoModal(); + INT_PTR nResponse = dlg.DoModal(); if (nResponse == IDOK) { // TODO: Place code here to handle when the dialog is diff --git a/bin/win32/BINDInstall/BINDInstallDlg.cpp b/bin/win32/BINDInstall/BINDInstallDlg.cpp index a09766418f..7fd50d6821 100644 --- a/bin/win32/BINDInstall/BINDInstallDlg.cpp +++ b/bin/win32/BINDInstall/BINDInstallDlg.cpp @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: BINDInstallDlg.cpp,v 1.44 2009/09/01 06:51:47 marka Exp $ */ +/* $Id: BINDInstallDlg.cpp,v 1.45 2009/09/29 04:37:08 marka Exp $ */ /* * Copyright (c) 1999-2000 by Nortel Networks Corporation @@ -238,7 +238,7 @@ BOOL CBINDInstallDlg::OnInitDialog() { char *fptr = &filename[0]; GetModuleFileName(NULL, filename, MAX_PATH); char *dptr = strrchr(filename,'\\'); - int index = dptr - fptr; + size_t index = dptr - fptr; strncpy(dirname, filename, index); dirname[index] = '\0'; CString Dirname(dirname); @@ -970,7 +970,7 @@ void CBINDInstallDlg::RegisterMessages() { /* Add the Event-ID message-file name to the subkey. */ if (RegSetValueEx(hKey, "EventMessageFile", 0, REG_EXPAND_SZ, - (LPBYTE)pszMsgDLL, strlen(pszMsgDLL) + 1) != ERROR_SUCCESS) + (LPBYTE)pszMsgDLL, (DWORD)(strlen(pszMsgDLL) + 1)) != ERROR_SUCCESS) throw(Exception(IDS_ERR_SET_VALUE, GetErrMessage())); /* Set the supported types flags and addit to the subkey. */ diff --git a/lib/isc/win32/include/isc/thread.h b/lib/isc/win32/include/isc/thread.h index 73759ee23c..2eb923b2e6 100644 --- a/lib/isc/win32/include/isc/thread.h +++ b/lib/isc/win32/include/isc/thread.h @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: thread.h,v 1.24 2009/09/25 23:48:13 tbox Exp $ */ +/* $Id: thread.h,v 1.25 2009/09/29 04:37:08 marka Exp $ */ #ifndef ISC_THREAD_H #define ISC_THREAD_H 1 @@ -65,7 +65,7 @@ inline DWORD WaitAbandonedIndex( DWORD dwWaitResult) { typedef HANDLE isc_thread_t; -typedef unsigned int isc_threadresult_t; +typedef DWORD isc_threadresult_t; typedef void * isc_threadarg_t; typedef isc_threadresult_t (WINAPI *isc_threadfunc_t)(isc_threadarg_t); typedef DWORD isc_thread_key_t; diff --git a/lib/isc/win32/ntgroups.c b/lib/isc/win32/ntgroups.c index 351adc5e74..9c3d5acc15 100644 --- a/lib/isc/win32/ntgroups.c +++ b/lib/isc/win32/ntgroups.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: ntgroups.c,v 1.10 2007/06/19 23:47:19 tbox Exp $ */ +/* $Id: ntgroups.c,v 1.11 2009/09/29 04:37:08 marka Exp $ */ /* * The NT Groups have two groups that are not well documented and are @@ -63,7 +63,7 @@ isc_ntsecurity_getaccountgroups(char *username, char **GroupList, DWORD dwTotalEntries = 0; NET_API_STATUS nStatus; DWORD dwTotalCount = 0; - int retlen; + size_t retlen; wchar_t user[MAX_NAME_LENGTH]; retlen = mbstowcs(user, username, MAX_NAME_LENGTH);