summaryrefslogtreecommitdiff
path: root/src/pal/inc/pal_safecrt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/inc/pal_safecrt.h')
-rw-r--r--src/pal/inc/pal_safecrt.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/pal/inc/pal_safecrt.h b/src/pal/inc/pal_safecrt.h
new file mode 100644
index 0000000000..d9e76cd783
--- /dev/null
+++ b/src/pal/inc/pal_safecrt.h
@@ -0,0 +1,55 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+/*++
+
+
+
+Module Name:
+
+ pal_safecrt.h
+
+Abstract:
+
+Wrapper for including SafeCRT for Mac build of CoreCLR
+
+
+
+--*/
+
+#ifndef _PAL_SAFECRT_H_
+#define _PAL_SAFECRT_H_
+
+#define _CRT_ALTERNATIVE_INLINES
+#define _SAFECRT_NO_INCLUDES 1
+
+#if !defined (_SAFECRT_USE_INLINES)
+#define _SAFECRT_USE_INLINES 0
+#endif
+
+#if !defined (_SAFECRT_IMPL)
+#define _SAFECRT_IMPL 0
+#endif
+
+#define _SAFECRT_SET_ERRNO 0
+#define _SAFECRT_DEFINE_MBS_FUNCTIONS 0
+#define _SAFECRT_DEFINE_TCS_MACROS 1
+//#define _SAFECRT_INVALID_PARAMETER(message) WARN(message "\n")
+
+#if defined (SAFECRT_IN_PAL)
+
+#define DUMMY_memset void * __cdecl memset(void *, int, size_t);
+
+#endif
+
+// Include the safecrt implementation
+#include "../../palrt/inc/safecrt.h"
+
+#if defined(SAFECRT_IN_PAL)
+
+#define DUMMY_memset
+
+#endif
+
+#endif // _PAL_SAFECRT_H_