diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-06-23 14:31:26 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-06-23 14:31:26 +0200 |
commit | e652a49cbac1098dd97695309336545ef4e9ae89 (patch) | |
tree | 1af0a5270d06e05e788c1342e1cc35723106b7ec | |
parent | c36042925c8d52e3899ea310018cb7243d191306 (diff) |
Rename LIBBUTL_EXPORT to LIBBUTL_SYMEXPORT in preparation for modularization
-rw-r--r-- | libbutl/base64.hxx | 12 | ||||
-rw-r--r-- | libbutl/char-scanner.hxx | 2 | ||||
-rw-r--r-- | libbutl/curl.hxx | 2 | ||||
-rw-r--r-- | libbutl/diagnostics.hxx | 6 | ||||
-rw-r--r-- | libbutl/export.hxx | 14 | ||||
-rw-r--r-- | libbutl/fdstream.hxx | 36 | ||||
-rw-r--r-- | libbutl/filesystem.hxx | 46 | ||||
-rw-r--r-- | libbutl/manifest-parser.hxx | 4 | ||||
-rw-r--r-- | libbutl/manifest-serializer.hxx | 4 | ||||
-rw-r--r-- | libbutl/openssl.hxx | 2 | ||||
-rw-r--r-- | libbutl/pager.hxx | 2 | ||||
-rw-r--r-- | libbutl/path.cxx | 28 | ||||
-rw-r--r-- | libbutl/path.hxx | 2 | ||||
-rw-r--r-- | libbutl/process-run.txx | 2 | ||||
-rw-r--r-- | libbutl/process.hxx | 4 | ||||
-rw-r--r-- | libbutl/regex.hxx | 2 | ||||
-rw-r--r-- | libbutl/sendmail.hxx | 2 | ||||
-rw-r--r-- | libbutl/sha256.hxx | 6 | ||||
-rw-r--r-- | libbutl/standard-version.hxx | 4 | ||||
-rw-r--r-- | libbutl/string-parser.hxx | 4 | ||||
-rw-r--r-- | libbutl/tab-parser.hxx | 4 | ||||
-rw-r--r-- | libbutl/target-triplet.hxx | 2 | ||||
-rw-r--r-- | libbutl/timestamp.hxx | 10 | ||||
-rw-r--r-- | libbutl/utility.hxx | 8 | ||||
-rw-r--r-- | libbutl/win32-utility.hxx | 4 |
25 files changed, 106 insertions, 106 deletions
diff --git a/libbutl/base64.hxx b/libbutl/base64.hxx index 29c6198..748dcfa 100644 --- a/libbutl/base64.hxx +++ b/libbutl/base64.hxx @@ -20,13 +20,13 @@ namespace butl // if it has badbit, failbit, or eofbit set and throw invalid_argument if // that's the case. Otherwise set badbit if the write operation fails. // - LIBBUTL_EXPORT void + LIBBUTL_SYMEXPORT void base64_encode (std::ostream&, std::istream&); - LIBBUTL_EXPORT std::string + LIBBUTL_SYMEXPORT std::string base64_encode (std::istream&); - LIBBUTL_EXPORT std::string + LIBBUTL_SYMEXPORT std::string base64_encode (const std::vector<char>&); // Base64-decode a stream or a string. Throw invalid_argument if the input @@ -37,13 +37,13 @@ namespace butl // invalid_argument if that's the case. Otherwise set badbit if the write // operation fails. // - LIBBUTL_EXPORT void + LIBBUTL_SYMEXPORT void base64_decode (std::ostream&, std::istream&); - LIBBUTL_EXPORT void + LIBBUTL_SYMEXPORT void base64_decode (std::ostream&, const std::string&); - LIBBUTL_EXPORT std::vector<char> + LIBBUTL_SYMEXPORT std::vector<char> base64_decode (const std::string&); } diff --git a/libbutl/char-scanner.hxx b/libbutl/char-scanner.hxx index 80a1f2a..3aa1e0d 100644 --- a/libbutl/char-scanner.hxx +++ b/libbutl/char-scanner.hxx @@ -18,7 +18,7 @@ namespace butl // Low-level character stream scanner. Normally used as a base for // higher-level lexers. // - class LIBBUTL_EXPORT char_scanner + class LIBBUTL_SYMEXPORT char_scanner { public: // If the crlf argument is true, then recognize Windows newlines (0x0D diff --git a/libbutl/curl.hxx b/libbutl/curl.hxx index bc4eb0f..19105ef 100644 --- a/libbutl/curl.hxx +++ b/libbutl/curl.hxx @@ -86,7 +86,7 @@ namespace butl // 3. Only binary data HTTP POST is currently supported (the --data-binary // curl option). // - class LIBBUTL_EXPORT curl: public process + class LIBBUTL_SYMEXPORT curl: public process { public: enum method_type {get, put, post}; diff --git a/libbutl/diagnostics.hxx b/libbutl/diagnostics.hxx index b5ff1e6..c195ba0 100644 --- a/libbutl/diagnostics.hxx +++ b/libbutl/diagnostics.hxx @@ -26,13 +26,13 @@ namespace butl // prevent this an object of diag_lock type (see below) must be created prior // to write operation. // - LIBBUTL_EXPORT extern std::ostream* diag_stream; + LIBBUTL_SYMEXPORT extern std::ostream* diag_stream; // Acquire the diagnostics exclusive access mutex in ctor, release in dtor. // An object of the type must be created prior to writing to diag_stream (see // above). // - struct LIBBUTL_EXPORT diag_lock + struct LIBBUTL_SYMEXPORT diag_lock { diag_lock (); ~diag_lock (); @@ -44,7 +44,7 @@ namespace butl using diag_epilogue = void (const diag_record&); - struct LIBBUTL_EXPORT diag_record + struct LIBBUTL_SYMEXPORT diag_record { template <typename T> friend const diag_record& diff --git a/libbutl/export.hxx b/libbutl/export.hxx index f0529de..3c2d2a9 100644 --- a/libbutl/export.hxx +++ b/libbutl/export.hxx @@ -14,20 +14,20 @@ // the end it's all trial and error. #if defined(LIBBUTL_STATIC) // Using static. -# define LIBBUTL_EXPORT +# define LIBBUTL_SYMEXPORT #elif defined(LIBBUTL_STATIC_BUILD) // Building static. -# define LIBBUTL_EXPORT +# define LIBBUTL_SYMEXPORT #elif defined(LIBBUTL_SHARED) // Using shared. # ifdef _WIN32 -# define LIBBUTL_EXPORT __declspec(dllimport) +# define LIBBUTL_SYMEXPORT __declspec(dllimport) # else -# define LIBBUTL_EXPORT +# define LIBBUTL_SYMEXPORT # endif #elif defined(LIBBUTL_SHARED_BUILD) // Building shared. # ifdef _WIN32 -# define LIBBUTL_EXPORT __declspec(dllexport) +# define LIBBUTL_SYMEXPORT __declspec(dllexport) # else -# define LIBBUTL_EXPORT +# define LIBBUTL_SYMEXPORT # endif #else // If none of the above macros are defined, then we assume we are being used @@ -35,7 +35,7 @@ // type. Note that this fallback works for both static and shared but in case // of shared will be sub-optimal compared to having dllimport. // -# define LIBBUTL_EXPORT // Using static or shared. +# define LIBBUTL_SYMEXPORT // Using static or shared. #endif #endif // LIBBUTL_EXPORT_HXX diff --git a/libbutl/fdstream.hxx b/libbutl/fdstream.hxx index 27530e2..752f8ab 100644 --- a/libbutl/fdstream.hxx +++ b/libbutl/fdstream.hxx @@ -28,7 +28,7 @@ namespace butl struct nullfd_t {constexpr explicit nullfd_t (int) {}}; constexpr const nullfd_t nullfd (-1); - class LIBBUTL_EXPORT auto_fd + class LIBBUTL_SYMEXPORT auto_fd { public: auto_fd (nullfd_t = nullfd) noexcept: fd_ (-1) {} @@ -96,7 +96,7 @@ namespace butl // - passing to constructor auto_fd with a negative file descriptor is valid // and results in the creation of an unopened object // - class LIBBUTL_EXPORT fdbuf: public std::basic_streambuf<char> + class LIBBUTL_SYMEXPORT fdbuf: public std::basic_streambuf<char> { public: fdbuf () = default; @@ -237,7 +237,7 @@ namespace butl inline fdopen_mode operator&= (fdopen_mode&, fdopen_mode); inline fdopen_mode operator|= (fdopen_mode&, fdopen_mode); - class LIBBUTL_EXPORT fdstream_base + class LIBBUTL_SYMEXPORT fdstream_base { protected: fdstream_base () = default; @@ -337,7 +337,7 @@ namespace butl // // throw failed (); // - class LIBBUTL_EXPORT ifdstream: public fdstream_base, public std::istream + class LIBBUTL_SYMEXPORT ifdstream: public fdstream_base, public std::istream { public: // Create an unopened object. @@ -433,7 +433,7 @@ namespace butl // (std::uncaught_exception() == true). This is enforced with assert() in // the ofdstream destructor. // - class LIBBUTL_EXPORT ofdstream: public fdstream_base, public std::ostream + class LIBBUTL_SYMEXPORT ofdstream: public fdstream_base, public std::ostream { public: // Create an unopened object. @@ -515,7 +515,7 @@ namespace butl // - The fail and eof bits may be left cleared in the stream exception mask // when the function throws because of badbit. // - LIBBUTL_EXPORT ifdstream& + LIBBUTL_SYMEXPORT ifdstream& getline (ifdstream&, std::string&, char delim = '\n'); // Open a file returning an auto_fd that holds its file descriptor on @@ -539,21 +539,21 @@ namespace butl // purpose, the _O_NOINHERIT flag is set. Note that the process class, that // passes such a descriptor to the child, makes it inheritable for a while. // - LIBBUTL_EXPORT auto_fd + LIBBUTL_SYMEXPORT auto_fd fdopen (const char*, fdopen_mode, permissions = permissions::ru | permissions::wu | permissions::rg | permissions::wg | permissions::ro | permissions::wo); - LIBBUTL_EXPORT auto_fd + LIBBUTL_SYMEXPORT auto_fd fdopen (const std::string&, fdopen_mode, permissions = permissions::ru | permissions::wu | permissions::rg | permissions::wg | permissions::ro | permissions::wo); - LIBBUTL_EXPORT auto_fd + LIBBUTL_SYMEXPORT auto_fd fdopen (const path&, fdopen_mode, permissions = permissions::ru | permissions::wu | @@ -577,7 +577,7 @@ namespace butl // regards to child process spawning (to prevent file descriptor leakage into // a child process). // - LIBBUTL_EXPORT auto_fd + LIBBUTL_SYMEXPORT auto_fd fddup (int fd); // Set the translation mode for the file descriptor. Throw invalid_argument @@ -592,15 +592,15 @@ namespace butl // system. Non-blocking mode is not supported on Windows and so the blocking // mode is assumed regardless of the flags. // - LIBBUTL_EXPORT fdstream_mode + LIBBUTL_SYMEXPORT fdstream_mode fdmode (int, fdstream_mode); // Convenience functions for setting the translation mode for standard // streams. // - LIBBUTL_EXPORT fdstream_mode stdin_fdmode (fdstream_mode); - LIBBUTL_EXPORT fdstream_mode stdout_fdmode (fdstream_mode); - LIBBUTL_EXPORT fdstream_mode stderr_fdmode (fdstream_mode); + LIBBUTL_SYMEXPORT fdstream_mode stdin_fdmode (fdstream_mode); + LIBBUTL_SYMEXPORT fdstream_mode stdout_fdmode (fdstream_mode); + LIBBUTL_SYMEXPORT fdstream_mode stderr_fdmode (fdstream_mode); // Low-level, nothrow file descriptor API. // @@ -608,7 +608,7 @@ namespace butl // Close the file descriptor. Return true on success, set errno and return // false otherwise. // - LIBBUTL_EXPORT bool + LIBBUTL_SYMEXPORT bool fdclose (int) noexcept; // Open the null device (e.g., /dev/null) that discards all data written to @@ -634,10 +634,10 @@ namespace butl // purpose, the _O_NOINHERIT flag is set. // #ifndef _WIN32 - LIBBUTL_EXPORT auto_fd + LIBBUTL_SYMEXPORT auto_fd fdnull () noexcept; #else - LIBBUTL_EXPORT auto_fd + LIBBUTL_SYMEXPORT auto_fd fdnull (bool temp = false) noexcept; #endif @@ -672,7 +672,7 @@ namespace butl // other threads). Also note that you don't need to reset the flag for a pipe // end being passed to the process class ctor. // - LIBBUTL_EXPORT fdpipe + LIBBUTL_SYMEXPORT fdpipe fdopen_pipe (fdopen_mode = fdopen_mode::none); } diff --git a/libbutl/filesystem.hxx b/libbutl/filesystem.hxx index 35bab9f..e23fcd3 100644 --- a/libbutl/filesystem.hxx +++ b/libbutl/filesystem.hxx @@ -36,7 +36,7 @@ namespace butl // Return true if the path is to an existing regular file. Note that by // default this function follows symlinks. // - LIBBUTL_EXPORT bool + LIBBUTL_SYMEXPORT bool file_exists (const char*, bool follow_symlinks = true); inline bool @@ -46,7 +46,7 @@ namespace butl // Return true if the path is to an existing directory. Note that this // function follows symlinks. // - LIBBUTL_EXPORT bool + LIBBUTL_SYMEXPORT bool dir_exists (const char*); inline bool @@ -55,7 +55,7 @@ namespace butl // Return true if the path is to an existing file system entry. Note that by // default this function doesn't follow symlinks. // - LIBBUTL_EXPORT bool + LIBBUTL_SYMEXPORT bool entry_exists (const char*, bool follow_symlinks = false); inline bool @@ -85,7 +85,7 @@ namespace butl // and its type if so. Note that by default this function doesn't follow // symlinks. // - LIBBUTL_EXPORT std::pair<bool, entry_stat> + LIBBUTL_SYMEXPORT std::pair<bool, entry_stat> path_entry (const char*, bool follow_symlinks = false); inline std::pair<bool, entry_stat> @@ -117,13 +117,13 @@ namespace butl // enum class mkdir_status {success, already_exists}; - LIBBUTL_EXPORT mkdir_status + LIBBUTL_SYMEXPORT mkdir_status try_mkdir (const dir_path&, mode_t = 0777); // The '-p' version of the above (i.e., it creates the parent // directories if necessary). // - LIBBUTL_EXPORT mkdir_status + LIBBUTL_SYMEXPORT mkdir_status try_mkdir_p (const dir_path&, mode_t = 0777); // Try to remove the directory returning not_exist if it does not exist @@ -132,20 +132,20 @@ namespace butl // enum class rmdir_status {success, not_exist, not_empty}; - LIBBUTL_EXPORT rmdir_status + LIBBUTL_SYMEXPORT rmdir_status try_rmdir (const dir_path&, bool ignore_error = false); // The '-r' (recursive) version of the above. Note that it will // never return not_empty. // - LIBBUTL_EXPORT rmdir_status + LIBBUTL_SYMEXPORT rmdir_status try_rmdir_r (const dir_path&, bool ignore_error = false); // As above but throws rather than returns not_exist if the directory // does not exist (unless ignore_error is true), so check before calling. // If the second argument is false, then the directory itself is not removed. // - LIBBUTL_EXPORT void + LIBBUTL_SYMEXPORT void rmdir_r (const dir_path&, bool dir = true, bool ignore_error = false); // Try to remove the file (or symlinks) returning not_exist if @@ -154,7 +154,7 @@ namespace butl // enum class rmfile_status {success, not_exist}; - LIBBUTL_EXPORT rmfile_status + LIBBUTL_SYMEXPORT rmfile_status try_rmfile (const path&, bool ignore_error = false); // Automatically try to remove the path on destruction unless cancelled. @@ -194,7 +194,7 @@ namespace butl // // Note that Windows symlinks are currently not supported. // - LIBBUTL_EXPORT void + LIBBUTL_SYMEXPORT void mksymlink (const path& target, const path& link, bool dir = false); // Create a symbolic link to a directory. Throw std::system_error on @@ -213,7 +213,7 @@ namespace butl // be a directory. While Windows support directories (via junktions), this // is currently not implemented. // - LIBBUTL_EXPORT void + LIBBUTL_SYMEXPORT void mkhardlink (const path& target, const path& link, bool dir = false); // Create a hard link to a directory. Throw std::system_error on failures. @@ -254,7 +254,7 @@ namespace butl // destination is a dangling symbolic link, then this function will still // fail. // - LIBBUTL_EXPORT void + LIBBUTL_SYMEXPORT void cpfile (const path& from, const path& to, cpflags = cpflags::none); // Copy a regular file into (inside) an existing directory. @@ -289,7 +289,7 @@ namespace butl // destination paths are on the same file system, and only if the // overwrite_content flag is specified. // - LIBBUTL_EXPORT void + LIBBUTL_SYMEXPORT void mventry (const path& from, const path& to, cpflags = cpflags::overwrite_permissions); @@ -345,7 +345,7 @@ namespace butl // by throwing std::system_error. Note that this function resolves // symlinks. // - LIBBUTL_EXPORT timestamp + LIBBUTL_SYMEXPORT timestamp file_mtime (const char*); inline timestamp @@ -380,18 +380,18 @@ namespace butl // Get path permissions. Throw std::system_error on failure. Note that this // function resolves symlinks. // - LIBBUTL_EXPORT permissions + LIBBUTL_SYMEXPORT permissions path_permissions (const path&); // Set path permissions. Throw std::system_error on failure. Note that this // function resolves symlinks. // - LIBBUTL_EXPORT void + LIBBUTL_SYMEXPORT void path_permissions (const path&, permissions); // Directory entry iteration. // - class LIBBUTL_EXPORT dir_entry + class LIBBUTL_SYMEXPORT dir_entry { public: typedef butl::path path_type; @@ -430,7 +430,7 @@ namespace butl dir_path b_; }; - class LIBBUTL_EXPORT dir_iterator + class LIBBUTL_SYMEXPORT dir_iterator { public: typedef dir_entry value_type; @@ -502,7 +502,7 @@ namespace butl // different). Otherwise, it only matches a non-directory name (no trailing // directory separator). // - LIBBUTL_EXPORT bool + LIBBUTL_SYMEXPORT bool path_match (const std::string& pattern, const std::string& name); // Return true if path entry matches pattern. Note that the match is @@ -510,7 +510,7 @@ namespace butl // start directory is used if the first pattern component is a self-matching // wildcard (see below for the start directory and wildcard semantics). // - LIBBUTL_EXPORT bool + LIBBUTL_SYMEXPORT bool path_match (const path& pattern, const path& entry, const dir_path& start = dir_path ()); @@ -589,7 +589,7 @@ namespace butl // depth-first which make sense for the cleanup use cases. In future we may // want to make it controllable. // - LIBBUTL_EXPORT void + LIBBUTL_SYMEXPORT void path_search (const path& pattern, const std::function<bool (path&&, const std::string& pattern, @@ -606,7 +606,7 @@ namespace butl // the current directory). Note that the implementation can optimize the // case when pattern and entry are both non-empty and relative. // - LIBBUTL_EXPORT void + LIBBUTL_SYMEXPORT void path_search (const path& pattern, const path& entry, const std::function<bool (path&&, diff --git a/libbutl/manifest-parser.hxx b/libbutl/manifest-parser.hxx index 840549f..fd0cc4e 100644 --- a/libbutl/manifest-parser.hxx +++ b/libbutl/manifest-parser.hxx @@ -16,7 +16,7 @@ namespace butl { - class LIBBUTL_EXPORT manifest_parsing: public std::runtime_error + class LIBBUTL_SYMEXPORT manifest_parsing: public std::runtime_error { public: manifest_parsing (const std::string& name, @@ -46,7 +46,7 @@ namespace butl empty () const {return name.empty () && value.empty ();} }; - class LIBBUTL_EXPORT manifest_parser: protected butl::char_scanner + class LIBBUTL_SYMEXPORT manifest_parser: protected butl::char_scanner { public: manifest_parser (std::istream& is, const std::string& name) diff --git a/libbutl/manifest-serializer.hxx b/libbutl/manifest-serializer.hxx index 863fef6..89c162c 100644 --- a/libbutl/manifest-serializer.hxx +++ b/libbutl/manifest-serializer.hxx @@ -14,7 +14,7 @@ namespace butl { - class LIBBUTL_EXPORT manifest_serialization: public std::runtime_error + class LIBBUTL_SYMEXPORT manifest_serialization: public std::runtime_error { public: manifest_serialization (const std::string& name, @@ -24,7 +24,7 @@ namespace butl std::string description; }; - class LIBBUTL_EXPORT manifest_serializer + class LIBBUTL_SYMEXPORT manifest_serializer { public: manifest_serializer (std::ostream& os, const std::string& name) diff --git a/libbutl/openssl.hxx b/libbutl/openssl.hxx index 422e033..bd562d6 100644 --- a/libbutl/openssl.hxx +++ b/libbutl/openssl.hxx @@ -79,7 +79,7 @@ namespace butl // department (that were apparently fixed in 1.0.2). To work around these // bugs pass user-supplied options first. // - class LIBBUTL_EXPORT openssl: public process + class LIBBUTL_SYMEXPORT openssl: public process { public: ifdstream in; diff --git a/libbutl/pager.hxx b/libbutl/pager.hxx index deca922..f167f10 100644 --- a/libbutl/pager.hxx +++ b/libbutl/pager.hxx @@ -44,7 +44,7 @@ namespace butl // cerr << "pager error: " << e << endl; // } // - class LIBBUTL_EXPORT pager: protected std::streambuf + class LIBBUTL_SYMEXPORT pager: protected std::streambuf { public: ~pager () {wait (true);} diff --git a/libbutl/path.cxx b/libbutl/path.cxx index be8bd61..15e9b13 100644 --- a/libbutl/path.cxx +++ b/libbutl/path.cxx @@ -59,7 +59,7 @@ namespace butl // template <> - LIBBUTL_EXPORT path_traits<char>::string_type path_traits<char>:: + LIBBUTL_SYMEXPORT path_traits<char>::string_type path_traits<char>:: current_directory () { #ifdef _WIN32 @@ -77,7 +77,7 @@ namespace butl } template <> - LIBBUTL_EXPORT void path_traits<char>:: + LIBBUTL_SYMEXPORT void path_traits<char>:: current_directory (string_type const& s) { #ifdef _WIN32 @@ -154,7 +154,7 @@ namespace butl #endif template <> - LIBBUTL_EXPORT path_traits<char>::string_type path_traits<char>:: + LIBBUTL_SYMEXPORT path_traits<char>::string_type path_traits<char>:: temp_directory () { #ifdef _WIN32 @@ -171,7 +171,7 @@ namespace butl static atomic<size_t> temp_name_count; template <> - LIBBUTL_EXPORT path_traits<char>::string_type path_traits<char>:: + LIBBUTL_SYMEXPORT path_traits<char>::string_type path_traits<char>:: temp_name (string_type const& prefix) { // Otherwise compiler get confused with butl::to_string(timestamp). @@ -184,7 +184,7 @@ namespace butl } template <> - LIBBUTL_EXPORT path_traits<char>::string_type path_traits<char>:: + LIBBUTL_SYMEXPORT path_traits<char>::string_type path_traits<char>:: home_directory () { #ifndef _WIN32 @@ -207,7 +207,7 @@ namespace butl #ifndef _WIN32 template <> - LIBBUTL_EXPORT void path_traits<char>:: + LIBBUTL_SYMEXPORT void path_traits<char>:: realize (string_type& s) { char r[PATH_MAX]; @@ -231,7 +231,7 @@ namespace butl // template <> - LIBBUTL_EXPORT path_traits<wchar_t>::string_type path_traits<wchar_t>:: + LIBBUTL_SYMEXPORT path_traits<wchar_t>::string_type path_traits<wchar_t>:: current_directory () { #ifdef _WIN32 @@ -253,7 +253,7 @@ namespace butl } template <> - LIBBUTL_EXPORT void path_traits<wchar_t>:: + LIBBUTL_SYMEXPORT void path_traits<wchar_t>:: current_directory (string_type const& s) { #ifdef _WIN32 @@ -281,7 +281,7 @@ namespace butl } template <> - LIBBUTL_EXPORT path_traits<wchar_t>::string_type path_traits<wchar_t>:: + LIBBUTL_SYMEXPORT path_traits<wchar_t>::string_type path_traits<wchar_t>:: temp_directory () { #ifdef _WIN32 @@ -309,7 +309,7 @@ namespace butl } template <> - LIBBUTL_EXPORT path_traits<wchar_t>::string_type path_traits<wchar_t>:: + LIBBUTL_SYMEXPORT path_traits<wchar_t>::string_type path_traits<wchar_t>:: temp_name (string_type const& prefix) { return prefix + @@ -318,7 +318,7 @@ namespace butl } template <> - LIBBUTL_EXPORT path_traits<wchar_t>::string_type path_traits<wchar_t>:: + LIBBUTL_SYMEXPORT path_traits<wchar_t>::string_type path_traits<wchar_t>:: home_directory () { #ifndef _WIN32 @@ -350,7 +350,7 @@ namespace butl #ifndef _WIN32 template <> - LIBBUTL_EXPORT void path_traits<wchar_t>:: + LIBBUTL_SYMEXPORT void path_traits<wchar_t>:: realize (string_type&) { assert (false); // Implement if/when needed. @@ -359,7 +359,7 @@ namespace butl #ifdef _WIN32 template <> - LIBBUTL_EXPORT bool + LIBBUTL_SYMEXPORT bool basic_path_append_actual_name<char> (string& r, const string& d, const string& n) @@ -387,7 +387,7 @@ namespace butl } template <> - LIBBUTL_EXPORT bool + LIBBUTL_SYMEXPORT bool basic_path_append_actual_name<wchar_t> (wstring&, const wstring&, const wstring&) diff --git a/libbutl/path.hxx b/libbutl/path.hxx index b1ba31a..7e35ba5 100644 --- a/libbutl/path.hxx +++ b/libbutl/path.hxx @@ -37,7 +37,7 @@ namespace butl // non-dir-adapted implementation (see where we call K::cast()). // - struct LIBBUTL_EXPORT invalid_path_base: public std::exception + struct LIBBUTL_SYMEXPORT invalid_path_base: public std::exception { virtual char const* what () const throw (); diff --git a/libbutl/process-run.txx b/libbutl/process-run.txx index 54dceed..a78b87a 100644 --- a/libbutl/process-run.txx +++ b/libbutl/process-run.txx @@ -36,7 +36,7 @@ namespace butl inline int process_stderr (const auto_fd& v) {assert (v.get () >= 0); return v.get ();} - LIBBUTL_EXPORT process + LIBBUTL_SYMEXPORT process process_start (const dir_path* cwd, const process_path& pp, const char* cmd[], diff --git a/libbutl/process.hxx b/libbutl/process.hxx index 4a1a9d0..ca49369 100644 --- a/libbutl/process.hxx +++ b/libbutl/process.hxx @@ -119,7 +119,7 @@ namespace butl // Process exit information. // - struct LIBBUTL_EXPORT process_exit + struct LIBBUTL_SYMEXPORT process_exit { // Status type is the raw exit value as returned by GetExitCodeProcess() // (NTSTATUS value that represents exit or error codes; MSDN refers to the @@ -177,7 +177,7 @@ namespace butl description () const; }; - class LIBBUTL_EXPORT process + class LIBBUTL_SYMEXPORT process { public: #ifndef _WIN32 diff --git a/libbutl/regex.hxx b/libbutl/regex.hxx index 4a93106..9090d5a 100644 --- a/libbutl/regex.hxx +++ b/libbutl/regex.hxx @@ -48,7 +48,7 @@ namespace std // Print regex error description but only if it is meaningful (this is also // why we have to print leading colon). // - LIBBUTL_EXPORT ostream& + LIBBUTL_SYMEXPORT ostream& operator<< (ostream&, const regex_error&); } diff --git a/libbutl/sendmail.hxx b/libbutl/sendmail.hxx index 8800aa5..465a474 100644 --- a/libbutl/sendmail.hxx +++ b/libbutl/sendmail.hxx @@ -42,7 +42,7 @@ namespace butl // cerr << "sendmail error: " << e << endl; // } // - class LIBBUTL_EXPORT sendmail: public process + class LIBBUTL_SYMEXPORT sendmail: public process { public: ofdstream out; diff --git a/libbutl/sha256.hxx b/libbutl/sha256.hxx index eea2b23..e81b87b 100644 --- a/libbutl/sha256.hxx +++ b/libbutl/sha256.hxx @@ -21,7 +21,7 @@ namespace butl // // cerr << sha256 ("123").string () << endl; // - class LIBBUTL_EXPORT sha256 + class LIBBUTL_SYMEXPORT sha256 { public: sha256 (); @@ -87,14 +87,14 @@ namespace butl // like 01:AB:CD:...). Throw invalid_argument if the argument is not a valid // SHA256 string. // - LIBBUTL_EXPORT std::string + LIBBUTL_SYMEXPORT std::string sha256_to_fingerprint (const std::string&); // Convert a fingerprint (32 colon-separated hex digit pairs) to the SHA256 // string representation (64 lower case hex digits). Throw invalid_argument // if the argument is not a valid fingerprint. // - LIBBUTL_EXPORT std::string + LIBBUTL_SYMEXPORT std::string fingerprint_to_sha256 (const std::string&); } diff --git a/libbutl/standard-version.hxx b/libbutl/standard-version.hxx index 3a5b2a5..ebb3994 100644 --- a/libbutl/standard-version.hxx +++ b/libbutl/standard-version.hxx @@ -32,7 +32,7 @@ namespace butl // [<epoch>~]<maj>.<min>.<patch>- // 0[+<revision>] // - struct LIBBUTL_EXPORT standard_version + struct LIBBUTL_SYMEXPORT standard_version { // Invariants: // @@ -206,7 +206,7 @@ namespace butl // ('==' | '>' | '<' | '>=' | '<=') <version> // ('(' | '[') <version> <version> (')' | ']') // - struct LIBBUTL_EXPORT standard_version_constraint + struct LIBBUTL_SYMEXPORT standard_version_constraint { butl::optional<standard_version> min_version; butl::optional<standard_version> max_version; diff --git a/libbutl/string-parser.hxx b/libbutl/string-parser.hxx index 56ba348..b445f34 100644 --- a/libbutl/string-parser.hxx +++ b/libbutl/string-parser.hxx @@ -15,7 +15,7 @@ namespace butl { - class LIBBUTL_EXPORT invalid_string: public std::invalid_argument + class LIBBUTL_SYMEXPORT invalid_string: public std::invalid_argument { public: invalid_string (std::size_t p, const std::string& d) @@ -24,7 +24,7 @@ namespace butl std::size_t position; // Zero-based. }; - class LIBBUTL_EXPORT string_parser + class LIBBUTL_SYMEXPORT string_parser { public: // Parse a whitespace-separated list of strings. Can contain single or diff --git a/libbutl/tab-parser.hxx b/libbutl/tab-parser.hxx index 311c54b..688dedc 100644 --- a/libbutl/tab-parser.hxx +++ b/libbutl/tab-parser.hxx @@ -15,7 +15,7 @@ namespace butl { - class LIBBUTL_EXPORT tab_parsing: public std::runtime_error + class LIBBUTL_SYMEXPORT tab_parsing: public std::runtime_error { public: tab_parsing (const std::string& name, @@ -50,7 +50,7 @@ namespace butl // supported. Blank lines and lines that start with # (collectively called // empty lines) are ignored. // - class LIBBUTL_EXPORT tab_parser + class LIBBUTL_SYMEXPORT tab_parser { public: tab_parser (std::istream& is, const std::string& name) diff --git a/libbutl/target-triplet.hxx b/libbutl/target-triplet.hxx index 214a781..849541d 100644 --- a/libbutl/target-triplet.hxx +++ b/libbutl/target-triplet.hxx @@ -96,7 +96,7 @@ namespace butl // // 2. LLVM has the Triple class with similar goals. // - struct LIBBUTL_EXPORT target_triplet + struct LIBBUTL_SYMEXPORT target_triplet { std::string cpu; std::string vendor; diff --git a/libbutl/timestamp.hxx b/libbutl/timestamp.hxx index 8a5c71a..c1621a7 100644 --- a/libbutl/timestamp.hxx +++ b/libbutl/timestamp.hxx @@ -81,7 +81,7 @@ namespace butl // - support %(N) version for non-optional printing // - support for suffix %[<d>N<s>], for example %[N nsec] // - LIBBUTL_EXPORT std::ostream& + LIBBUTL_SYMEXPORT std::ostream& to_stream (std::ostream&, const timestamp&, const char* format, @@ -91,7 +91,7 @@ namespace butl // Same as above, but provide the result as a string. Note that it is // implemented via to_stream() and std::ostringstream. // - LIBBUTL_EXPORT std::string + LIBBUTL_SYMEXPORT std::string to_string (const timestamp&, const char* format, bool special, @@ -105,13 +105,13 @@ namespace butl // Print human-readable representation of the duration. // - LIBBUTL_EXPORT std::ostream& + LIBBUTL_SYMEXPORT std::ostream& to_stream (std::ostream&, const duration&, bool nanoseconds); // Same as above, but provide the result as a string. Note that it is // implemented via to_stream() and std::ostringstream. // - LIBBUTL_EXPORT std::string + LIBBUTL_SYMEXPORT std::string to_string (const duration&, bool nanoseconds); inline std::ostream& @@ -159,7 +159,7 @@ namespace butl // - ability to parse local, return UTC and vice-versa // - handle timezone parsing // - LIBBUTL_EXPORT timestamp + LIBBUTL_SYMEXPORT timestamp from_string (const char* input, const char* format, bool local, diff --git a/libbutl/utility.hxx b/libbutl/utility.hxx index 448f386..3a994bb 100644 --- a/libbutl/utility.hxx +++ b/libbutl/utility.hxx @@ -30,10 +30,10 @@ namespace butl // // See also the exception sanitization below. // - [[noreturn]] LIBBUTL_EXPORT void + [[noreturn]] LIBBUTL_SYMEXPORT void throw_generic_error (int errno_code, const char* what = nullptr); - [[noreturn]] LIBBUTL_EXPORT void + [[noreturn]] LIBBUTL_SYMEXPORT void throw_system_error (int system_code, int fallback_errno_code = 0); // Convert ASCII character/string case. If there is no upper/lower case @@ -219,7 +219,7 @@ namespace butl // use a wrapper functions. // #ifdef _WIN32 - LIBBUTL_EXPORT bool& + LIBBUTL_SYMEXPORT bool& exception_unwinding_dtor (); #else inline bool& @@ -255,7 +255,7 @@ namespace std // - stripping system error redundant suffix (see utility.cxx) // - lower-case the first letter if the beginning looks like a word // - LIBBUTL_EXPORT ostream& + LIBBUTL_SYMEXPORT ostream& operator<< (ostream&, const exception&); } diff --git a/libbutl/win32-utility.hxx b/libbutl/win32-utility.hxx index cdaf846..d9a3bcb 100644 --- a/libbutl/win32-utility.hxx +++ b/libbutl/win32-utility.hxx @@ -41,10 +41,10 @@ namespace butl { namespace win32 { - LIBBUTL_EXPORT std::string + LIBBUTL_SYMEXPORT std::string error_msg (DWORD code); - LIBBUTL_EXPORT std::string + LIBBUTL_SYMEXPORT std::string last_error_msg (); } }; |