[beast/win32] Use g_mkstemp as portable version of mkstemp. Minor fixes for compilation.
- From: Stefan Westerfeld <stw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [beast/win32] Use g_mkstemp as portable version of mkstemp. Minor fixes for compilation.
- Date: Fri, 4 Sep 2009 19:18:07 +0000 (UTC)
commit c18896598f1bc5bb26ae0a3f742f5ccb81f9b1ba
Author: Stefan Westerfeld <stefan space twc de>
Date: Fri Sep 4 19:06:55 2009 +0200
Use g_mkstemp as portable version of mkstemp. Minor fixes for compilation.
Based on 009_inline_lib_make.diff.
tools/Makefile.am | 2 +-
tools/bsewavetool.cc | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 697bba6..6a66592 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -6,7 +6,7 @@ include $(top_srcdir)/Makefile.decl
SUBDIRS = . scripts
-INCLUDES += -I$(top_srcdir) -I$(top_builddir) $(BSE_CFLAGS)
+INCLUDES += -I$(top_srcdir) -I$(top_builddir) $(BSE_CFLAGS) $(CFLAGS)
DEFS += -DG_LOG_DOMAIN=\"BSE-TOOLS\" -DG_DISABLE_CONST_RETURNS
noinst_PROGRAMS = $(ALLTESTS)
diff --git a/tools/bsewavetool.cc b/tools/bsewavetool.cc
index 4c05838..16b3987 100644
--- a/tools/bsewavetool.cc
+++ b/tools/bsewavetool.cc
@@ -835,8 +835,8 @@ public:
bse_error_blurb (error));
exit (1);
}
- gchar *temp_file = g_strdup_printf ("%s/bsewavetool-pid%u-oggchunk%04X.tmp%06xyXXXXXX", g_get_tmp_dir(), getpid(), 0x1000 + nth, rand() & 0xfffffd);
- gint tmpfd = mkstemp (temp_file);
+ gchar *temp_file = g_strdup_printf ("%s/bsewavetool-pid%u-oggchunk%04X.tmp%06xyXXXXXX", g_get_tmp_dir(), OS::getpid(), 0x1000 + nth, rand() & 0xfffffd);
+ gint tmpfd = g_mkstemp (temp_file);
if (tmpfd < 0)
{
sfi_error ("chunk % 7.2f/%.0f: failed to open tmp file \"%s\": %s",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]