Replace all deprecate functions like wcsicmp with the new ones, like _wcsicmp in our own code. Define __WINESRC__ or _CRT_NONSTDC_NO_DEPRECATE where neccessary in 3rd party code to silence warnings about deprecated functions, that the upcoming crt header update will create. Remove allowwarnings="true" from telnet.

svn path=/trunk/; revision=38291
This commit is contained in:
Timo Kreuzer 2008-12-23 01:23:25 +00:00
parent 565970f956
commit f6eb8adfb6
22 changed files with 84 additions and 81 deletions

View file

@ -20,91 +20,91 @@ int main(int argc, char **argv)
return 1;
}
if (stricmp(argv[1],"ACCOUNTS")==0)
if (_stricmp(argv[1],"ACCOUNTS")==0)
{
return unimplement();
return unimplemented();
}
if (stricmp(argv[1],"COMPUTER")==0)
if (_stricmp(argv[1],"COMPUTER")==0)
{
return unimplement();
return unimplemented();
}
if (stricmp(argv[1],"CONFIG")==0)
if (_stricmp(argv[1],"CONFIG")==0)
{
return unimplement();
return unimplemented();
}
if (stricmp(argv[1],"CONTINUE")==0)
if (_stricmp(argv[1],"CONTINUE")==0)
{
return unimplement();
return unimplemented();
}
if (stricmp(argv[1],"FILE")==0)
if (_stricmp(argv[1],"FILE")==0)
{
return unimplement();
return unimplemented();
}
if (stricmp(argv[1],"GROUP")==0)
if (_stricmp(argv[1],"GROUP")==0)
{
return unimplement();
return unimplemented();
}
if (stricmp(argv[1],"HELP")==0)
if (_stricmp(argv[1],"HELP")==0)
{
return cmdHelp(argc,&argv[1]);
}
if (stricmp(argv[1],"HELPMSG")==0)
if (_stricmp(argv[1],"HELPMSG")==0)
{
return unimplement();
return unimplemented();
}
if (stricmp(argv[1],"LOCALGROUP")==0)
if (_stricmp(argv[1],"LOCALGROUP")==0)
{
return unimplement();
return unimplemented();
}
if (stricmp(argv[1],"NAME")==0)
if (_stricmp(argv[1],"NAME")==0)
{
return unimplement();
return unimplemented();
}
if (stricmp(argv[1],"PRINT")==0)
if (_stricmp(argv[1],"PRINT")==0)
{
return unimplement();
return unimplemented();
}
if (stricmp(argv[1],"SEND")==0)
if (_stricmp(argv[1],"SEND")==0)
{
return unimplement();
return unimplemented();
}
if (stricmp(argv[1],"SESSION")==0)
if (_stricmp(argv[1],"SESSION")==0)
{
return unimplement();
return unimplemented();
}
if (stricmp(argv[1],"SHARE")==0)
if (_stricmp(argv[1],"SHARE")==0)
{
return unimplement();
return unimplemented();
}
if (stricmp(argv[1],"START")==0)
if (_stricmp(argv[1],"START")==0)
{
return cmdStart(argc, &argv[1]);
}
if (stricmp(argv[1],"STATISTICS")==0)
if (_stricmp(argv[1],"STATISTICS")==0)
{
return unimplement();
return unimplemented();
}
if (stricmp(argv[1],"STOP")==0)
if (_stricmp(argv[1],"STOP")==0)
{
return cmdStop(argc, &argv[1]);
}
if (stricmp(argv[1],"TIME")==0)
if (_stricmp(argv[1],"TIME")==0)
{
return unimplement();
return unimplemented();
}
if (stricmp(argv[1],"USE")==0)
if (_stricmp(argv[1],"USE")==0)
{
return unimplement();
return unimplemented();
}
if (stricmp(argv[1],"USER")==0)
if (_stricmp(argv[1],"USER")==0)
{
return unimplement();
return unimplemented();
}
if (stricmp(argv[1],"VIEW")==0)
if (_stricmp(argv[1],"VIEW")==0)
{
return unimplement();
return unimplemented();
}
help();
@ -112,9 +112,9 @@ int main(int argc, char **argv)
}
int unimplement()
int unimplemented()
{
puts("This command is not implement yet");
puts("This command is not implemented yet");
return 1;
}

