Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVojtech Bubnik <bubnikv@gmail.com>2021-01-11 15:31:30 +0300
committerVojtech Bubnik <bubnikv@gmail.com>2021-01-11 15:31:30 +0300
commit7d751753bc22e3d0c0355e2a940c15db6215ef08 (patch)
tree368af09c5b1a1f4f13b2893bfa0879313ae294e4
parent7a1574a853111b8c069b39e145cf8d8b76042256 (diff)
Replaced __linux macro with __linux__
-rw-r--r--src/libslic3r/GCodeSender.cpp2
-rw-r--r--src/libslic3r/utils.cpp4
-rw-r--r--src/slic3r/GUI/GUI_Preview.cpp2
-rw-r--r--src/slic3r/GUI/InstanceCheck.cpp4
-rw-r--r--src/slic3r/Utils/Process.cpp4
-rw-r--r--src/slic3r/Utils/Serial.cpp2
6 files changed, 9 insertions, 9 deletions
diff --git a/src/libslic3r/GCodeSender.cpp b/src/libslic3r/GCodeSender.cpp
index 7bda29992..275dd61a7 100644
--- a/src/libslic3r/GCodeSender.cpp
+++ b/src/libslic3r/GCodeSender.cpp
@@ -134,7 +134,7 @@ GCodeSender::set_baud_rate(unsigned int baud_rate)
speed_t newSpeed = baud_rate;
ioctl(handle, IOSSIOSPEED, &newSpeed);
::tcsetattr(handle, TCSANOW, &ios);
-#elif __linux
+#elif __linux__
termios2 ios;
if (ioctl(handle, TCGETS2, &ios))
printf("Error in TCGETS2: %s\n", strerror(errno));
diff --git a/src/libslic3r/utils.cpp b/src/libslic3r/utils.cpp
index 2a1d12c1d..0c26d42c8 100644
--- a/src/libslic3r/utils.cpp
+++ b/src/libslic3r/utils.cpp
@@ -39,9 +39,9 @@
#include <tbb/task_scheduler_init.h>
-#if defined(__linux) || defined(__GNUC__ )
+#if defined(__linux__) || defined(__GNUC__ )
#include <strings.h>
-#endif /* __linux */
+#endif /* __linux__ */
#ifdef _MSC_VER
#define strcasecmp _stricmp
diff --git a/src/slic3r/GUI/GUI_Preview.cpp b/src/slic3r/GUI/GUI_Preview.cpp
index e729eedd4..bca27fa21 100644
--- a/src/slic3r/GUI/GUI_Preview.cpp
+++ b/src/slic3r/GUI/GUI_Preview.cpp
@@ -373,7 +373,7 @@ void Preview::reload_print(bool keep_volumes)
m_volumes_cleanup_required = !keep_volumes;
return;
}
-#endif /* __linux __ */
+#endif /* __linux__ */
if (
#ifdef __linux__
m_volumes_cleanup_required ||
diff --git a/src/slic3r/GUI/InstanceCheck.cpp b/src/slic3r/GUI/InstanceCheck.cpp
index 8bf91d01a..6cfa879c8 100644
--- a/src/slic3r/GUI/InstanceCheck.cpp
+++ b/src/slic3r/GUI/InstanceCheck.cpp
@@ -257,7 +257,7 @@ bool instance_check(int argc, char** argv, bool app_config_single_instance)
hashed_path = std::hash<std::string>{}(boost::filesystem::system_complete(argv[0]).string());
#else
boost::system::error_code ec;
-#ifdef __linux
+#ifdef __linux__
// If executed by an AppImage, start the AppImage, not the main process.
// see https://docs.appimage.org/packaging-guide/environment-variables.html#id2
const char *appimage_env = std::getenv("APPIMAGE");
@@ -275,7 +275,7 @@ bool instance_check(int argc, char** argv, bool app_config_single_instance)
BOOST_LOG_TRIVIAL(error) << "APPIMAGE environment variable was set, but it does not point to a valid file: " << appimage_env;
}
if (! appimage_env_valid)
-#endif // __linux
+#endif // __linux__
hashed_path = std::hash<std::string>{}(boost::filesystem::canonical(boost::filesystem::system_complete(argv[0]), ec).string());
if (ec.value() > 0) { // canonical was not able to find the executable (can happen with appimage on some systems. Does it fail on Fuse file systems?)
ec.clear();
diff --git a/src/slic3r/Utils/Process.cpp b/src/slic3r/Utils/Process.cpp
index a8fc59f52..a12fd6647 100644
--- a/src/slic3r/Utils/Process.cpp
+++ b/src/slic3r/Utils/Process.cpp
@@ -93,7 +93,7 @@ static void start_new_slicer_or_gcodeviewer(const NewSlicerInstanceType instance
{
std::vector<const char*> args;
args.reserve(3);
-#ifdef __linux
+#ifdef __linux__
static const char* gcodeviewer_param = "--gcodeviewer";
{
// If executed by an AppImage, start the AppImage, not the main process.
@@ -105,7 +105,7 @@ static void start_new_slicer_or_gcodeviewer(const NewSlicerInstanceType instance
args.emplace_back(gcodeviewer_param);
}
}
-#endif // __linux
+#endif // __linux__
std::string my_path;
if (args.empty()) {
// Binary path was not set to the AppImage in the Linux specific block above, call the application directly.
diff --git a/src/slic3r/Utils/Serial.cpp b/src/slic3r/Utils/Serial.cpp
index 0c1ad1de5..4db1acc6b 100644
--- a/src/slic3r/Utils/Serial.cpp
+++ b/src/slic3r/Utils/Serial.cpp
@@ -313,7 +313,7 @@ void Serial::set_baud_rate(unsigned baud_rate)
speed_t newSpeed = baud_rate;
handle_errno(::ioctl(handle, IOSSIOSPEED, &newSpeed));
handle_errno(::tcsetattr(handle, TCSANOW, &ios));
-#elif __linux
+#elif __linux__
/* The following definitions are kindly borrowed from:
/usr/include/asm-generic/termbits.h