Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
s/HAVE_SENDFILE/SG_HAVE_SENDFILE/
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Tue, 8 Jan 2019 07:51:01 +0000 (08:51 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Tue, 8 Jan 2019 07:51:05 +0000 (08:51 +0100)
Now that the python-bindings load the private headers too (to get
Context::StopRequest() in Context.hpp), we get some naming conflict.
Interestingly, that's only visible on some architectures, not globally.

CMakeLists.txt
src/internal_config.h.in
src/smpi/internals/smpi_global.cpp

index f934f2f..3e90c9a 100644 (file)
@@ -327,9 +327,9 @@ endif()
 CHECK_INCLUDE_FILE("sys/sendfile.h" HAVE_SENDFILE_H)
 CHECK_FUNCTION_EXISTS(sendfile HAVE_SENDFILE)
 if(HAVE_SENDFILE_H AND HAVE_SENDFILE)
 CHECK_INCLUDE_FILE("sys/sendfile.h" HAVE_SENDFILE_H)
 CHECK_FUNCTION_EXISTS(sendfile HAVE_SENDFILE)
 if(HAVE_SENDFILE_H AND HAVE_SENDFILE)
-  set(HAVE_SENDFILE 1)
+  set(SG_HAVE_SENDFILE 1)
 else()
 else()
-  set(HAVE_SENDFILE 0)
+  set(SG_HAVE_SENDFILE 0)
 endif()
 
 if(enable_model-checking AND NOT "${CMAKE_SYSTEM}" MATCHES "Linux|FreeBSD")
 endif()
 
 if(enable_model-checking AND NOT "${CMAKE_SYSTEM}" MATCHES "Linux|FreeBSD")
index 795d389..c32f594 100644 (file)
@@ -77,7 +77,7 @@
 /* We have PAPI to fine-grain trace execution time */
 #cmakedefine01 HAVE_PAPI
 /* We have sendfile to efficiently copy files for dl-open privatization */
 /* We have PAPI to fine-grain trace execution time */
 #cmakedefine01 HAVE_PAPI
 /* We have sendfile to efficiently copy files for dl-open privatization */
-#cmakedefine01 HAVE_SENDFILE
+#cmakedefine01 SG_HAVE_SENDFILE
 
 /* Other function checks */
 /* Function dlfunc */
 
 /* Other function checks */
 /* Function dlfunc */
index 92e4e75..c337d3e 100644 (file)
@@ -37,7 +37,7 @@
 # define HAVE_WORKING_MMAP 1
 #endif
 
 # define HAVE_WORKING_MMAP 1
 #endif
 
-#if HAVE_SENDFILE
+#if SG_HAVE_SENDFILE
 #include <sys/sendfile.h>
 #endif
 
 #include <sys/sendfile.h>
 #endif
 
@@ -498,7 +498,7 @@ static void smpi_copy_file(std::string src, std::string target, off_t fdin_size)
 
   XBT_DEBUG("Copy %" PRIdMAX " bytes into %s", static_cast<intmax_t>(fdin_size), target.c_str());
   bool slow_copy = true;
 
   XBT_DEBUG("Copy %" PRIdMAX " bytes into %s", static_cast<intmax_t>(fdin_size), target.c_str());
   bool slow_copy = true;
-#if HAVE_SENDFILE
+#if SG_HAVE_SENDFILE
   ssize_t sent_size = sendfile(fdout, fdin, NULL, fdin_size);
   if (sent_size == fdin_size)
     slow_copy = false;
   ssize_t sent_size = sendfile(fdout, fdin, NULL, fdin_size);
   if (sent_size == fdin_size)
     slow_copy = false;