summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/audio_unit.cc2
-rw-r--r--libs/ardour/audiofilesource.cc7
-rw-r--r--libs/ardour/audiosource.cc2
-rw-r--r--libs/ardour/export_handler.cc5
-rw-r--r--libs/ardour/import.cc3
-rw-r--r--libs/ardour/lv2_plugin.cc3
-rw-r--r--libs/ardour/session_state.cc2
-rw-r--r--libs/ardour/smf_source.cc3
-rw-r--r--libs/gtkmm2ext/bindings.cc4
-rw-r--r--libs/gtkmm2ext/motionfeedback.cc8
-rw-r--r--libs/pbd/clear_dir.cc3
-rw-r--r--libs/surfaces/frontier/kernel_drivers/tranzport.c2
-rw-r--r--libs/surfaces/osc/osc.cc7
13 files changed, 31 insertions, 20 deletions
diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc
index 0e9a11e6df..ea2e93c5a0 100644
--- a/libs/ardour/audio_unit.cc
+++ b/libs/ardour/audio_unit.cc
@@ -2452,7 +2452,7 @@ AUPluginInfo::save_cached_info ()
if (!tree.write (path)) {
error << string_compose (_("could not save AU cache to %1"), path) << endmsg;
- unlink (path.c_str());
+ ::g_unlink (path.c_str());
}
}
diff --git a/libs/ardour/audiofilesource.cc b/libs/ardour/audiofilesource.cc
index 13b03f8f48..014baa9031 100644
--- a/libs/ardour/audiofilesource.cc
+++ b/libs/ardour/audiofilesource.cc
@@ -40,6 +40,7 @@
#include <sndfile.h>
+#include <glib/gstdio.h>
#include <glibmm/miscutils.h>
#include <glibmm/fileutils.h>
#include <glibmm/threads.h>
@@ -133,8 +134,8 @@ AudioFileSource::~AudioFileSource ()
{
DEBUG_TRACE (DEBUG::Destruction, string_compose ("AudioFileSource destructor %1, removable? %2\n", _path, removable()));
if (removable()) {
- unlink (_path.c_str());
- unlink (peakpath.c_str());
+ ::g_unlink (_path.c_str());
+ ::g_unlink (peakpath.c_str());
}
}
@@ -292,7 +293,7 @@ AudioFileSource::mark_streaming_write_completed ()
int
AudioFileSource::move_dependents_to_trash()
{
- return ::unlink (peakpath.c_str());
+ return ::g_unlink (peakpath.c_str());
}
void
diff --git a/libs/ardour/audiosource.cc b/libs/ardour/audiosource.cc
index d8c25b0200..e224186bd2 100644
--- a/libs/ardour/audiosource.cc
+++ b/libs/ardour/audiosource.cc
@@ -653,7 +653,7 @@ AudioSource::build_peaks_from_scratch ()
out:
if (ret) {
DEBUG_TRACE (DEBUG::Peaks, string_compose("Could not write peak data, attempting to remove peakfile %1\n", peakpath));
- unlink (peakpath.c_str());
+ ::g_unlink (peakpath.c_str());
}
return ret;
diff --git a/libs/ardour/export_handler.cc b/libs/ardour/export_handler.cc
index 4a6b0552c5..5710ecc452 100644
--- a/libs/ardour/export_handler.cc
+++ b/libs/ardour/export_handler.cc
@@ -20,6 +20,7 @@
#include "ardour/export_handler.h"
+#include <glib/gstdio.h>
#include <glibmm.h>
#include <glibmm/convert.h>
@@ -415,10 +416,10 @@ ExportHandler::export_cd_marker_file (ExportTimespanPtr timespan, ExportFormatSp
} catch (std::exception& e) {
error << string_compose (_("an error occured while writing a TOC/CUE file: %1"), e.what()) << endmsg;
- ::unlink (filepath.c_str());
+ ::g_unlink (filepath.c_str());
} catch (Glib::Exception& e) {
error << string_compose (_("an error occured while writing a TOC/CUE file: %1"), e.what()) << endmsg;
- ::unlink (filepath.c_str());
+ ::g_unlink (filepath.c_str());
}
}
diff --git a/libs/ardour/import.cc b/libs/ardour/import.cc
index 48937fb576..9be72a9966 100644
--- a/libs/ardour/import.cc
+++ b/libs/ardour/import.cc
@@ -34,6 +34,7 @@
#include <sndfile.h>
#include <samplerate.h>
+#include <glib/gstdio.h>
#include <glibmm.h>
#include <boost/scoped_array.hpp>
@@ -464,7 +465,7 @@ remove_file_source (boost::shared_ptr<Source> source)
boost::shared_ptr<FileSource> fs = boost::dynamic_pointer_cast<FileSource> (source);
if (fs) {
- ::unlink (fs->path().c_str());
+ ::g_unlink (fs->path().c_str());
}
}
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc
index d49f8412b7..c5a02575fd 100644
--- a/libs/ardour/lv2_plugin.cc
+++ b/libs/ardour/lv2_plugin.cc
@@ -25,6 +25,7 @@
#include <cstdlib>
#include <cstring>
+#include <glib/gstdio.h>
#include <giomm/file.h>
#include <glib/gprintf.h>
#include <glibmm.h>
@@ -1085,7 +1086,7 @@ LV2Plugin::do_remove_preset(string name)
name + ".ttl"
)
);
- unlink(preset_file.c_str());
+ ::g_unlink(preset_file.c_str());
}
bool
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index de573e61b6..62edaa3911 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -2900,7 +2900,7 @@ Session::cleanup_sources (CleanupReport& rep)
string peakpath = peak_path (base);
if (Glib::file_test (peakpath.c_str(), Glib::FILE_TEST_EXISTS)) {
- if (::unlink (peakpath.c_str()) != 0) {
+ if (::g_unlink (peakpath.c_str()) != 0) {
error << string_compose (_("cannot remove peakfile %1 for %2 (%3)"),
peakpath, _path, strerror (errno))
<< endmsg;
diff --git a/libs/ardour/smf_source.cc b/libs/ardour/smf_source.cc
index 830fd75fdf..d915bba845 100644
--- a/libs/ardour/smf_source.cc
+++ b/libs/ardour/smf_source.cc
@@ -30,6 +30,7 @@
#include "pbd/stl_delete.h"
#include "pbd/strsplit.h"
+#include <glib/gstdio.h>
#include <glibmm/miscutils.h>
#include "evoral/Control.hpp"
@@ -96,7 +97,7 @@ SMFSource::SMFSource (Session& s, const XMLNode& node, bool must_exist)
SMFSource::~SMFSource ()
{
if (removable()) {
- unlink (_path.c_str());
+ ::g_unlink (_path.c_str());
}
}
diff --git a/libs/gtkmm2ext/bindings.cc b/libs/gtkmm2ext/bindings.cc
index e049cd8d57..f96bd586d9 100644
--- a/libs/gtkmm2ext/bindings.cc
+++ b/libs/gtkmm2ext/bindings.cc
@@ -19,6 +19,8 @@
#include <iostream>
+#include <glib/gstdio.h>
+
#include "pbd/xml++.h"
#include "pbd/convert.h"
@@ -389,7 +391,7 @@ Bindings::save (const string& path)
save (*root);
if (!tree.write (path)) {
- ::unlink (path.c_str());
+ ::g_unlink (path.c_str());
return false;
}
diff --git a/libs/gtkmm2ext/motionfeedback.cc b/libs/gtkmm2ext/motionfeedback.cc
index bd0fd1cd73..221a8b0bd6 100644
--- a/libs/gtkmm2ext/motionfeedback.cc
+++ b/libs/gtkmm2ext/motionfeedback.cc
@@ -25,6 +25,8 @@
#include <unistd.h>
#include <stdio.h> /* for snprintf, grrr */
+#include <glib/gstdio.h>
+
#include <gdk/gdkkeysyms.h>
#include <gtkmm.h>
@@ -516,15 +518,15 @@ MotionFeedback::render_pixbuf (int size)
pixbuf = Gdk::Pixbuf::create_from_file (path);
} catch (const Gdk::PixbufError &e) {
std::cerr << "Caught PixbufError: " << e.what() << std::endl;
- unlink (path);
+ ::g_unlink (path);
throw;
} catch (...) {
- unlink (path);
+ ::g_unlink (path);
g_message("Caught ... ");
throw;
}
- unlink (path);
+ ::g_unlink (path);
g_free(path);
diff --git a/libs/pbd/clear_dir.cc b/libs/pbd/clear_dir.cc
index 29410d41e5..86f7067201 100644
--- a/libs/pbd/clear_dir.cc
+++ b/libs/pbd/clear_dir.cc
@@ -24,6 +24,7 @@
#include <errno.h>
#include <string.h>
+#include <glib/gstdio.h>
#include <glibmm/miscutils.h>
#include "pbd/error.h"
@@ -66,7 +67,7 @@ PBD::clear_directory (const string& dir, size_t* size, vector<string>* paths)
continue;
}
- if (::unlink (fullpath.c_str())) {
+ if (::g_unlink (fullpath.c_str())) {
error << string_compose (_("cannot remove file %1 (%2)"), fullpath, strerror (errno))
<< endmsg;
ret = 1;
diff --git a/libs/surfaces/frontier/kernel_drivers/tranzport.c b/libs/surfaces/frontier/kernel_drivers/tranzport.c
index 6893f66921..b7b6709d56 100644
--- a/libs/surfaces/frontier/kernel_drivers/tranzport.c
+++ b/libs/surfaces/frontier/kernel_drivers/tranzport.c
@@ -445,7 +445,7 @@ static void usb_tranzport_interrupt_out_callback(struct urb *urb)
{
struct usb_tranzport *dev = urb->context;
- /* sync/async unlink faults aren't errors */
+ /* sync/async ::g_unlink faults aren't errors */
if (urb->status && !(urb->status == -ENOENT ||
urb->status == -ECONNRESET ||
urb->status == -ESHUTDOWN))
diff --git a/libs/surfaces/osc/osc.cc b/libs/surfaces/osc/osc.cc
index 0c7c8455a4..8b57dc0c3e 100644
--- a/libs/surfaces/osc/osc.cc
+++ b/libs/surfaces/osc/osc.cc
@@ -28,6 +28,7 @@
#include <unistd.h>
#include <fcntl.h>
+#include <glib/gstdio.h>
#include <glibmm/miscutils.h>
#include <pbd/pthread_utils.h>
@@ -181,7 +182,7 @@ OSC::start ()
int fd = mkstemp(tmpstr);
if (fd >= 0 ) {
- unlink (tmpstr);
+ ::g_unlink (tmpstr);
close (fd);
_osc_unix_server = lo_server_new (tmpstr, error_callback);
@@ -284,11 +285,11 @@ OSC::stop ()
}
if (!_osc_unix_socket_path.empty()) {
- unlink (_osc_unix_socket_path.c_str());
+ ::g_unlink (_osc_unix_socket_path.c_str());
}
if (!_osc_url_file.empty() ) {
- unlink (_osc_url_file.c_str() );
+ ::g_unlink (_osc_url_file.c_str() );
}
// Delete any active route observers