Blame wireshark-0008-move-default-temporary-directory-to-var-tmp.patch

Peter Hatina c9a65b
commit 26725d2cdac4bca0f779cf6fbbcd96a00912d1b9
Peter Hatina fe8eca
Author: Peter Hatina <phatina@gmail.com>
Peter Hatina fe8eca
Date:   Tue Jan 12 13:56:59 2016 +0100
c06811
Peter Hatina fe8eca
    Move default temporary directory to /var/tmp
d3e571
Peter Hatina fe8eca
diff --git a/ui/gtk/about_dlg.c b/ui/gtk/about_dlg.c
Peter Hatina c9a65b
index 06c1d9a..bf521f1 100644
Peter Hatina fe8eca
--- a/ui/gtk/about_dlg.c
Peter Hatina fe8eca
+++ b/ui/gtk/about_dlg.c
Peter Hatina c9a65b
@@ -29,6 +29,7 @@
Peter Hatina c9a65b
 
Peter Hatina fe8eca
 #include <wsutil/filesystem.h>
Peter Hatina fe8eca
 #include <wsutil/copyright_info.h>
Peter Hatina c9a65b
+#include <wsutil/wstmpdir.h> /* for get_tmp_dor() */
Peter Hatina c9a65b
 #include <ws_version_info.h>
Peter Hatina fe8eca
 #ifdef HAVE_LIBSMI
Peter Hatina fe8eca
 #include <epan/oids.h>
Peter Hatina f0e481
@@ -421,7 +422,7 @@ about_folders_page_new(void)
Peter Hatina fe8eca
       "capture files");
Peter Hatina fe8eca
 
Peter Hatina fe8eca
   /* temp */
