Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[MSVC] POSIX is not deprecated yet, you bummer
[simgrid.git] / include / xbt / sysdep.h
index d990aaa..3ca9bc8 100644 (file)
@@ -71,6 +71,12 @@ XBT_PUBLIC(char *) bprintf(const char *fmt, ...) _XBT_GNUC_PRINTF(1, 2);
  *  @{
  */
 
  *  @{
  */
 
+#ifdef _MSC_VER
+/* warning C4996: '_strdup': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strdup. */
+/* Blah blah blah */
+# define strdup _strdup
+#endif
+
 /** @brief Like strdup, but xbt_die() on error */
 static XBT_ALWAYS_INLINE char *xbt_strdup(const char *s) {
   char *res = NULL;
 /** @brief Like strdup, but xbt_die() on error */
 static XBT_ALWAYS_INLINE char *xbt_strdup(const char *s) {
   char *res = NULL;