Author: gedmurphy
Date: Mon Jan 4 14:36:59 2010
New Revision: 44926
URL:
http://svn.reactos.org/svn/reactos?rev=44926&view=rev
Log:
Add some of the string safe stuff to the headers.
Modified:
trunk/reactos/include/crt/crtdefs.h
trunk/reactos/include/crt/string.h
Modified: trunk/reactos/include/crt/crtdefs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/crtdefs.h?rev=…
==============================================================================
--- trunk/reactos/include/crt/crtdefs.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/crtdefs.h [iso-8859-1] Mon Jan 4 14:36:59 2010
@@ -163,7 +163,17 @@
/** Deprecated ***************************************************************/
-#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated)
+#ifdef __GNUC__
+#define _CRT_DEPRECATE_TEXT(_Text) __attribute__ ((deprecated))
+#elif defined(_MSC_VER)
+#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
+#else
+#define _CRT_DEPRECATE_TEXT(_Text)
+#endif
+
+#ifndef __STDC_WANT_SECURE_LIB__
+#define __STDC_WANT_SECURE_LIB__ 1
+#endif
#ifndef _CRT_INSECURE_DEPRECATE
# ifdef _CRT_SECURE_NO_DEPRECATE
Modified: trunk/reactos/include/crt/string.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/string.h?rev=4…
==============================================================================
--- trunk/reactos/include/crt/string.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/string.h [iso-8859-1] Mon Jan 4 14:36:59 2010
@@ -101,16 +101,27 @@
#define _WSTRING_DEFINED
_CRTIMP wchar_t *__cdecl _wcsdup(const wchar_t *_Str);
- _CRTIMP wchar_t *__cdecl wcscat(wchar_t *_Dest,const wchar_t *_Source);
+ _CRTIMP _CRT_INSECURE_DEPRECATE(wcsat_s) wchar_t *__cdecl wcscat(wchar_t *_Dest,const
wchar_t *_Source);
+#if __STDC_WANT_SECURE_LIB__
+ _CRTIMP errno_t __cdecl wcsat_s(wchar_t * Dest, size_t SizeInWords, const wchar_t *
_Source);
+#endif
_CRTIMP _CONST_RETURN wchar_t *__cdecl wcschr(const wchar_t *_Str,wchar_t _Ch);
_CRTIMP int __cdecl wcscmp(const wchar_t *_Str1,const wchar_t *_Str2);
- _CRTIMP wchar_t *__cdecl wcscpy(wchar_t *_Dest,const wchar_t *_Source);
+ _CRTIMP _CRT_INSECURE_DEPRECATE(wcscpy_s) wchar_t *__cdecl wcscpy(wchar_t *_Dest,const
wchar_t *_Source);
+#if __STDC_WANT_SECURE_LIB__
+ _CRTIMP errno_t __cdecl wcscpy_s(wchar_t * Dest, size_t SizeInWords, const wchar_t *
_Source);
+#endif
_CRTIMP size_t __cdecl wcscspn(const wchar_t *_Str,const wchar_t *_Control);
_CRTIMP size_t __cdecl wcslen(const wchar_t *_Str);
- _CRTIMP size_t __cdecl wcsnlen(const wchar_t *_Src,size_t _MaxCount);
- _CRTIMP wchar_t *wcsncat(wchar_t *_Dest,const wchar_t *_Source,size_t _Count);
+ _CRTIMP _CRT_INSECURE_DEPRECATE(wcsnlen_s) size_t __cdecl wcsnlen(const wchar_t
*_Src,size_t _MaxCount);
+#if __STDC_WANT_SECURE_LIB__
+ _CRTIMP errno_t __cdecl wcsnlen_s(wchar_t **_Src, size_t _MaxCount);
+#endif
_CRTIMP int __cdecl wcsncmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t
_MaxCount);
- _CRTIMP wchar_t *wcsncpy(wchar_t *_Dest,const wchar_t *_Source,size_t _Count);
+ _CRTIMP _CRT_INSECURE_DEPRECATE(wcsncpy_s) wchar_t *wcsncpy(wchar_t *_Dest,const
wchar_t *_Source,size_t _Count);
+#if __STDC_WANT_SECURE_LIB__
+ _CRTIMP errno_t __cdecl wcsncpy_s(wchar_t *_Dest, size_t SizeInWords, const wchar_t
*_Source ,size_t _Count);
+#endif
_CRTIMP _CONST_RETURN wchar_t *__cdecl wcspbrk(const wchar_t *_Str,const wchar_t
*_Control);
_CRTIMP _CONST_RETURN wchar_t *__cdecl wcsrchr(const wchar_t *_Str,wchar_t _Ch);
_CRTIMP size_t __cdecl wcsspn(const wchar_t *_Str,const wchar_t *_Control);