View file

@ -14,7 +14,7 @@
#include <windows.h>
void help();
int unimplement();
int unimplemented();
INT cmdHelp(INT argc, CHAR **argv);

View file

@ -208,7 +208,7 @@ INT row_scanner_service(CHAR *buffer, LONG* pos, LONG size,
}
/* Compare now */
if (strnicmp(name,&buffer[t],strlen(&buffer[t]))==0)
if (_strnicmp(name,&buffer[t],strlen(&buffer[t]))==0)
{
if (save != NULL)
{

View file

@ -1,10 +1,11 @@
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd">
<module name="telnet" type="win32cui" installbase="system32" installname="telnet.exe" allowwarnings ="true">
<module name="telnet" type="win32cui" installbase="system32" installname="telnet.exe" >
<include base="telnet">.</include>
<library>kernel32</library>
<library>ws2_32</library>
<library>user32</library>
<define name="_CRT_NONSTDC_NO_DEPRECATE" />
<directory name="src">
<file>ansiprsr.cpp</file>
<file>keytrans.cpp</file>

View file

@ -2062,7 +2062,7 @@ IsConsoleBoot(VOID)
NextOption = wcschr(CurrentOption, L' ');
if (NextOption)
*NextOption = L'\0';
if (wcsicmp(CurrentOption, L"CONSOLE") == 0)
if (_wcsicmp(CurrentOption, L"CONSOLE") == 0)
{
DPRINT("Found %S. Switching to console boot\n", CurrentOption);
ConsoleBoot = TRUE;

View file

@ -151,12 +151,12 @@ ScmCreateManagerHandle(LPWSTR lpDatabaseName,
if (lpDatabaseName == NULL)
lpDatabaseName = SERVICES_ACTIVE_DATABASEW;
if (wcsicmp(lpDatabaseName,SERVICES_FAILED_DATABASEW)==0)
if (_wcsicmp(lpDatabaseName,SERVICES_FAILED_DATABASEW)==0)
{
DPRINT1("Database %S, does not exist\n",lpDatabaseName);
return ERROR_DATABASE_DOES_NOT_EXIST;
}
else if (wcsicmp(lpDatabaseName, SERVICES_ACTIVE_DATABASEW) != 0)
else if (_wcsicmp(lpDatabaseName, SERVICES_ACTIVE_DATABASEW) != 0)
{
DPRINT1("Invalid Database name %S.\n",lpDatabaseName);
return ERROR_INVALID_NAME;
@ -332,7 +332,7 @@ Int_EnumDependentServicesW(HKEY hServicesKey,
/* Can be more than one Dependencies in the DependOnService string */
while (wcslen(lpszValueBuf + dwDependServiceStrPtr) > 0)
{
if (wcsicmp(lpszValueBuf + dwDependServiceStrPtr, lpService->lpServiceName) == 0)
if (_wcsicmp(lpszValueBuf + dwDependServiceStrPtr, lpService->lpServiceName) == 0)
{
/* Get the current enumed service pointer */
lpCurrentService = ScmGetServiceEntryByName(lpszNameBuf);
@ -1344,7 +1344,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
/* First check, if it's already good */
if (ServiceNameLen > 12 &&
!wcsnicmp(L"\\SystemRoot\\", CanonName, 12))
!_wcsnicmp(L"\\SystemRoot\\", CanonName, 12))
{
*RelativeName = LocalAlloc(LMEM_ZEROINIT, ServiceNameLen * sizeof(WCHAR) + sizeof(WCHAR));
if (*RelativeName == NULL)
@ -1362,7 +1362,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
/* If it has %SystemRoot% prefix, substitute it to \System*/
if (ServiceNameLen > 13 &&
!wcsnicmp(L"%SystemRoot%\\", CanonName, 13))
!_wcsnicmp(L"%SystemRoot%\\", CanonName, 13))
{
/* There is no +sizeof(wchar_t) because the name is less by 1 wchar */
*RelativeName = LocalAlloc(LMEM_ZEROINIT, ServiceNameLen * sizeof(WCHAR));
@ -1432,7 +1432,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
Expanded[ExpandedLen] = 0;
if (ServiceNameLen > ExpandedLen &&
!wcsnicmp(Expanded, CanonName, ExpandedLen))
!_wcsnicmp(Expanded, CanonName, ExpandedLen))
{
/* Only \SystemRoot\ is missing */
*RelativeName = LocalAlloc(LMEM_ZEROINIT,
@ -1504,7 +1504,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
ExpandedLen = LinkTarget.Length / sizeof(WCHAR);
if ((ServiceNameLen > ExpandedLen) &&
!wcsnicmp(LinkTarget.Buffer, CanonName, ExpandedLen))
!_wcsnicmp(LinkTarget.Buffer, CanonName, ExpandedLen))
{
*RelativeName = LocalAlloc(LMEM_ZEROINIT,
(ServiceNameLen - ExpandedLen) * sizeof(WCHAR) + 13*sizeof(WCHAR));
@ -1584,7 +1584,7 @@ ScmCanonDriverImagePath(DWORD dwStartType,
/* 12 is wcslen(L"\\SystemRoot\\") */
if (ServiceNameLen > 12 &&
!wcsnicmp(L"\\SystemRoot\\", lpServiceName, 12))
!_wcsnicmp(L"\\SystemRoot\\", lpServiceName, 12))
{
/* SystemRoot prefix is already included */
@ -1609,7 +1609,7 @@ ScmCanonDriverImagePath(DWORD dwStartType,
/* Check if it has %SystemRoot% (len=13) */
if (ServiceNameLen > 13 &&
!wcsnicmp(L"%%SystemRoot%%\\", lpServiceName, 13))
!_wcsnicmp(L"%%SystemRoot%%\\", lpServiceName, 13))
{
/* Substitute %SystemRoot% with \\SystemRoot\\ */
*lpCanonName = LocalAlloc(LMEM_ZEROINIT, ServiceNameLen * sizeof(WCHAR) + sizeof(WCHAR));
@ -1828,7 +1828,7 @@ DWORD RCreateServiceW(
/* Fill the display name */
if (lpDisplayName != NULL &&
*lpDisplayName != 0 &&
wcsicmp(lpService->lpDisplayName, lpDisplayName) != 0)
_wcsicmp(lpService->lpDisplayName, lpDisplayName) != 0)
{
lpService->lpDisplayName = (WCHAR*) HeapAlloc(GetProcessHeap(), 0,
(wcslen(lpDisplayName) + 1) * sizeof(WCHAR));

View file

@ -120,7 +120,7 @@ BOOL IsConsoleShell(VOID)
NextOption = wcschr(CurrentOption, L' ');
if (NextOption)
*NextOption = L'\0';
if (wcsicmp(CurrentOption, L"CONSOLE") == 0)
if (_wcsicmp(CurrentOption, L"CONSOLE") == 0)
{
TRACE("Found 'CONSOLE' boot option\n");
ret = TRUE;

View file

@ -697,7 +697,7 @@ LoadSoundFiles(HWND hwndDlg)
if (lResult != CB_ERR)
{
wcscpy(&szPath[length-1], FileData.cFileName);
SendDlgItemMessageW(hwndDlg, IDC_SOUND_LIST, CB_SETITEMDATA, (WPARAM)lResult, (LPARAM)wcsdup(szPath));
SendDlgItemMessageW(hwndDlg, IDC_SOUND_LIST, CB_SETITEMDATA, (WPARAM)lResult, (LPARAM)_wcsdup(szPath));
}
}while(FindNextFileW(hFile, &FileData) != 0);

View file

@ -140,9 +140,9 @@ ReadFreeldrSection(HINF hInf, WCHAR *szSectionName)
break;
}
if (!wcsnicmp(szName, L"BootType", 8))
if (!_wcsnicmp(szName, L"BootType", 8))
{
if (!wcsnicmp(szValue, L"ReactOS", 7))
if (!_wcsnicmp(szValue, L"ReactOS", 7))
{
//FIXME store as enum
pRecord->BootType = 1;
@ -152,11 +152,11 @@ ReadFreeldrSection(HINF hInf, WCHAR *szSectionName)
pRecord->BootType = 0;
}
}
else if (!wcsnicmp(szName, L"SystemPath", 10))
else if (!_wcsnicmp(szName, L"SystemPath", 10))
{
wcscpy(pRecord->szBootPath, szValue);
}
else if (!wcsnicmp(szName, L"Options", 7))
else if (!_wcsnicmp(szName, L"Options", 7))
{
//FIXME store flags as values
wcscpy(pRecord->szOptions, szValue);
@ -329,12 +329,12 @@ LoadBootSettings(HINF hInf, HWND hwndDlg)
return FALSE;
}
if (!wcsnicmp(szName, L"timeout", 7))
if (!_wcsnicmp(szName, L"timeout", 7))
{
TimeOut = _wtoi(szValue);
}
if (!wcsnicmp(szName, L"default", 7))
if (!_wcsnicmp(szName, L"default", 7))
{
wcscpy(szDefaultOS, szValue);
}

View file

@ -2,6 +2,7 @@
<importlibrary definition="msgina.spec" />
<include base="msgina">.</include>
<include base="msgina">include</include>
<include base="ReactOS">include/reactos/wine</include>
<library>ntdll</library>
<library>wine</library>
<library>kernel32</library>

View file

@ -430,7 +430,7 @@ FindNetworkComponent(
{
while(pHead)
{
if (!wcsicmp(pHead->szId, pszwComponentId))
if (!_wcsicmp(pHead->szId, pszwComponentId))
{
return INetCfgComponent_Constructor(NULL, &IID_INetCfgComponent, (LPVOID*)pComponent, pHead, iface);
}

View file

@ -2812,7 +2812,7 @@ Initialize(TcpipConfNotifyImpl * This)
{
szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0';
}
if (!wcsicmp(szBuffer, pStr))
if (!_wcsicmp(szBuffer, pStr))
{
bFound = TRUE;
break;

View file

@ -527,7 +527,7 @@ GetAdapterIndexFromNetCfgInstanceId(PIP_ADAPTER_INFO pAdapterInfo, LPWSTR szNetC
{
szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0';
}
if (!wcsicmp(szBuffer, szNetCfg))
if (!_wcsicmp(szBuffer, szNetCfg))
{
*pIndex = pCurrentAdapter->Index;
return TRUE;

View file

@ -97,7 +97,7 @@ GetINetCfgComponent(INetCfg * pNCfg, INetConnectionPropertyUiImpl * This, INetCf
hr = INetCfgComponent_GetDisplayName(pNCg, &pName);
if (SUCCEEDED(hr))
{
if (!wcsicmp(pName, This->pProperties->pszwDeviceName))
if (!_wcsicmp(pName, This->pProperties->pszwDeviceName))
{
*pOut = pNCg;
IEnumNetCfgComponent_Release(pEnumCfg);

View file

@ -591,7 +591,7 @@ FindNetworkAdapter(HDEVINFO hInfo, SP_DEVINFO_DATA *pDevInfo, LPWSTR pGuid)
break;
}
RegCloseKey(hSubKey);
if (!wcsicmp(pGuid, szNetCfg))
if (!_wcsicmp(pGuid, szNetCfg))
{
return TRUE;
}

View file

@ -383,7 +383,7 @@ SearchDriverRecursive(
{
LPCWSTR pszExtension = GetFileExt(FileName);
if ((wcsicmp(pszExtension, L".inf") == 0) && (wcscmp(LastDirPath, DirPath) != 0))
if ((_wcsicmp(pszExtension, L".inf") == 0) && (wcscmp(LastDirPath, DirPath) != 0))
{
wcscpy(LastDirPath, DirPath);

View file

@ -365,7 +365,7 @@ SaveCustomPath(
TRACE("ComboBox_GetLBText() failed\n");
goto cleanup;
}
else if (UseCustomPath && wcsicmp(CustomPath, pBuffer) == 0)
else if (UseCustomPath && _wcsicmp(CustomPath, pBuffer) == 0)
UseCustomPath = FALSE;
pBuffer += 1 + Length;
}

View file

@ -1,6 +1,7 @@
<module name="ntmarta" type="win32dll" baseaddress="${BASEADDRESS_NTMARTA}" installbase="system32" installname="ntmarta.dll" unicode="yes">
<importlibrary definition="ntmarta.spec" />
<include base="ntmarta">.</include>
<define name="__WINESRC__" />
<define name="_WIN32_WINNT">0x600</define>
<library>ntdll</library>
<library>kernel32</library>

View file

@ -2261,7 +2261,7 @@ void _ILGetFileType(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
}
/* display Ext-file as description */
strcpy(pOut, sType);
strupr(pOut);
_strupr(pOut);
/* load localized file string */
sTemp[0] = '\0';
if(LoadStringA(shell32_hInstance, IDS_SHV_COLUMN1, sTemp, 64))

View file

@ -2637,7 +2637,7 @@ SH_ShellLinkDlgProc(
return TRUE;
}
ptr = wcsrchr(szBuffer, L'.');
if (ptr && !wcsnicmp(ptr, L".lnk", 4))
if (ptr && !_wcsnicmp(ptr, L".lnk", 4))
{
// FIXME load localized error msg
MessageBoxW( hwndDlg, L"You cannot create a link to a shortcut", L"Error", MB_ICONERROR );

View file

@ -360,7 +360,7 @@ static void *SHELL_BuildEnvW( const WCHAR *path )
while (*p)
{
int len = wcslen(p) + 1;
if (!wcsnicmp( p, wPath, 5 )) got_path = TRUE;
if (!_wcsnicmp( p, wPath, 5 )) got_path = TRUE;
total += len;
p += len;
}
@ -378,7 +378,7 @@ static void *SHELL_BuildEnvW( const WCHAR *path )
{
int len = wcslen(p) + 1;
memcpy( p2, p, len * sizeof(WCHAR) );
if (!wcsnicmp( p, wPath, 5 ))
if (!_wcsnicmp( p, wPath, 5 ))
{
p2[len - 1] = ';';
wcscpy( p2 + len, path );
@ -1627,7 +1627,7 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
/* Remove File Protocol from lpFile */
/* In the case file://path/file */
if (!wcsnicmp(lpFile, wFile, iSize))
if (!_wcsnicmp(lpFile, wFile, iSize))
{
lpFile += iSize;
while (*lpFile == ':') lpFile++;
@ -1635,7 +1635,7 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
retval = execute_from_key(lpstrProtocol, lpFile, NULL, sei_tmp.lpParameters, wcmd, execfunc, &sei_tmp, sei);
}
/* Check if file specified is in the form www.??????.*** */
else if (!wcsnicmp(lpFile, wWww, 3))
else if (!_wcsnicmp(lpFile, wWww, 3))
{
/* if so, append lpFile http:// and call ShellExecute */
WCHAR lpstrTmpFile[256];

View file

@ -161,13 +161,13 @@ PSHELLNEW_ITEM LoadItem(LPWSTR szKeyName)
pNewItem = HeapAlloc(GetProcessHeap(), 0, sizeof(SHELLNEW_ITEM));
pNewItem->Type = type;
if (szTarget)
pNewItem->szTarget = wcsdup(szTarget);
pNewItem->szTarget = _wcsdup(szTarget);
else
pNewItem->szTarget = NULL;
pNewItem->szDesc = wcsdup(szDesc);
pNewItem->szIcon = wcsdup(szIcon);
pNewItem->szExt = wcsdup(szKeyName);
pNewItem->szDesc = _wcsdup(szDesc);
pNewItem->szIcon = _wcsdup(szIcon);
pNewItem->szExt = _wcsdup(szKeyName);
pNewItem->Next = NULL;
break;
}
@ -388,7 +388,7 @@ DoShellNewCmd(INewMenuImpl * This, LPCMINVOKECOMMANDINFO lpcmi)
ZeroMemory(&sInfo, sizeof(sInfo));
sInfo.cb = sizeof(sizeof(sInfo));
szCmd = wcsdup(ptr);
szCmd = _wcsdup(ptr);
if (!szCmd)
break;
if (CreateProcessW(NULL, szCmd, NULL, NULL,FALSE,0,NULL,NULL,&sInfo, &pi))