Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use standard __func__ instead of __FUNCTION__.
[simgrid.git] / src / smpi / bindings / smpi_mpi.cpp
index 09ed672..ddf92bd 100644 (file)
@@ -4,13 +4,13 @@
  * under the terms of the license ,(GNU LGPL) which comes with this package. */
 
 #include "private.hpp"
-#include "simgrid/sg_config.h"
+#include "simgrid/sg_config.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_mpi, smpi, "Logging specific to SMPI ,(mpi)");
 
 #define NOT_YET_IMPLEMENTED                                                                                            \
   {                                                                                                                    \
-    xbt_die("Not yet implemented: %s. Please contact the SimGrid team if support is needed", __FUNCTION__);            \
+    xbt_die("Not yet implemented: %s. Please contact the SimGrid team if support is needed", __func__);                \
     return MPI_SUCCESS;                                                                                                \
   }
 
@@ -21,18 +21,19 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_mpi, smpi, "Logging specific to SMPI ,(mpi)
       XBT_WARN("Not yet implemented: %s. "                                                                             \
                "Please contact the SimGrid team if support is needed. "                                                \
                "Run with --log=smpi_mpi.thresh:error to hide",                                                         \
-               __FUNCTION__);                                                                                          \
+               __func__);                                                                                              \
     warning_todo = false;                                                                                              \
     return MPI_SUCCESS;                                                                                                \
   }
 
-#define WRAPPED_PMPI_CALL(type,name,args,args2) \
-type name args { \
-  XBT_VERB("SMPI - Entering %s", __FUNCTION__);\
-  type ret = P##name args2 ; \
-  XBT_VERB("SMPI - Leaving %s", __FUNCTION__);\
-  return ret;\
-}\
+#define WRAPPED_PMPI_CALL(type, name, args, args2)                                                                     \
+  type name args                                                                                                       \
+  {                                                                                                                    \
+    XBT_VERB("SMPI - Entering %s", __func__);                                                                          \
+    type ret = P##name args2;                                                                                          \
+    XBT_VERB("SMPI - Leaving %s", __func__);                                                                           \
+    return ret;                                                                                                        \
+  }
 
 #define UNIMPLEMENTED_WRAPPED_PMPI_CALL(type,name,args,args2) \
 type P##name args { \
@@ -52,7 +53,6 @@ return P##name args2 ; \
 
 
 /* MPI User level calls */
-extern "C" { // Obviously, the C MPI interface should use the C linkage
 
 WRAPPED_PMPI_CALL(double, MPI_Wtick,(void),())
 WRAPPED_PMPI_CALL(double, MPI_Wtime,(void),())
@@ -397,5 +397,3 @@ UNIMPLEMENTED_WRAPPED_PMPI_CALL_NOFAIL(int,MPI_Win_set_errhandler,(MPI_Win win,
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Win_test,(MPI_Win win, int *flag),(win, flag))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL_NOFAIL(MPI_Errhandler, MPI_Errhandler_f2c,(MPI_Fint errhandler),(errhandler))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL_NOFAIL(MPI_Fint, MPI_Errhandler_c2f,(MPI_Errhandler errhandler),(errhandler))
-
-} // extern "C"