From: Martin Quinson Date: Sat, 12 Sep 2015 23:01:59 +0000 (+0200) Subject: [MSVC] POSIX is not deprecated yet, you bummer X-Git-Tag: v3_12~234 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b4fdc66c6172f7b1e5b487f4155ee93a6ccab5a6?hp=de8cfa17c0e30bf9dccf0b0c9ecaff7858926f04 [MSVC] POSIX is not deprecated yet, you bummer --- diff --git a/include/simgrid_config.h.in b/include/simgrid_config.h.in index 5b362cb535..354fceccc7 100644 --- a/include/simgrid_config.h.in +++ b/include/simgrid_config.h.in @@ -64,8 +64,6 @@ #else typedef long ssize_t; #endif - #define snprintf _snprintf - #define strdup _strdup #endif /* Define to 1 if mmalloc is compiled in. */ diff --git a/include/xbt/sysdep.h b/include/xbt/sysdep.h index d990aaa0e9..3ca9bc8c8d 100644 --- a/include/xbt/sysdep.h +++ b/include/xbt/sysdep.h @@ -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;