From cf4cb1c4deb6a49cac0cf6e7f24d906a0142e34c Mon Sep 17 00:00:00 2001 From: zawz Date: Wed, 18 Nov 2020 23:52:54 +0100 Subject: [PATCH] Change conditional include to avoid conflicts --- include/color.hpp | 6 +++--- include/complex.hpp | 6 +++--- include/filedat.hpp | 6 +++--- include/options.hpp | 6 +++--- include/shell.hpp | 10 +++++----- include/socket.hpp | 6 +++--- include/time.hpp | 6 +++--- include/wait.hpp | 6 +++--- 8 files changed, 26 insertions(+), 26 deletions(-) diff --git a/include/color.hpp b/include/color.hpp index 4f5fc11..c2e7827 100644 --- a/include/color.hpp +++ b/include/color.hpp @@ -1,5 +1,5 @@ -#ifndef COLOR_HPP -#define COLOR_HPP +#ifndef ZTD_COLOR_HPP +#define ZTD_COLOR_HPP #include @@ -122,4 +122,4 @@ namespace ztd inline std::ostream& operator<<(std::ostream& st, const ztd::color::color_name& c) { return st << ztd::color::color_index[c]; } } -#endif //COLOR_HPP +#endif //ZTD_COLOR_HPP diff --git a/include/complex.hpp b/include/complex.hpp index f42143d..e11f4b0 100644 --- a/include/complex.hpp +++ b/include/complex.hpp @@ -1,5 +1,5 @@ -#ifndef COMPLEX_HPP -#define COMPLEX_HPP +#ifndef ZTD_COMPLEX_HPP +#define ZTD_COMPLEX_HPP #include @@ -59,4 +59,4 @@ namespace ztd } -#endif //COMPLEX_HPP +#endif //ZTD_COMPLEX_HPP diff --git a/include/filedat.hpp b/include/filedat.hpp index 7cb20bb..ad1e872 100644 --- a/include/filedat.hpp +++ b/include/filedat.hpp @@ -1,5 +1,5 @@ -#ifndef FILEDAT_HPP -#define FILEDAT_HPP +#ifndef ZTD_FILEDAT_HPP +#define ZTD_FILEDAT_HPP #include #include @@ -442,4 +442,4 @@ namespace ztd } -#endif //FILEDAT_HPP +#endif //ZTD_FILEDAT_HPP diff --git a/include/options.hpp b/include/options.hpp index 729ed2b..3e46513 100644 --- a/include/options.hpp +++ b/include/options.hpp @@ -1,5 +1,5 @@ -#ifndef OPTIONS_H -#define OPTIONS_H +#ifndef ZTD_OPTIONS_HPP +#define ZTD_OPTIONS_HPP //DUPLICATES NOT HANDLED: takes last one //NO ORDER: no way to know options order @@ -177,4 +177,4 @@ namespace ztd } //ztd -#endif //OPTIONS_H +#endif //ZTD_OPTIONS_HPP diff --git a/include/shell.hpp b/include/shell.hpp index 5d8cd8a..880fc57 100644 --- a/include/shell.hpp +++ b/include/shell.hpp @@ -1,5 +1,5 @@ -#ifndef SHELL_HPP -#define SHELL_HPP +#ifndef ZTD_SHELL_HPP +#define ZTD_SHELL_HPP #include #include @@ -120,7 +120,7 @@ namespace ztd @return File descriptor for the stream in question @see popen(), pclose() */ - inline FILE* popen2(const char* command, const char* type, int* pid) { return eopen(type, pid, "/bin/sh", {"-c", (char*) command}) ; } + inline FILE* popen2(const char* command, const char* type, int* pid) { return eopen(type, pid, "/bin/sh", {(char*) "-c", (char*) command}) ; } //! @brief pclose C function with added pid functionality /*! @param fd @@ -150,11 +150,11 @@ namespace ztd @param args Arguments given to the file */ std::pair script(std::string const& data, std::vector const& args); - + //! @brief Variadic call of script() template std::pair script(std::string const& data, Args... args) { std::vector rargs = { static_cast(args)...}; return script(data, rargs); } } -#endif //SHELL_HPP +#endif //ZTD_SHELL_HPP diff --git a/include/socket.hpp b/include/socket.hpp index 29f16b7..cac76e0 100644 --- a/include/socket.hpp +++ b/include/socket.hpp @@ -1,5 +1,5 @@ -#ifndef SOCKET_H -#define SOCKET_H +#ifndef ZTD_SOCKET_HPP +#define ZTD_SOCKET_HPP #include #include @@ -221,4 +221,4 @@ namespace ztd } -#endif //SOCKET_H +#endif //ZTD_SOCKET_HPP diff --git a/include/time.hpp b/include/time.hpp index 9863e05..4ab986a 100644 --- a/include/time.hpp +++ b/include/time.hpp @@ -1,5 +1,5 @@ -#ifndef TIME_HPP -#define TIME_HPP +#ifndef ZTD_TIME_HPP +#define ZTD_TIME_HPP #include @@ -50,4 +50,4 @@ namespace ztd } -#endif //TIME_HPP +#endif //ZTD_TIME_HPP diff --git a/include/wait.hpp b/include/wait.hpp index 82dcf8a..19d5adb 100644 --- a/include/wait.hpp +++ b/include/wait.hpp @@ -1,5 +1,5 @@ -#ifndef WAIT_HPP -#define WAIT_HPP +#ifndef ZTD_WAIT_HPP +#define ZTD_WAIT_HPP #include // std::mutex, std::unique_lock #include // std::condition_variable @@ -30,4 +30,4 @@ namespace ztd }; } -#endif //WAIT_HPP +#endif //ZTD_WAIT_HPP