Move tempfile.{h,c} into wsutil.
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 26 Jun 2013 01:14:35 +0000 (01:14 +0000)
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 26 Jun 2013 01:14:35 +0000 (01:14 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@50163 f5534014-38df-0310-8fa8-9805f1628bb7

20 files changed:
CMakeLists.txt
Makefile.common
dumpcap.c
dumpcap.vcproj
file.c
ui/cli/tap-follow.c
ui/gtk/export_pdu_dlg.c
ui/gtk/file_import_dlg.c
ui/gtk/follow_stream.c
ui/gtk/follow_tcp.c
ui/gtk/hostlist_table.c
ui/gtk/iax2_analysis.c
ui/gtk/print_dlg.c
ui/gtk/rtp_analysis.c
ui/qt/QtShark.pro
ui/qt/import_text_dialog.cpp
wsutil/CMakeLists.txt
wsutil/Makefile.common
wsutil/tempfile.c [moved from tempfile.c with 100% similarity]
wsutil/tempfile.h [moved from tempfile.h with 91% similarity]

index f2026f60e416dd39cf95da6c879d09a2e38f3b1c..e7fa4b2a624502aaae7b55cbcc2e9af5db2e9140 100644 (file)
@@ -780,7 +780,6 @@ if( (BUILD_wireshark AND GTK_FOUND) OR (BUILD_qtshark AND QT_FOUND) )
                merge.c
                proto_hier_stats.c
                summary.c
-               tempfile.c
                u3.c
                ws80211_utils.c
                ${SHARK_COMMON_CAPTURE_SRC}
@@ -848,7 +847,6 @@ if(BUILD_tshark)
        set(tshark_FILES
                capture_opts.c
                capture_sync.c
-               tempfile.c
                tshark-tap-register.c
                tshark.c
                ui/util.c
@@ -1035,7 +1033,6 @@ if(BUILD_dumpcap AND PCAP_FOUND)
                pcapio.c
                ringbuffer.c
                sync_pipe_write.c
-               tempfile.c
                version_info.c
                ws80211_utils.c
                ${PLATFORM_SRC}
index 6e3b3572c60dd602f9fd1945ef44b2518cc65c12..f86b4a3034322a25d71826c551507fe2b80a04de 100644 (file)
@@ -79,7 +79,6 @@ SHARK_COMMON_INCLUDES =       \
        print.h                 \
        ps.h                    \
        register.h              \
-       tempfile.h              \
        tap-megaco-common.h     \
        tap-rtp-common.h        \
        version_info.h          \
@@ -116,7 +115,6 @@ WIRESHARK_COMMON_SRC =      \
        merge.c         \
        proto_hier_stats.c      \
        summary.c       \
-       tempfile.c      \
        u3.c            \
        ws80211_utils.c
 
@@ -146,7 +144,6 @@ tshark_SOURCES =    \
        $(SHARK_COMMON_SRC)     \
        $(SHARK_COMMON_CAPTURE_SRC) \
        capture_opts.c          \
-       tempfile.c              \
        tshark.c
 
 # rawshark specifics
@@ -207,7 +204,6 @@ dumpcap_SOURCES =   \
        pcapio.c        \
        ringbuffer.c    \
        sync_pipe_write.c       \
-       tempfile.c      \
        version_info.c  \
        ws80211_utils.c
 
index 286c3e457f8e8d8500c40d6168004da5f8c78ae3..cda32a6ebdfc94e3684a8ca365d9ec7c8378ff3d 100644 (file)
--- a/dumpcap.c
+++ b/dumpcap.c
 #include "conditions.h"
 #include "capture_stop_conditions.h"
 
-#include "tempfile.h"
+#include "wsutil/tempfile.h"
 #include "log.h"
 #include "wsutil/file_util.h"
 
index 57dadb63faf30b0c8ce83350f468743716b26b4f..198868695570abd2e4f3d282d18346e671520e36 100644 (file)
                                RelativePath=".\sync_pipe_write.c"
                                >
                        </File>
-                       <File
-                               RelativePath=".\tempfile.c"
-                               >
-                       </File>
                        <File
                                RelativePath=".\epan\unicode-utils.c"
                                >
                                RelativePath=".\sync_pipe.h"
                                >
                        </File>
-                       <File
-                               RelativePath=".\tempfile.h"
-                               >
-                       </File>
                        <File
                                RelativePath=".\epan\unicode-utils.h"
                                >
diff --git a/file.c b/file.c
index 8aeb3fa14e73939976d1ff32cf19acb11774db0f..8e4984038b47055a7b0da318837fd9a46cc27494 100644 (file)
--- a/file.c
+++ b/file.c
@@ -55,7 +55,7 @@
 #include "print.h"
 #include "file.h"
 #include "fileset.h"
-#include "tempfile.h"
+#include "wsutil/tempfile.h"
 #include "merge.h"
 
 #include <epan/prefs.h>
index 0e6262c78862783c1aace175f080481d034801ea..71ddd5898f4754c765882ab3d70d6b5cd015b42f 100644 (file)
@@ -46,7 +46,7 @@
 #include <epan/tvbuff-int.h>
 
 #include "wsutil/file_util.h"
-#include "tempfile.h"
+#include "wsutil/tempfile.h"
 
 #ifdef SSL_PLUGIN
 #include "packet-ssl-utils.h"
index 03e96b7c6591537c0bc9be02c5729c05cf3112ea..f3e334434c02b551b1d87a0340bb5c91c4ff1a5b 100644 (file)
@@ -30,7 +30,7 @@
 #include "wtap.h"
 #include "pcap-encap.h"
 #include "version_info.h"
-#include "tempfile.h"
+#include "wsutil/tempfile.h"
 
 #include <epan/tap.h>
 #include <epan/exported_pdu.h>
index fe4938385a5d7de2dc37d45fa60288196e0252fc..68990f4f7da6ec629b0873489b17d4f2bb4bab3b 100644 (file)
@@ -49,7 +49,7 @@
 
 #include "file.h"
 #include "wsutil/file_util.h"
-#include "tempfile.h"
+#include "wsutil/tempfile.h"
 
 #define INPUT_FRM_KEY                   "input_frame"
 
index c00839696a8a805679ba83b3224c063ae0ca6d50..f65ffe4b1274e72815e76c06adb520f665d427cb 100644 (file)
@@ -60,7 +60,7 @@
 #include "ui/gtk/old-gtk-compat.h"
 
 #ifdef _WIN32
-#include "../tempfile.h"
+#include "wsutil/tempfile.h"
 #include "ui/win32/print_win32.h"
 #endif
 
index b079646195c09970333ab1c75a2d570c5f3ee5eb..1ad1cc8bceee244bbb9cc5a0ce39f93ec11e4bc3 100644 (file)
@@ -50,7 +50,7 @@
 #include "ui/alert_box.h"
 #include "ui/simple_dialog.h"
 #include "ui/utf8_entities.h"
-#include "../tempfile.h"
+#include "wsutil/tempfile.h"
 #include <wsutil/file_util.h>
 
 #include "gtkglobals.h"
index 8e6138b6a2332583663b33e068bdc5661fe6bb01..350eeb57ff35739c5cf46c594f189f54b083ceb7 100644 (file)
@@ -50,7 +50,7 @@
 #include "ui/simple_dialog.h"
 #include "ui/alert_box.h"
 #include "ui/utf8_entities.h"
-#include "../tempfile.h"
+#include "wsutil/tempfile.h"
 
 #include "ui/gtk/hostlist_table.h"
 #include "ui/gtk/filter_utils.h"
index 81000bd629b417255a32c056d612508ca6463878..d412eda5b518a539c3bd7811a45868531b728195 100644 (file)
@@ -65,7 +65,7 @@
 #include "ui/util.h"
 #include "../g711.h"
 #include "../stat_menu.h"
-#include "../tempfile.h"
+#include "wsutil/tempfile.h"
 
 #include "ui/alert_box.h"
 #include "ui/last_open_dir.h"
index 218f1fe7d883214d8cbfaa844fcbd0ee305d0030..bfbb640eecf983b565183204a99449737ec27307 100644 (file)
@@ -53,7 +53,7 @@
 #include <windows.h>
 #include "ui/win32/file_dlg_win32.h"
 #include "ui/win32/print_win32.h"
-#include "tempfile.h"
+#include "wsutil/tempfile.h"
 #endif
 
 /* dialog output action */
index f8ac025b244995d2d0d01e16041c4d5ffbfbfe48..5bd3f49558cdea6b422548b1e7a9a28a04b9592e 100644 (file)
@@ -63,7 +63,7 @@
 #include "ui/util.h"
 #include "../g711.h"
 #include "../stat_menu.h"
-#include "../tempfile.h"
+#include "wsutil/tempfile.h"
 
 #include "ui/alert_box.h"
 #include "ui/last_open_dir.h"
index fe710a9451f434d87c5f5841090e25d3738067c9..d5474a8fddf6636c0c63e9343fe6ce9c9a0525d2 100644 (file)
@@ -187,7 +187,6 @@ SOURCES_WS_C = \
     ../../sync_pipe_write.c       \
     ../../tap-megaco-common.c     \
     ../../tap-rtp-common.c    \
-    ../../tempfile.c      \
     ../../u3.c \
     ../../version_info.c
 
index 3612b3a263d3f0820eb130aa7d1db8f7aee35954..a234f7cbc9fc84ee6fc5ee806158ad2a04813da8 100644 (file)
@@ -39,7 +39,7 @@
 
 #include "file.h"
 #include "wsutil/file_util.h"
-#include "tempfile.h"
+#include "wsutil/tempfile.h"
 
 #include <ui_import_text_dialog.h>
 #include <wireshark_application.h>
index 569f3b86a9d84fe71dfb4161056ac5d5e02f70d8..0437d7c7df247d35165b232878348550e781175f 100644 (file)
@@ -50,6 +50,7 @@ set(WSUTIL_FILES
   nstime.c
   privileges.c
   str_util.c
+  tempfile.c
   type_util.c
   ${WSUTIL_PLATFORM_FILES}
 )
index 5fc9a426badc051c4eff58a5ff259212af403f11..e930e69aa51111afac8916e1359cee9c1213f93c 100644 (file)
@@ -44,6 +44,7 @@ LIBWSUTIL_SRC =       \
        nstime.c        \
        privileges.c    \
        str_util.c      \
+       tempfile.c      \
        type_util.c
 
 # Header files that are not generated from other files
@@ -62,4 +63,5 @@ LIBWSUTIL_INCLUDES =  \
        nstime.h        \
        privileges.h    \
        str_util.h      \
+       tempfile.h      \
        type_util.h
similarity index 100%
rename from tempfile.c
rename to wsutil/tempfile.c
similarity index 91%
rename from tempfile.h
rename to wsutil/tempfile.h
index c39af9f3ea2a62b7c7c94a7cbd20201e1d034c8b..65746704dd0cf587c54f7837823490f5327f6e67 100644 (file)
@@ -25,6 +25,8 @@
 #ifndef __TEMPFILE_H__
 #define __TEMPFILE_H__
 
+#include "ws_symbol_export.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */
@@ -43,7 +45,7 @@ extern "C" {
  * @param pfx A prefix for the temporary file.
  * @return The file descriptor of the new tempfile, from mkstemp().
  */
-int create_tempfile(char **namebuf, const char *pfx);
+WS_DLL_PUBLIC int create_tempfile(char **namebuf, const char *pfx);
 
 /**
  * Create a directory with the given prefix (e.g. "wireshark"). The path
@@ -55,7 +57,7 @@ int create_tempfile(char **namebuf, const char *pfx);
  * @return The temporary directory path on success, or NULL on failure.
  *         Must NOT be freed.
  */
-const char *create_tempdir(char **namebuf, const char *pfx);
+WS_DLL_PUBLIC const char *create_tempdir(char **namebuf, const char *pfx);
 
 #ifdef __cplusplus
 }