Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[MSVC] POSIX is not deprecated yet, you bummer
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 12 Sep 2015 23:01:59 +0000 (01:01 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 12 Sep 2015 23:01:59 +0000 (01:01 +0200)
include/simgrid_config.h.in
include/xbt/sysdep.h

index 5b362cb..354fcec 100644 (file)
@@ -64,8 +64,6 @@
        #else
                typedef long ssize_t;
        #endif
        #else
                typedef long ssize_t;
        #endif
-       #define snprintf _snprintf
-       #define strdup   _strdup
 #endif
 
 /* Define to 1 if mmalloc is compiled in. */
 #endif
 
 /* Define to 1 if mmalloc is compiled in. */
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;