Change conditional include to avoid conflicts

This commit is contained in:
zawz 2020-11-18 23:52:54 +01:00
parent ddf6711a44
commit cf4cb1c4de
8 changed files with 26 additions and 26 deletions

View file

@ -1,5 +1,5 @@
#ifndef COLOR_HPP
#define COLOR_HPP
#ifndef ZTD_COLOR_HPP
#define ZTD_COLOR_HPP
#include <iostream>
@ -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

View file

@ -1,5 +1,5 @@
#ifndef COMPLEX_HPP
#define COMPLEX_HPP
#ifndef ZTD_COMPLEX_HPP
#define ZTD_COMPLEX_HPP
#include <iostream>
@ -59,4 +59,4 @@ namespace ztd
}
#endif //COMPLEX_HPP
#endif //ZTD_COMPLEX_HPP

View file

@ -1,5 +1,5 @@
#ifndef FILEDAT_HPP
#define FILEDAT_HPP
#ifndef ZTD_FILEDAT_HPP
#define ZTD_FILEDAT_HPP
#include <string>
#include <vector>
@ -442,4 +442,4 @@ namespace ztd
}
#endif //FILEDAT_HPP
#endif //ZTD_FILEDAT_HPP

View file

@ -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

View file

@ -1,5 +1,5 @@
#ifndef SHELL_HPP
#define SHELL_HPP
#ifndef ZTD_SHELL_HPP
#define ZTD_SHELL_HPP
#include <string>
#include <utility>
@ -120,7 +120,7 @@ namespace ztd
@return File descriptor for the stream in question
@see <a href="http://man7.org/linux/man-pages/man3/popen.3.html">popen(), pclose()</a>
*/
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<std::string, int> script(std::string const& data, std::vector<std::string> const& args);
//! @brief Variadic call of script()
template<class... Args>
std::pair<std::string, int> script(std::string const& data, Args... args) { std::vector<std::string> rargs = { static_cast<std::string>(args)...}; return script(data, rargs); }
}
#endif //SHELL_HPP
#endif //ZTD_SHELL_HPP

View file

@ -1,5 +1,5 @@
#ifndef SOCKET_H
#define SOCKET_H
#ifndef ZTD_SOCKET_HPP
#define ZTD_SOCKET_HPP
#include <string>
#include <thread>
@ -221,4 +221,4 @@ namespace ztd
}
#endif //SOCKET_H
#endif //ZTD_SOCKET_HPP

View file

@ -1,5 +1,5 @@
#ifndef TIME_HPP
#define TIME_HPP
#ifndef ZTD_TIME_HPP
#define ZTD_TIME_HPP
#include <sys/time.h>
@ -50,4 +50,4 @@ namespace ztd
}
#endif //TIME_HPP
#endif //ZTD_TIME_HPP

View file

@ -1,5 +1,5 @@
#ifndef WAIT_HPP
#define WAIT_HPP
#ifndef ZTD_WAIT_HPP
#define ZTD_WAIT_HPP
#include <mutex> // std::mutex, std::unique_lock
#include <condition_variable> // std::condition_variable
@ -30,4 +30,4 @@ namespace ztd
};
}
#endif //WAIT_HPP
#endif //ZTD_WAIT_HPP