aboutsummaryrefslogtreecommitdiff
path: root/tcc/include/sec_api/stralign_s.h
diff options
context:
space:
mode:
authorIndrajith K L2022-12-03 17:00:20 +0530
committerIndrajith K L2022-12-03 17:00:20 +0530
commitf5c4671bfbad96bf346bd7e9a21fc4317b4959df (patch)
tree2764fc62da58f2ba8da7ed341643fc359873142f /tcc/include/sec_api/stralign_s.h
downloadcli-tools-windows-master.tar.gz
cli-tools-windows-master.tar.bz2
cli-tools-windows-master.zip
Adds most of the toolsHEADmaster
Diffstat (limited to 'tcc/include/sec_api/stralign_s.h')
-rw-r--r--tcc/include/sec_api/stralign_s.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/tcc/include/sec_api/stralign_s.h b/tcc/include/sec_api/stralign_s.h
new file mode 100644
index 0000000..5b78f58
--- /dev/null
+++ b/tcc/include/sec_api/stralign_s.h
@@ -0,0 +1,30 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef __STRALIGN_H_S_
+#define __STRALIGN_H_S_
+
+#include <stralign.h>
+
+#if defined(MINGW_HAS_SECURE_API)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(I_X86_) && defined(_WSTRING_S_DEFINED)
+#if defined(__cplusplus) && defined(_WConst_Return)
+ static __inline PUWSTR ua_wcscpy_s(PUWSTR Destination,size_t DestinationSize,PCUWSTR Source) {
+ if(WSTR_ALIGNED(Source) && WSTR_ALIGNED(Destination)) return (wcscpy_s((PWSTR)Destination,DestinationSize,(PCWSTR)Source)==0 ? Destination : NULL);
+ return uaw_wcscpy((PCUWSTR)String,Character);
+ }
+#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+#endif