Peter Hatina fe8eca
-  about_folders_row(table, "Temp", g_get_tmp_dir(),
Peter Hatina fe8eca
+  about_folders_row(table, "Temp", get_tmp_dir(),
Peter Hatina fe8eca
       "untitled capture files");
Peter Hatina fe8eca
 
Peter Hatina fe8eca
   /* pers conf */
d3e571
diff --git a/ui/gtk/proto_help.c b/ui/gtk/proto_help.c
Peter Hatina c9a65b
index 8632feb..dc9a2a0 100644
d3e571
--- a/ui/gtk/proto_help.c
d3e571
+++ b/ui/gtk/proto_help.c
Peter Hatina fe8eca
@@ -37,6 +37,8 @@
Peter Hatina c9a65b
 #include "../../file.h"
Peter Hatina fe8eca
 
Peter Hatina 1fba24
 
Peter Hatina 1fba24
+#include <wsutil/wstmpdir.h> /* for get_tmp_dir() */
Peter Hatina 1fba24
+
d3e571
 #include "ui/gtk/proto_help.h"
Peter Hatina 1fba24
 
Peter Hatina 1fba24
 /*
Peter Hatina fe8eca
@@ -155,7 +157,7 @@ void proto_help_init(void)
d3e571
 	/* Start loop */
d3e571
 
d3e571
 #ifdef PH_DEBUG_LOG
d3e571
-	ph_log_path = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", g_get_tmp_dir(), PH_FILE_LOG);
d3e571
+	ph_log_path = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", get_tmp_dir(), PH_FILE_LOG);
d3e571
 #endif
d3e571
 
d3e571
 	for (i = 0; i < PH_CONF_DIRS; i++) {
Peter Hatina fe8eca
diff --git a/ui/qt/about_dialog.cpp b/ui/qt/about_dialog.cpp
Peter Hatina c9a65b
index 733fc55..a1068cd 100644
Peter Hatina fe8eca
--- a/ui/qt/about_dialog.cpp
Peter Hatina fe8eca
+++ b/ui/qt/about_dialog.cpp
Peter Hatina fe8eca
@@ -49,6 +49,7 @@
Peter Hatina fe8eca
 #include "file.h"
Peter Hatina fe8eca
 #include "wsutil/file_util.h"
Peter Hatina fe8eca
 #include "wsutil/tempfile.h"
Peter Hatina fe8eca
+#include "wsutil/wstmpdir.h" /* for get_tmp_dir() */
Peter Hatina fe8eca
 #include "wsutil/plugins.h"
Peter Hatina fe8eca
 #include "wsutil/copyright_info.h"
Peter Hatina c9a65b
 #include "ws_version_info.h"
Peter Hatina f0e481
@@ -213,7 +214,7 @@ AboutDialog::AboutDialog(QWidget *parent) :
Peter Hatina fe8eca
     message += about_folders_row("\"File\" dialogs", get_last_open_dir(), "capture files");
Peter Hatina fe8eca
 
Peter Hatina fe8eca
     /* temp */
Peter Hatina fe8eca
-    message += about_folders_row("Temp", g_get_tmp_dir(), "untitled capture files");
Peter Hatina fe8eca
+    message += about_folders_row("Temp", get_tmp_dir(), "untitled capture files");
Peter Hatina fe8eca
 
Peter Hatina fe8eca
     /* pers conf */
Peter Hatina fe8eca
     message += about_folders_row("Personal configuration",
Peter Hatina fe8eca
diff --git a/ui/qt/iax2_analysis_dialog.cpp b/ui/qt/iax2_analysis_dialog.cpp
Peter Hatina c9a65b
index eb76952..bb815f6 100644
Peter Hatina fe8eca
--- a/ui/qt/iax2_analysis_dialog.cpp
Peter Hatina fe8eca
+++ b/ui/qt/iax2_analysis_dialog.cpp
Peter Hatina fe8eca
@@ -41,6 +41,8 @@
Peter Hatina fe8eca
 #include <wsutil/g711.h>
Peter Hatina fe8eca
 #include <wsutil/pint.h>
Peter Hatina fe8eca
 
Peter Hatina fe8eca
+#include <wsutil/wstmpdir.h> /* for get_tmp_dir() */
Peter Hatina fe8eca
+
Peter Hatina fe8eca
 #include <QFileDialog>
Peter Hatina fe8eca
 #include <QMessageBox>
Peter Hatina fe8eca
 #include <QPushButton>
Peter Hatina fe8eca
@@ -271,10 +273,10 @@ Iax2AnalysisDialog::Iax2AnalysisDialog(QWidget &parent, CaptureFile &cf) :
Peter Hatina fe8eca
 
Peter Hatina fe8eca
     // We keep our temp files open for the lifetime of the dialog. The GTK+
Peter Hatina fe8eca
     // UI opens and closes at various points.
Peter Hatina fe8eca
-    QString tempname = QString("%1/wireshark_iax2_f").arg(QDir::tempPath());
Peter Hatina fe8eca
+    QString tempname = QString("%1/wireshark_iax2_f").arg(get_tmp_dir());
Peter Hatina fe8eca
     fwd_tempfile_ = new QTemporaryFile(tempname, this);
Peter Hatina fe8eca
     fwd_tempfile_->open();
Peter Hatina fe8eca
-    tempname = QString("%1/wireshark_iax2_r").arg(QDir::tempPath());
Peter Hatina fe8eca
+    tempname = QString("%1/wireshark_iax2_r").arg(get_tmp_dir());
Peter Hatina fe8eca
     rev_tempfile_ = new QTemporaryFile(tempname, this);
Peter Hatina fe8eca
     rev_tempfile_->open();
Peter Hatina fe8eca
 
Peter Hatina fe8eca
diff --git a/ui/qt/rtp_analysis_dialog.cpp b/ui/qt/rtp_analysis_dialog.cpp
Peter Hatina c9a65b
index e12da20..87be751 100644
Peter Hatina fe8eca
--- a/ui/qt/rtp_analysis_dialog.cpp
Peter Hatina fe8eca
+++ b/ui/qt/rtp_analysis_dialog.cpp
Peter Hatina fe8eca
@@ -38,6 +38,8 @@
Peter Hatina fe8eca
 #include <wsutil/g711.h>
Peter Hatina fe8eca
 #include <wsutil/pint.h>
Peter Hatina fe8eca
 
Peter Hatina fe8eca
+#include <wsutil/wstmpdir.h> /* for get_tmp_dir() */
Peter Hatina fe8eca
+
Peter Hatina fe8eca
 #include <QFileDialog>
Peter Hatina fe8eca
 #include <QMessageBox>
Peter Hatina fe8eca
 #include <QPushButton>
Peter Hatina c9a65b
@@ -323,10 +325,10 @@ RtpAnalysisDialog::RtpAnalysisDialog(QWidget &parent, CaptureFile &cf, struct _r
Peter Hatina fe8eca
 
Peter Hatina fe8eca
     // We keep our temp files open for the lifetime of the dialog. The GTK+
Peter Hatina fe8eca
     // UI opens and closes at various points.
Peter Hatina fe8eca
-    QString tempname = QString("%1/wireshark_rtp_f").arg(QDir::tempPath());
Peter Hatina fe8eca
+    QString tempname = QString("%1/wireshark_rtp_f").arg(get_tmp_dir());
Peter Hatina fe8eca
     fwd_tempfile_ = new QTemporaryFile(tempname, this);
Peter Hatina fe8eca
     fwd_tempfile_->open();
Peter Hatina fe8eca
-    tempname = QString("%1/wireshark_rtp_r").arg(QDir::tempPath());
Peter Hatina fe8eca
+    tempname = QString("%1/wireshark_rtp_r").arg(get_tmp_dir());
Peter Hatina fe8eca
     rev_tempfile_ = new QTemporaryFile(tempname, this);
Peter Hatina fe8eca
     rev_tempfile_->open();
Peter Hatina fe8eca
 
Peter Hatina fe8eca
diff --git a/ui/qt/rtp_audio_stream.cpp b/ui/qt/rtp_audio_stream.cpp
Peter Hatina c9a65b
index 7bd072e..db9bd85 100644
Peter Hatina fe8eca
--- a/ui/qt/rtp_audio_stream.cpp
Peter Hatina fe8eca
+++ b/ui/qt/rtp_audio_stream.cpp
Peter Hatina c9a65b
@@ -37,6 +37,7 @@
Peter Hatina fe8eca
 #include <ui/rtp_stream.h>
Peter Hatina fe8eca
 
Peter Hatina fe8eca
 #include <wsutil/nstime.h>
Peter Hatina fe8eca
+#include <wsutil/wstmpdir.h> /* for get_tmp_dir() */
Peter Hatina fe8eca
 
Peter Hatina fe8eca
 #include <QAudioFormat>
Peter Hatina fe8eca
 #include <QAudioOutput>
Peter Hatina c9a65b
@@ -75,7 +76,7 @@ RtpAudioStream::RtpAudioStream(QObject *parent, _rtp_stream_info *rtp_stream) :
Peter Hatina fe8eca
                                                 visual_sample_rate_, SPEEX_RESAMPLER_QUALITY_MIN, NULL);
Peter Hatina c9a65b
     speex_resampler_skip_zeros(visual_resampler_);
Peter Hatina fe8eca
 
Peter Hatina fe8eca
-    QString tempname = QString("%1/wireshark_rtp_stream").arg(QDir::tempPath());
Peter Hatina fe8eca
+    QString tempname = QString("%1/wireshark_rtp_stream").arg(get_tmp_dir());
Peter Hatina fe8eca
     tempfile_ = new QTemporaryFile(tempname, this);
Peter Hatina fe8eca
     tempfile_->open();
Peter Hatina fe8eca
 
Peter Hatina f0e481
diff --git a/wsutil/Makefile.am b/wsutil/Makefile.am
Peter Hatina f0e481
index 95c57d2..acd7837 100644
Peter Hatina f0e481
--- a/wsutil/Makefile.am
Peter Hatina f0e481
+++ b/wsutil/Makefile.am
Peter Robinson 1f2c60
@@ -90,7 +90,8 @@
Peter Hatina f0e481
 	ws_cpuid.h		\
Peter Hatina f0e481
 	ws_mempbrk.h		\
Peter Robinson 1f2c60
 	ws_mempbrk_int.h	\
Peter Robinson 1f2c60
-	ws_printf.h
Peter Robinson 1f2c60
+	ws_printf.h		\
d3e571
+	wstmpdir.h
Peter Hatina 05ceca
 
Peter Hatina f0e481
 # Header files for functions in libwsutil's ABI on this platform.
Peter Hatina f0e481
 libwsutil_abi_INCLUDES = \
Peter Hatina f0e481
@@ -154,7 +155,8 @@ libwsutil_la_SOURCES = \
Peter Hatina f0e481
 	time_util.c		\
Peter Hatina f0e481
 	type_util.c		\
Peter Hatina f0e481
 	unicode-utils.c		\
Peter Hatina f0e481
-	ws_mempbrk.c
Peter Hatina f0e481
+	ws_mempbrk.c		\
Peter Hatina f0e481
+	wstmpdir.c
Peter Hatina f0e481
 
Peter Hatina f0e481
 if HAVE_OS_X_FRAMEWORKS
Peter Hatina f0e481
 libwsutil_la_SOURCES += cfutils.c cfutils.h
d3e571
diff --git a/wsutil/tempfile.c b/wsutil/tempfile.c
Peter Hatina c9a65b
index 7391fbf..9add952 100644
d3e571
--- a/wsutil/tempfile.c
d3e571
+++ b/wsutil/tempfile.c
Peter Hatina c9a65b
@@ -36,6 +36,7 @@
Peter Hatina 1fba24
 
Peter Hatina 1fba24
 #include "tempfile.h"
Peter Hatina 1fba24
 #include <wsutil/file_util.h>
Peter Hatina fe8eca
+#include <wsutil/wstmpdir.h> /* for get_tmp_dir() */
Peter Hatina 1fba24
 
Peter Hatina 1fba24
 #ifndef __set_errno
Peter Hatina 1fba24
 #define __set_errno(x) errno=(x)
Peter Hatina c9a65b
@@ -142,7 +143,7 @@ mkdtemp (char *path_template)
d3e571
  */
d3e571
 char *get_tempfile_path(const char *filename)
d3e571
 {
Peter Hatina fe8eca
-  return g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", g_get_tmp_dir(), filename);
Peter Hatina fe8eca
+  return g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", get_tmp_dir(), filename);
d3e571
 }
d3e571
 
d3e571
 #define MAX_TEMPFILES   3
Peter Hatina c9a65b
@@ -198,7 +199,7 @@ create_tempfile(char **namebuf, const char *pfx, const char *sfx)
Peter Hatina fe8eca
     tf[idx].path = (char *)g_malloc(tf[idx].len);
Peter Hatina fe8eca
   }
d3e571
 
Peter Hatina fe8eca
-  tmp_dir = g_get_tmp_dir();
Peter Hatina fe8eca
+  tmp_dir = get_tmp_dir();
Peter Hatina 1fba24
 
Peter Hatina 1fba24
 #ifdef _WIN32
Peter Hatina fe8eca
   _tzset();
Peter Hatina c9a65b
@@ -232,7 +233,7 @@ create_tempfile(char **namebuf, const char *pfx, const char *sfx)
Peter Hatina 1fba24
 
Peter Hatina 1fba24
 /**
Peter Hatina 1fba24
  * Create a directory with the given prefix (e.g. "wireshark"). The path
Peter Hatina 1fba24
- * is created using g_get_tmp_dir and mkdtemp.
Peter Hatina 1fba24
+ * is created using get_tmp_dir and mkdtemp.
Peter Hatina 1fba24
  *
Peter Hatina 1fba24
  * @param namebuf
Peter Hatina 1fba24
  * @param pfx A prefix for the temporary directory.
Peter Hatina c9a65b
@@ -260,7 +261,7 @@ create_tempdir(char **namebuf, const char *pfx)
Peter Hatina fe8eca
   /*
Peter Hatina fe8eca
    * We can't use get_tempfile_path here because we're called from dumpcap.c.
Peter Hatina fe8eca
    */
Peter Hatina fe8eca
-  tmp_dir = g_get_tmp_dir();
Peter Hatina fe8eca
+  tmp_dir = get_tmp_dir();
Peter Hatina fe8eca
 
Peter Hatina fe8eca
   while (g_snprintf(td_path[idx], td_path_len[idx], "%s%c%s" TMP_FILE_SUFFIX, tmp_dir, G_DIR_SEPARATOR, pfx) > td_path_len[idx]) {
Peter Hatina fe8eca
     td_path_len[idx] *= 2;
Peter Hatina fe8eca
diff --git a/wsutil/tempfile.h b/wsutil/tempfile.h
Peter Hatina c9a65b
index 1dca2df..bb3160c 100644
Peter Hatina fe8eca
--- a/wsutil/tempfile.h
Peter Hatina fe8eca
+++ b/wsutil/tempfile.h
Peter Hatina fe8eca
@@ -45,7 +45,7 @@ WS_DLL_PUBLIC char *get_tempfile_path(const char *filename);
Peter Hatina fe8eca
 
Peter Hatina fe8eca
 /**
Peter Hatina fe8eca
  * Create a tempfile with the given prefix (e.g. "wireshark"). The path
Peter Hatina fe8eca
- * is created using g_get_tmp_dir and mkstemp.
Peter Hatina fe8eca
+ * is created using get_tmp_dir and mkstemp.
Peter Hatina fe8eca
  *
Peter Hatina fe8eca
  * @param namebuf [in,out] If not NULL, receives the full path of the temp file.
Peter Hatina fe8eca
  *                Must NOT be freed.
Peter Hatina c9a65b
@@ -58,7 +58,7 @@ WS_DLL_PUBLIC int create_tempfile(char **namebuf, const char *pfx, const char *s
Peter Hatina fe8eca
 
Peter Hatina fe8eca
 /**
Peter Hatina fe8eca
  * Create a directory with the given prefix (e.g. "wireshark"). The path
Peter Hatina fe8eca
- * is created using g_get_tmp_dir and mkdtemp.
Peter Hatina fe8eca
+ * is created using get_tmp_dir and mkdtemp.
Peter Hatina fe8eca
  *
Peter Hatina fe8eca
  * @param namebuf If not NULL, receives the full path of the temp directory.
Peter Hatina fe8eca
  *                Must NOT be freed.
Peter Hatina 1fba24
diff --git a/wsutil/wstmpdir.c b/wsutil/wstmpdir.c
Peter Hatina 1fba24
new file mode 100644
Peter Hatina 1fba24
index 0000000..d8b733b
Peter Hatina 1fba24
--- /dev/null
Peter Hatina 1fba24
+++ b/wsutil/wstmpdir.c
Peter Hatina 1fba24
@@ -0,0 +1,70 @@
Peter Hatina 1fba24
+/* wstmpdir.c
Peter Hatina 1fba24
+ *
Peter Hatina 1fba24
+ * Copyright (C) 2013 Red Hat, Inc. All right reserved.
Peter Hatina 1fba24
+ *
Peter Hatina 1fba24
+ * Temporary directory routine
Peter Hatina 1fba24
+ *
Peter Hatina 1fba24
+ * This program is free software; you can redistribute it and/or
Peter Hatina 1fba24
+ * modify it under the terms of the GNU General Public License
Peter Hatina 1fba24
+ * as published by the Free Software Foundation; either version 2
Peter Hatina 1fba24
+ * of the License, or (at your option) any later version.
Peter Hatina 1fba24
+ *
Peter Hatina 1fba24
+ * This program is distributed in the hope that it will be useful,
Peter Hatina 1fba24
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
Peter Hatina 1fba24
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Peter Hatina 1fba24
+ * GNU General Public License for more details.
Peter Hatina 1fba24
+ *
Peter Hatina 1fba24
+ * You should have received a copy of the GNU General Public License
Peter Hatina 1fba24
+ * along with this program; if not, write to the Free Software
Peter Hatina 1fba24
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Peter Hatina 1fba24
+ *
Peter Hatina 1fba24
+ * Author: Peter Hatina <phatina@redhat.com>
Peter Hatina 1fba24
+ */
Peter Hatina 1fba24
+
Peter Hatina 1fba24
+#include "config.h"
Peter Hatina 1fba24
+
Peter Hatina 1fba24
+#include <glib.h>
Peter Hatina 1fba24
+#include "wstmpdir.h"
Peter Hatina 1fba24
+
Peter Hatina 1fba24
+/**
Peter Hatina 1fba24
+ * Gets the directory to use for temporary files.
Peter Hatina 1fba24
+ *
Peter Hatina 1fba24
+ * Inspired by glib-2.0. If no TMP, TEMP or TMPDIR is set,
Peter Hatina 1fba24
+ * /var/tmp is returned (Fedora specific).
Peter Hatina 1fba24
+ *
Peter Hatina 1fba24
+ * Returns: the directory to use for temporary files.
Peter Hatina 1fba24
+ */
Peter Hatina 1fba24
+const char *get_tmp_dir(void)
Peter Hatina 1fba24
+{
Peter Hatina 1fba24
+    static gchar *tmp_dir;
Peter Hatina 1fba24
+
Peter Hatina 1fba24
+    if (g_once_init_enter(&tmp_dir)) {
Peter Hatina 1fba24
+        gchar *tmp;
Peter Hatina 1fba24
+
Peter Hatina 1fba24
+        tmp = g_strdup(g_getenv("TEMP"));
Peter Hatina 1fba24
+        if (tmp == NULL || *tmp == '\0') {
Peter Hatina 1fba24
+            g_free(tmp);
Peter Hatina 1fba24
+            tmp = g_strdup(g_getenv("TMPDIR"));
Peter Hatina 1fba24
+        }
Peter Hatina 1fba24
+
Peter Hatina 1fba24
+#ifdef P_tmpdir
Peter Hatina 1fba24
+        if (tmp == NULL || *tmp == '\0') {
Peter Hatina 1fba24
+            gsize k;
Peter Hatina 1fba24
+            g_free(tmp);
Peter Hatina 1fba24
+            tmp = g_strdup(P_tmpdir);
Peter Hatina 1fba24
+            k = strlen(tmp);
Peter Hatina 1fba24
+            if (k > 1 && G_IS_DIR_SEPARATOR(tmp[k - 1]))
Peter Hatina 1fba24
+                tmp[k - 1] = '\0';
Peter Hatina 1fba24
+        }
Peter Hatina 1fba24
+#endif /* P_tmpdir */
Peter Hatina 1fba24
+
Peter Hatina 1fba24
+        if (tmp == NULL || *tmp == '\0') {
Peter Hatina 1fba24
+            g_free(tmp);
Peter Hatina 1fba24
+            tmp = g_strdup("/var/tmp");
Peter Hatina 1fba24
+        }
Peter Hatina 1fba24
+
Peter Hatina 1fba24
+        g_once_init_leave(&tmp_dir, tmp);
Peter Hatina 1fba24
+    }
Peter Hatina 1fba24
+
Peter Hatina 1fba24
+    return tmp_dir;
Peter Hatina 1fba24
+}
Peter Hatina 1fba24
diff --git a/wsutil/wstmpdir.h b/wsutil/wstmpdir.h
Peter Hatina 1fba24
new file mode 100644
Peter Hatina 1fba24
index 0000000..021b615
Peter Hatina 1fba24
--- /dev/null
Peter Hatina 1fba24
+++ b/wsutil/wstmpdir.h
Peter Hatina 1fba24
@@ -0,0 +1,39 @@
Peter Hatina 1fba24
+/* wstmpdir.c
Peter Hatina 1fba24
+ *
Peter Hatina 1fba24
+ * Copyright (C) 2013 Red Hat, Inc. All right reserved.
Peter Hatina 1fba24
+ *
Peter Hatina 1fba24
+ * Temporary directory routine
Peter Hatina 1fba24
+ *
Peter Hatina 1fba24
+ * This program is free software; you can redistribute it and/or
Peter Hatina 1fba24
+ * modify it under the terms of the GNU General Public License
Peter Hatina 1fba24
+ * as published by the Free Software Foundation; either version 2
Peter Hatina 1fba24
+ * of the License, or (at your option) any later version.
Peter Hatina 1fba24
+ *
Peter Hatina 1fba24
+ * This program is distributed in the hope that it will be useful,
Peter Hatina 1fba24
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
Peter Hatina 1fba24
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Peter Hatina 1fba24
+ * GNU General Public License for more details.
Peter Hatina 1fba24
+ *
Peter Hatina 1fba24
+ * You should have received a copy of the GNU General Public License
Peter Hatina 1fba24
+ * along with this program; if not, write to the Free Software
Peter Hatina 1fba24
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Peter Hatina 1fba24
+ *
Peter Hatina 1fba24
+ * Author: Peter Hatina <phatina@redhat.com>
Peter Hatina 1fba24
+ */
Peter Hatina 1fba24
+
Peter Hatina 1fba24
+#ifndef __WS_TMP_DIR_H__
Peter Hatina 1fba24
+#define __WS_TMP_DIR_H__
Peter Hatina 1fba24
+
Peter Hatina 1fba24
+#include "ws_symbol_export.h"
Peter Hatina 1fba24
+
Peter Hatina 1fba24
+#ifdef __cplusplus
Peter Hatina 1fba24
+extern "C" {
Peter Hatina 1fba24
+#endif // __cplusplus
Peter Hatina 1fba24
+
Peter Hatina 1fba24
+WS_DLL_PUBLIC const char *get_tmp_dir(void);
Peter Hatina 1fba24
+
Peter Hatina 1fba24
+#ifdef __cplusplus
Peter Hatina 1fba24
+}
Peter Hatina 1fba24
+#endif // __cplusplus
Peter Hatina 1fba24
+
Peter Hatina 1fba24
+#endif // __WS_TMP_DIR_H__