[beast/win32: 23/44] Use g_mkstemp as portable version of mkstemp. Minor fixes for compilation.



commit c2e1f1f303900bf7020a673fd3b57cd847bf4719
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]