summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2015-11-21 19:25:10 -0800
committerJan Kotas <jkotas@microsoft.com>2015-11-23 07:11:28 -0800
commitc46a7f052650557e0d93d99680656d3bda47dee6 (patch)
treede40599cc578f0875d8f3ba95a495808e7244349 /src
parent112e6ee2e78a5727d06c6bc62effeb97c1acad5b (diff)
downloadcoreclr-c46a7f052650557e0d93d99680656d3bda47dee6.tar.gz
coreclr-c46a7f052650557e0d93d99680656d3bda47dee6.tar.bz2
coreclr-c46a7f052650557e0d93d99680656d3bda47dee6.zip
Delete code under !NO_CRT define
It is always defined - even in internal builds
Diffstat (limited to 'src')
-rw-r--r--src/inc/crtwrap.h291
-rw-r--r--src/inc/utilcode.h9
-rw-r--r--src/md/compiler/CMakeLists.txt2
-rw-r--r--src/md/compiler/Compiler.settings.targets2
-rw-r--r--src/md/datasource/CMakeLists.txt5
-rw-r--r--src/md/datasource/DataSource.settings.targets2
-rw-r--r--src/md/enc/CMakeLists.txt2
-rw-r--r--src/md/enc/enc.settings.targets2
-rw-r--r--src/md/md_dac.cmake2
-rw-r--r--src/md/winmd/CMakeLists.txt2
-rw-r--r--src/md/winmd/WinMD.settings.targets2
-rw-r--r--src/palrt/CMakeLists.txt2
-rw-r--r--src/utilcode/CMakeLists.txt2
-rw-r--r--src/utilcode/debug.cpp55
-rw-r--r--src/utilcode/stgpool.cpp26
-rw-r--r--src/utilcode/utilcode.settings.targets2
16 files changed, 7 insertions, 401 deletions
diff --git a/src/inc/crtwrap.h b/src/inc/crtwrap.h
index 1338423624..97da65ebc7 100644
--- a/src/inc/crtwrap.h
+++ b/src/inc/crtwrap.h
@@ -12,18 +12,6 @@
#ifndef __CrtWrap_h__
#define __CrtWrap_h__
-//workaround Remove the crt wrapper to incorporate SecureCRT functions.
-#ifdef NO_CRT
-#define REDEFINE_NO_CRT
-#undef NO_CRT
-#endif
-
-//*****************************************************************************
-// If the CRT is allowed in the current compiland, then just include the
-// correct CRT header files.
-//*****************************************************************************
-#ifndef NO_CRT
-
#include <stdint.h>
#include <windows.h>
#include <objbase.h>
@@ -34,289 +22,10 @@
#include <wchar.h>
#include <stdio.h>
-//*****************************************************************************
-// Else no CRT references are allowed. Provide stubs and macros for common
-// functionality, and otherwise abstract the CRT from the user.
-//*****************************************************************************
-#else // NO_CRT
-
-// Fake out include directive on stdlib.h.
-#ifdef _INC_STDLIB
-#error "Include crtwrap.h before any other include files."
-#endif
-#undef _INC_STDLIB
-#define _INC_STDLIB
-
-#ifdef _INC_MALLOC
-#error "Include crtwrap.h before any other include files."
-#endif
-#undef _INC_MALLOC
-#define _INC_MALLOC
-
-#ifdef _INC_TIME
-#error "Include crtwrap.h before any other include files."
-#endif
-#undef _INC_TIME
-#define _INC_TIME
-
-#ifdef _INC_STDIO
-#error "Include crtwrap.h before any other include files."
-#endif
-#undef _INC_STDIO
-#define _INC_STDIO
-
-
-#if !defined( _CRTBLD ) && defined( _DLL )
-#define _CRTIMP_TODO __declspec(dllimport)
-#else
-#define _CRTIMP_TODO
-#endif
-
-#ifndef _CONST_RETURN
-#ifdef __cplusplus
-#define _CONST_RETURN const
-#else
-#define _CONST_RETURN
-#endif
-#endif
-
-
-#include <windows.h>
-#include <objbase.h>
-#include <intrinsic.h>
-#include "debugmacros.h"
-
-
-
-/*
- * Sizes for buffers used by the _makepath() and _splitpath() functions.
- * note that the sizes include space for 0-terminator
- */
-#ifndef _MAC
-#define _MAX_PATH 260 /* max. length of full pathname */
-#define _MAX_DRIVE 3 /* max. length of drive component */
-#define _MAX_DIR 256 /* max. length of path component */
-#define _MAX_FNAME 256 /* max. length of file name component */
-#define _MAX_EXT 256 /* max. length of extension component */
-#else /* def _MAC */
-#define _MAX_PATH 256 /* max. length of full pathname */
-#define _MAX_DIR 32 /* max. length of path component */
-#define _MAX_FNAME 64 /* max. length of file name component */
-#endif /* _MAC */
-
-
-#ifndef __min
-#define __min(x, y) ((x) < (y) ? (x) : (y))
-#endif
-#ifndef __max
-#define __max(x, y) ((x) > (y) ? (x) : (y))
-#endif
-
-
-#define sprintf wsprintfA
-#define vsprintf wvsprintfA
-
-#define _stricmp(s1, s2, slen) (SString::_stricmp(s1, s2))
-#define _strnicmp(s1, s2, slen) (SString::_strnicmp(s1, s2, slen))
-
-#if defined(UNICODE) || defined(_UNICODE)
-
-#define _tcscat wcscat
-#define _tcslen wcslen
-#define _tcscmp wcscmp
-#define _tcsicmp _wcsicmp
-#define _tcsncmp(s1, s2, slen) memcmp(s1, s2, (slen) * sizeof(wchar_t))
-#define _tcsnccmp(s1, s2, slen) memcmp(s1, s2, (slen) * sizeof(wchar_t))
-#define _tcsnicmp _wcsnicmp
-#define _tcsncicmp _wcsnicmp
-#define _tprintf wprintf
-#define _stprintf swprintf
-#define _tcscpy wcscpy
-#define _tcsncpy(s1, s2, slen) memcpy(s1, s2, (slen) * sizeof(wchar_t))
-
-#else // Note: you really are supposed to be using UNICODE here
-
-#define _tcscat strcat
-#define _tcslen strlen
-#define _tcscmp strcmp
-#define _tcsicmp _stricmp
-#define _tcsncmp(s1, s2, slen) memcmp(s1, s2, (slen))
-#define _tcsnccmp(s1, s2, slen) memcmp(s1, s2, (slen))
-#define _tcsnicmp _strnicmp
-#define _tcsncicmp _strnicmp
-#define _tprintf printf
-#define _stprintf sprintf
-#define _tcscpy strcpy
-#define _tcsncpy(s1, s2, slen) memcpy(s1, s2, slen)
-
-#endif
-
-
-#ifdef __cplusplus
-extern "C"{
-#endif
-
-
-// Memory.
-void __cdecl free(void *);
-void * __cdecl malloc(size_t);
-void * __cdecl realloc(void *, size_t);
-void * __cdecl _alloca(size_t);
-size_t __cdecl _msize(void *);
-void * __cdecl _expand(void *, size_t);
-void * __cdecl calloc(size_t num, size_t size);
-
-
-#if !__STDC__
-/* Non-ANSI names for compatibility */
-#define alloca _alloca
-#endif /* !__STDC__ */
-
-#if defined (_M_MRX000) || defined (_M_PPC) || defined (_M_ALPHA)
-#pragma intrinsic(_alloca)
-#endif /* defined (_M_MRX000) || defined (_M_PPC) || defined (_M_ALPHA) */
-
-
-// Time.
-
-#ifndef _TIME_T_DEFINED
-#if _INTEGRAL_MAX_BITS >= 64
-typedef __int64 time_t; /* time value */
-#else
-typedef int time_t; /* time value */
-#endif
-#define _TIME_T_DEFINED /* avoid multiple def's of time_t */
-#endif
-
-// 4 byte time, no check for daylight savings
-_CRTIMP time_t __cdecl time(time_t *timeptr);
-
-// Strings.
-_CRTIMP int __cdecl _vsnwprintf(__inout_ecount(iSize) wchar_t *szOutput, size_t iSize, const wchar_t *szFormat, va_list args);
-_CRTIMP int __cdecl _vswprintf_c(__inout_ecount(iSize) wchar_t *szOutput, size_t iSize, const wchar_t *szFormat, va_list args);
-_CRTIMP int __cdecl wprintf(const wchar_t *format, ...);
-_CRTIMP int __cdecl _snwprintf(__inout_ecount(iSize) wchar_t *szOutput, size_t iSize, const wchar_t *szFormat, ...);
-_CRTIMP int __cdecl _snprintf(__inout_ecount(iSize) char *szOutput, size_t iSize, const char *szFormat, ...);
-#ifndef _PREFAST_
- // Prefast does not like these because of the const return.
-_CRTIMP _CONST_RETURN wchar_t * __cdecl wcsrchr(const wchar_t * string, wchar_t ch);
-_CRTIMP _CONST_RETURN wchar_t * __cdecl wcsstr(const wchar_t * wcs1, const wchar_t * wcs2);
-_CRTIMP _CONST_RETURN wchar_t * __cdecl wcspbrk(const wchar_t *, const wchar_t *);
-#endif
-_CRTIMP int __cdecl _swprintf_c(__inout_ecount(iSize) wchar_t *szOutput, size_t iSize, const wchar_t *szFormat, ...);
-_CRTIMP int __cdecl wcstol(const wchar_t *, __in wchar_t **, int);
-_CRTIMP unsigned int __cdecl wcstoul(const wchar_t *, __in wchar_t **, int);
-_CRTIMP __int64 __cdecl _wcstoi64(const wchar_t *, __in wchar_t **, int);
-_CRTIMP unsigned __int64 __cdecl _wcstoui64(const wchar_t *, __in wchar_t **, int);
-
-_CRTIMP int __cdecl _vsnprintf(__inout_ecount(iSize) char *szOutput, size_t iSize, const char *szFormat, va_list args);
-_CRTIMP int __cdecl vprintf(const char *, va_list);
-_CRTIMP int __cdecl printf(const char *, ...);
-
-#define swprintf _swprintf_c
-#define vswprintf _vswprintf_c
-
-#ifdef __cplusplus
-#ifndef _CPP_WIDE_INLINES_DEFINED
-#define _CPP_WIDE_INLINES_DEFINED
-extern "C++" {
-inline wchar_t * __cdecl wcschr(__in wchar_t *_S, wchar_t _C)
- {return ((wchar_t *)wcschr((const wchar_t *)_S, _C)); }
-inline wchar_t * __cdecl wcspbrk(__in wchar_t *_S, const wchar_t *_P)
- {return ((wchar_t *)wcspbrk((const wchar_t *)_S, _P)); }
-inline wchar_t * __cdecl wcsrchr(__in wchar_t *_S, wchar_t _C)
- {return ((wchar_t *)wcsrchr((const wchar_t *)_S, _C)); }
-inline wchar_t * __cdecl wcsstr(__in wchar_t *_S, const wchar_t *_P)
- {return ((wchar_t *)wcsstr((const wchar_t *)_S, _P)); }
-}
-#endif
-#endif
-
-// Utilities.
-unsigned int __cdecl _rotl(unsigned int, int);
-unsigned int __cdecl _rotr(unsigned int, int);
-unsigned int __cdecl _lrotl(unsigned int, int);
-unsigned int __cdecl _lrotr(unsigned int, int);
-
-_CRTIMP int __cdecl atol(const char *nptr);
-_CRTIMP int __cdecl atoi(const char *nptr);
-_CRTIMP __int64 __cdecl _atoi64(const char *nptr);
-_CRTIMP char *__cdecl _ltoa( int value, __inout char *string, int radix );
-
-_CRTIMP int __cdecl _wtoi(const wchar_t *);
-_CRTIMP int __cdecl _wtol(const wchar_t *);
-_CRTIMP __int64 __cdecl _wtoi64(const wchar_t *);
-_CRTIMP wchar_t * __cdecl _ltow (int, __inout wchar_t *, int);
-
-_CRTIMP void __cdecl qsort(void *base, unsigned num, unsigned width,
- int (__cdecl *comp)(const void *, const void *));
-
-#ifdef _CRT_DEPENDENCY_
-
-#define EOF (-1)
-
-#ifndef _FILE_DEFINED
-struct _iobuf {
- char *_ptr;
- int _cnt;
- char *_base;
- int _flag;
- int _file;
- int _charbuf;
- int _bufsiz;
- char *_tmpfname;
- };
-typedef struct _iobuf FILE;
-#define _FILE_DEFINED
-#endif
-
-#define _IOB_ENTRIES 20
-
-#ifndef _STDIO_DEFINED
-_CRTIMP_TODO extern FILE _iob[];
-#endif /* _STDIO_DEFINED */
-
-#define stdin (&_iob[0])
-#define stdout (&_iob[1])
-#define stderr (&_iob[2])
-
-_CRTIMP_TODO FILE * __cdecl fopen(const char *, const char *);
-_CRTIMP_TODO FILE * __cdecl _wfopen(const wchar_t *, const wchar_t *);
-_CRTIMP_TODO size_t __cdecl fwrite(const void *, size_t, size_t, FILE *);
-_CRTIMP_TODO int __cdecl ftell(FILE *);
-_CRTIMP_TODO int __cdecl fprintf(FILE *, const char *, ...);
-_CRTIMP_TODO int __cdecl fflush(FILE *);
-_CRTIMP_TODO int __cdecl fclose(FILE *);
-
-
-#endif // _CRT_DEPENDENCY_
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-
-#ifdef __cplusplus
-
-void* __cdecl operator new(size_t cb);
-void __cdecl operator delete(void *p);
-
-#endif // __cplusplus
-
-
-#endif // NO_CRT
-
#ifndef PUB
// PUB is defined to influence method visibility for some compilers.
#define PUB
#endif // !PUB
-#ifdef REDEFINE_NO_CRT
-#undef REDEFINE_NO_CRT
-#define NO_CRT 1
-#endif
-
#endif // __CrtWrap_h__
diff --git a/src/inc/utilcode.h b/src/inc/utilcode.h
index 981f90002e..fa0e1b16c8 100644
--- a/src/inc/utilcode.h
+++ b/src/inc/utilcode.h
@@ -3370,15 +3370,6 @@ inline ULONG HashiStringNKnownLower80(LPCWSTR szStr, DWORD count) {
return hash;
}
-// // //
-// // // See $\src\utilcode\Debug.cpp for "Binomial (K, M, N)", which
-// // // computes the binomial distribution, with which to compare your
-// // // hash-table statistics.
-// // //
-
-
-
-
//*****************************************************************************
// IMPORTANT: This data structure is deprecated, please do not add any new uses.
// The hashtable implementation that should be used instead is code:SHash.
diff --git a/src/md/compiler/CMakeLists.txt b/src/md/compiler/CMakeLists.txt
index b9fb91b705..4d99d11edc 100644
--- a/src/md/compiler/CMakeLists.txt
+++ b/src/md/compiler/CMakeLists.txt
@@ -1,5 +1,3 @@
-add_definitions(-DNO_CRT)
-
set(MDCOMPILER_SOURCES
assemblymd.cpp
assemblymd_emit.cpp
diff --git a/src/md/compiler/Compiler.settings.targets b/src/md/compiler/Compiler.settings.targets
index 211f82a44a..97f2504796 100644
--- a/src/md/compiler/Compiler.settings.targets
+++ b/src/md/compiler/Compiler.settings.targets
@@ -23,7 +23,7 @@
$(ClrSrcDirectory)\vm;
$(ClrSrcDirectory)\strongname\inc
</UserIncludes>
- <ClAdditionalOptions>$(ClAdditionalOptions) -DUNICODE -D_UNICODE -DNO_CRT</ClAdditionalOptions>
+ <ClAdditionalOptions>$(ClAdditionalOptions) -DUNICODE -D_UNICODE</ClAdditionalOptions>
<!--OK to delete NO_NTDLL for devdiv builds.-->
<OutputPath>$(ClrLibDest)</OutputPath>
<TargetType>LIBRARY</TargetType>
diff --git a/src/md/datasource/CMakeLists.txt b/src/md/datasource/CMakeLists.txt
index a5f0758a78..6657c0615a 100644
--- a/src/md/datasource/CMakeLists.txt
+++ b/src/md/datasource/CMakeLists.txt
@@ -2,11 +2,6 @@ if(CLR_CMAKE_PLATFORM_UNIX)
add_compile_options(-fPIC)
endif(CLR_CMAKE_PLATFORM_UNIX)
-if(WIN32)
- add_definitions(-DNO_CRT)
-endif(WIN32)
-
-
set(MDDATASOURCE_SOURCES
api.cpp
datatargetreader.cpp
diff --git a/src/md/datasource/DataSource.settings.targets b/src/md/datasource/DataSource.settings.targets
index 35ffd69303..9211b2fc67 100644
--- a/src/md/datasource/DataSource.settings.targets
+++ b/src/md/datasource/DataSource.settings.targets
@@ -21,7 +21,7 @@
$(UserIncludes);
$(ClrSrcDirectory)\MD\inc;
</UserIncludes>
- <ClAdditionalOptions>$(ClAdditionalOptions) -DUNICODE -D_UNICODE -DNO_CRT</ClAdditionalOptions>
+ <ClAdditionalOptions>$(ClAdditionalOptions) -DUNICODE -D_UNICODE</ClAdditionalOptions>
<!--OK to delete NO_NTDLL for devdiv builds.-->
<OutputPath>$(ClrLibDest)</OutputPath>
<TargetType>LIBRARY</TargetType>
diff --git a/src/md/enc/CMakeLists.txt b/src/md/enc/CMakeLists.txt
index a7a2c91aba..8e388f526e 100644
--- a/src/md/enc/CMakeLists.txt
+++ b/src/md/enc/CMakeLists.txt
@@ -1,5 +1,3 @@
-add_definitions(-DNO_CRT)
-
set(MDRUNTIMERW_SOURCES
liteweightstgdbrw.cpp
metamodelenc.cpp
diff --git a/src/md/enc/enc.settings.targets b/src/md/enc/enc.settings.targets
index dcbe410196..1c92bb5086 100644
--- a/src/md/enc/enc.settings.targets
+++ b/src/md/enc/enc.settings.targets
@@ -10,7 +10,7 @@
$(ClrSrcDirectory)\vm;
$(ClrSrcDirectory)\strongname\inc
</UserIncludes>
- <ClAdditionalOptions>$(ClAdditionalOptions) -DUNICODE -D_UNICODE -DNO_CRT</ClAdditionalOptions>
+ <ClAdditionalOptions>$(ClAdditionalOptions) -DUNICODE -D_UNICODE</ClAdditionalOptions>
<OutputPath>$(ClrLibDest)</OutputPath>
<TargetType>LIBRARY</TargetType>
<PCHHeader>stdafx.h</PCHHeader>
diff --git a/src/md/md_dac.cmake b/src/md/md_dac.cmake
index bc5b5b54ff..1820a555aa 100644
--- a/src/md/md_dac.cmake
+++ b/src/md/md_dac.cmake
@@ -1,3 +1,3 @@
-add_definitions(-DNO_CRT -DFEATURE_METADATA_EMIT)
+add_definitions(-DFEATURE_METADATA_EMIT)
add_definitions(-DFEATURE_METADATA_INTERNAL_APIS)
add_definitions(-DFEATURE_METADATA_EMIT_IN_DEBUGGER) \ No newline at end of file
diff --git a/src/md/winmd/CMakeLists.txt b/src/md/winmd/CMakeLists.txt
index 540f1e1db7..9fb7d839ac 100644
--- a/src/md/winmd/CMakeLists.txt
+++ b/src/md/winmd/CMakeLists.txt
@@ -1,5 +1,3 @@
-add_definitions(-DNO_CRT)
-
set(MDWINMD_SOURCES
adapter.cpp
winmdimport.cpp
diff --git a/src/md/winmd/WinMD.settings.targets b/src/md/winmd/WinMD.settings.targets
index 10f825682f..58fa8ee682 100644
--- a/src/md/winmd/WinMD.settings.targets
+++ b/src/md/winmd/WinMD.settings.targets
@@ -23,7 +23,7 @@
$(ClrSrcDirectory)\vm;
$(ClrSrcDirectory)\strongname\inc
</UserIncludes>
- <ClAdditionalOptions>$(ClAdditionalOptions) -DUNICODE -D_UNICODE -DNO_CRT</ClAdditionalOptions>
+ <ClAdditionalOptions>$(ClAdditionalOptions) -DUNICODE -D_UNICODE</ClAdditionalOptions>
<!--OK to delete NO_NTDLL for devdiv builds.-->
<OutputPath>$(ClrLibDest)</OutputPath>
<TargetType>LIBRARY</TargetType>
diff --git a/src/palrt/CMakeLists.txt b/src/palrt/CMakeLists.txt
index feb88ed71e..a66f148082 100644
--- a/src/palrt/CMakeLists.txt
+++ b/src/palrt/CMakeLists.txt
@@ -1,8 +1,6 @@
set(CMAKE_INCLUDE_CURRENT_DIR ON)
-add_definitions(-DNO_CRT)
-
set(PALRT_SOURCES
bstr.cpp
coguid.cpp
diff --git a/src/utilcode/CMakeLists.txt b/src/utilcode/CMakeLists.txt
index 0db79c18ca..52a017fd21 100644
--- a/src/utilcode/CMakeLists.txt
+++ b/src/utilcode/CMakeLists.txt
@@ -1,8 +1,6 @@
set(CMAKE_INCLUDE_CURRENT_DIR ON)
-add_definitions(-DNO_CRT)
-
if(WIN32)
add_compile_options(/wd4996)
endif(WIN32)
diff --git a/src/utilcode/debug.cpp b/src/utilcode/debug.cpp
index 33d09fa076..6b9de4f82e 100644
--- a/src/utilcode/debug.cpp
+++ b/src/utilcode/debug.cpp
@@ -583,7 +583,7 @@ bool _DbgBreakCheckNoThrow(
}
return result;
}
-
+
#ifndef FEATURE_PAL
// Get the timestamp from the PE file header. This is useful
unsigned DbgGetEXETimeStamp()
@@ -610,58 +610,6 @@ unsigned DbgGetEXETimeStamp()
return cache;
}
#endif // FEATURE_PAL
-// // //
-// // // The following function
-// // // computes the binomial distribution, with which to compare
-// // // hash-table statistics. If a hash function perfectly randomizes
-// // // its input, one would expect to see F chains of length K, in a
-// // // table with N buckets and M elements, where F is
-// // //
-// // // F(K,M,N) = N * (M choose K) * (1 - 1/N)^(M-K) * (1/N)^K.
-// // //
-// // // Don't call this with a K larger than 159.
-// // //
-
-#if !defined(NO_CRT)
-
-#include <math.h>
-
-#define MAX_BUCKETS_MATH 160
-
-double Binomial (DWORD K, DWORD M, DWORD N)
-{
- STATIC_CONTRACT_LEAF;
-
- if (K >= MAX_BUCKETS_MATH)
- return -1 ;
-
- static double rgKFact [MAX_BUCKETS_MATH] ;
- DWORD i ;
-
- if (rgKFact[0] == 0)
- {
- rgKFact[0] = 1 ;
- for (i=1; i<MAX_BUCKETS_MATH; i++)
- rgKFact[i] = rgKFact[i-1] * i ;
- }
-
- double MchooseK = 1 ;
-
- for (i = 0; i < K; i++)
- MchooseK *= (M - i) ;
-
- MchooseK /= rgKFact[K] ;
-
- double OneOverNToTheK = pow (1./N, K) ;
-
- double QToTheMMinusK = pow (1.-1./N, M-K) ;
-
- double P = MchooseK * OneOverNToTheK * QToTheMMinusK ;
-
- return N * P ;
-}
-
-#endif // !NO_CRT
// Called from within the IfFail...() macros. Set a breakpoint here to break on
// errors.
@@ -672,7 +620,6 @@ VOID DebBreak()
i++;
}
-
VOID DebBreakHr(HRESULT hr)
{
STATIC_CONTRACT_LEAF;
diff --git a/src/utilcode/stgpool.cpp b/src/utilcode/stgpool.cpp
index a4dda6ba82..e9a3a76133 100644
--- a/src/utilcode/stgpool.cpp
+++ b/src/utilcode/stgpool.cpp
@@ -361,32 +361,6 @@ bool StgPool::Grow( // true if successful.
return true;
}
-#ifndef NO_CRT
- // Give back any memory that we won't use.
- if (m_pNextSeg == 0)
- { // First segment allocated as [header]->[data].
- // Be sure that we are contracting the allocation.
- if (m_pCurSeg->m_cbSegNext < (_msize(m_pCurSeg->m_pSegData) - 4))
- {
- // Contract the allocation.
- void *pRealloc = _expand(m_pCurSeg->m_pSegData, m_pCurSeg->m_cbSegNext+4);
- // Shouldn't have moved.
- _ASSERTE(pRealloc == m_pCurSeg->m_pSegData);
- }
- }
- else
- { // Chained segments are allocated together, [header][data].
- // Be sure that we are contracting the allocation.
- if (m_pCurSeg->m_cbSegNext+sizeof(StgPoolSeg) < (_msize(m_pCurSeg) - 4))
- {
- // Contract the allocation.
- void *pRealloc = _expand(m_pCurSeg, m_pCurSeg->m_cbSegNext + sizeof(StgPoolSeg) + 4);
- // Shouldn't have moved.
- _ASSERTE(pRealloc == m_pCurSeg);
- }
- }
-#endif
-
// Fix the size of the old segment.
m_pCurSeg->m_cbSegSize = m_pCurSeg->m_cbSegNext;
diff --git a/src/utilcode/utilcode.settings.targets b/src/utilcode/utilcode.settings.targets
index 03db64c642..fcb41dc0a4 100644
--- a/src/utilcode/utilcode.settings.targets
+++ b/src/utilcode/utilcode.settings.targets
@@ -13,7 +13,7 @@
<UtilCodeSrcDir>$(_NTDRIVE)$(_NTROOT)\ndp\clr\src\Utilcode</UtilCodeSrcDir>
<!--PCHCompile>$(_NTDRIVE)$(_NTROOT)\ndp\clr\src\Utilcode\stdafx.cpp</PCHCompile>
<PCHObject>stdafx_utilcode.obj</PCHObject-->
- <ClAdditionalOptions>$(ClAdditionalOptions) -DUNICODE -D_UNICODE $(_CRTIMPFLAGS) -DNO_CRT</ClAdditionalOptions>
+ <ClAdditionalOptions>$(ClAdditionalOptions) -DUNICODE -D_UNICODE $(_CRTIMPFLAGS)</ClAdditionalOptions>
<ClAdditionalOptions Condition="'FeatureUtilcodeNoDependencies' != 'true'">$(ClAdditionalOptions) -DENABLE_PERF_COUNTERS</ClAdditionalOptions>
<UserIncludes>
$(UserIncludes);