aboutsummaryrefslogtreecommitdiff
path: root/build/tools/HLSLcc/May_2014/src/cbstring/bsafe.h
diff options
context:
space:
mode:
authorlbavoil <[email protected]>2016-03-25 13:01:54 +0100
committerlbavoil <[email protected]>2016-03-25 13:01:54 +0100
commit99174e4e5fb4b7079da80b35a6dfd68f3fd56a1c (patch)
treefbcd4260d6c953d569a887505336a1c3f202e10f /build/tools/HLSLcc/May_2014/src/cbstring/bsafe.h
downloadhbaoplus-99174e4e5fb4b7079da80b35a6dfd68f3fd56a1c.tar.xz
hbaoplus-99174e4e5fb4b7079da80b35a6dfd68f3fd56a1c.zip
GFSDK_HBAO+_distro_r3.0_cl20573789
Diffstat (limited to 'build/tools/HLSLcc/May_2014/src/cbstring/bsafe.h')
-rw-r--r--build/tools/HLSLcc/May_2014/src/cbstring/bsafe.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/build/tools/HLSLcc/May_2014/src/cbstring/bsafe.h b/build/tools/HLSLcc/May_2014/src/cbstring/bsafe.h
new file mode 100644
index 0000000..eb41ec2
--- /dev/null
+++ b/build/tools/HLSLcc/May_2014/src/cbstring/bsafe.h
@@ -0,0 +1,43 @@
+/*
+ * This source file is part of the bstring string library. This code was
+ * written by Paul Hsieh in 2002-2010, and is covered by either the 3-clause
+ * BSD open source license or GPL v2.0. Refer to the accompanying documentation
+ * for details on usage and license.
+ */
+
+/*
+ * bsafe.h
+ *
+ * This is an optional module that can be used to help enforce a safety
+ * standard based on pervasive usage of bstrlib. This file is not necessarily
+ * portable, however, it has been tested to work correctly with Intel's C/C++
+ * compiler, WATCOM C/C++ v11.x and Microsoft Visual C++.
+ */
+
+#ifndef BSTRLIB_BSAFE_INCLUDE
+#define BSTRLIB_BSAFE_INCLUDE
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined (__GNUC__) && (!defined(_MSC_VER) || (_MSC_VER <= 1310))
+/* This is caught in the linker, so its not necessary for gcc. */
+extern char * (gets) (char * buf);
+#endif
+
+extern char * (strncpy) (char *dst, const char *src, size_t n);
+extern char * (strncat) (char *dst, const char *src, size_t n);
+extern char * (strtok) (char *s1, const char *s2);
+extern char * (strdup) (const char *s);
+
+#undef strcpy
+#undef strcat
+#define strcpy(a,b) bsafe_strcpy(a,b)
+#define strcat(a,b) bsafe_strcat(a,b)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif