summaryrefslogtreecommitdiff
path: root/prism/defines.h
diff options
context:
space:
mode:
authorKevin Newton <[email protected]>2023-09-27 12:22:36 -0400
committerKevin Newton <[email protected]>2023-09-27 13:57:38 -0400
commit8ab56869a64fdccc094f4a83c6367fb23b72d38b (patch)
tree46ef2bd5c51d5b7f923eda6a60edefc7a08200db /prism/defines.h
parent7e0971eb5d679bb6219abb0ec238139aa6502c5a (diff)
Rename YARP filepaths to prism filepaths
Diffstat (limited to 'prism/defines.h')
-rw-r--r--prism/defines.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/prism/defines.h b/prism/defines.h
new file mode 100644
index 0000000000..24d33b5e09
--- /dev/null
+++ b/prism/defines.h
@@ -0,0 +1,45 @@
+#ifndef YARP_DEFINES_H
+#define YARP_DEFINES_H
+
+// This file should be included first by any *.h or *.c in YARP
+
+#include <ctype.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+
+// YP_EXPORTED_FUNCTION
+#ifndef YP_EXPORTED_FUNCTION
+# ifdef YP_EXPORT_SYMBOLS
+# ifdef _WIN32
+# define YP_EXPORTED_FUNCTION __declspec(dllexport) extern
+# else
+# define YP_EXPORTED_FUNCTION __attribute__((__visibility__("default"))) extern
+# endif
+# else
+# define YP_EXPORTED_FUNCTION
+# endif
+#endif
+
+// YP_ATTRIBUTE_UNUSED
+#if defined(__GNUC__)
+# define YP_ATTRIBUTE_UNUSED __attribute__((unused))
+#else
+# define YP_ATTRIBUTE_UNUSED
+#endif
+
+// inline
+#if defined(_MSC_VER) && !defined(inline)
+# define inline __inline
+#endif
+
+// Windows versions before 2015 use _snprintf
+#if !defined(snprintf) && defined(_MSC_VER) && (_MSC_VER < 1900)
+# define snprintf _snprintf
+#endif
+
+int yp_strncasecmp(const uint8_t *string1, const uint8_t *string2, size_t length);
+
+#endif