summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-11-06 19:20:37 -0800
committerGuy Harris <guy@alum.mit.edu>2015-11-07 21:52:23 +0000
commit0162e54075bb7ad967a85736b3c8addd53d86de5 (patch)
tree8a621af4c54f0d11b610b6842c9f53aae849e68a /ui
parent24bfb7e35d619c004e0458f38a1d5ae538a898fb (diff)
downloadwireshark-0162e54075bb7ad967a85736b3c8addd53d86de5.tar.gz
Clean up includes of unistd.h, fcntl.h, and sys/stat.h.
Have wsutil/file_util.h include them on UN*X, just as it includes io.h on Windows, so we can have a rule of "if you do file operations, include <wsutil/file_util.h> and use the routines in it". Remove includes of unistd.h, fcntl.h, and sys/stat.h that aren't necessary (whether because of the addition of them to wsutil/file_util.h or because they weren't needed in the first place). Change-Id: Ie241dd74deff284e39a5f690a297dbb6e1dc485f Reviewed-on: https://code.wireshark.org/review/11619 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui')
-rw-r--r--ui/capture.c4
-rw-r--r--ui/cli/tap-follow.c4
-rw-r--r--ui/export_object.c8
-rw-r--r--ui/filters.c4
-rw-r--r--ui/gtk/capture_file_dlg.c4
-rw-r--r--ui/gtk/export_sslkeys.c8
-rw-r--r--ui/gtk/fileset_dlg.c4
-rw-r--r--ui/gtk/firewall_dlg.c8
-rw-r--r--ui/gtk/follow_stream.c3
-rw-r--r--ui/gtk/follow_tcp.c4
-rw-r--r--ui/gtk/iax2_analysis.c8
-rw-r--r--ui/gtk/main.c4
-rw-r--r--ui/gtk/packet_panes.c8
-rw-r--r--ui/gtk/rtp_analysis.c8
-rw-r--r--ui/mcast_stream.c3
-rw-r--r--ui/qt/main_window_slots.cpp8
-rw-r--r--ui/rtp_stream.c4
-rw-r--r--ui/text_import.c4
-rw-r--r--ui/traffic_table_ui.c3
19 files changed, 0 insertions, 101 deletions
diff --git a/ui/capture.c b/ui/capture.c
index b0721995e4..0a95cf8be9 100644
--- a/ui/capture.c
+++ b/ui/capture.c
@@ -24,10 +24,6 @@
#ifdef HAVE_LIBPCAP
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/ui/cli/tap-follow.c b/ui/cli/tap-follow.c
index 3d4608a533..a436f502f1 100644
--- a/ui/cli/tap-follow.c
+++ b/ui/cli/tap-follow.c
@@ -27,10 +27,6 @@
#include "config.h"
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
#include <stdio.h>
#include <stdlib.h>
diff --git a/ui/export_object.c b/ui/export_object.c
index 3a90994870..65c478ea9c 100644
--- a/ui/export_object.c
+++ b/ui/export_object.c
@@ -26,14 +26,6 @@
#include <string.h>
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
#include <errno.h>
#include <epan/packet_info.h>
diff --git a/ui/filters.c b/ui/filters.c
index 6ed94c5a89..01014798f4 100644
--- a/ui/filters.c
+++ b/ui/filters.c
@@ -26,10 +26,6 @@
#include <string.h>
#include <errno.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
#include <glib.h>
#include <wsutil/file_util.h>
diff --git a/ui/gtk/capture_file_dlg.c b/ui/gtk/capture_file_dlg.c
index 6d94cf796b..c93d5a6b36 100644
--- a/ui/gtk/capture_file_dlg.c
+++ b/ui/gtk/capture_file_dlg.c
@@ -22,10 +22,6 @@
#include "config.h"
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
#include <string.h>
#include <gtk/gtk.h>
diff --git a/ui/gtk/export_sslkeys.c b/ui/gtk/export_sslkeys.c
index a03fa71455..ca3f17515c 100644
--- a/ui/gtk/export_sslkeys.c
+++ b/ui/gtk/export_sslkeys.c
@@ -26,14 +26,6 @@
#include <string.h>
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
#include <wsutil/file_util.h>
#include <wsutil/str_util.h>
diff --git a/ui/gtk/fileset_dlg.c b/ui/gtk/fileset_dlg.c
index 3b612c9401..44407865eb 100644
--- a/ui/gtk/fileset_dlg.c
+++ b/ui/gtk/fileset_dlg.c
@@ -24,10 +24,6 @@
#include <string.h>
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
#include <gtk/gtk.h>
#include <wsutil/filesystem.h>
diff --git a/ui/gtk/firewall_dlg.c b/ui/gtk/firewall_dlg.c
index 5d4ce3cb8a..8ec00efa6c 100644
--- a/ui/gtk/firewall_dlg.c
+++ b/ui/gtk/firewall_dlg.c
@@ -36,14 +36,6 @@
#include <string.h>
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
#include <gtk/gtk.h>
#include <epan/packet.h>
diff --git a/ui/gtk/follow_stream.c b/ui/gtk/follow_stream.c
index 29445fc93c..f30e6648cf 100644
--- a/ui/gtk/follow_stream.c
+++ b/ui/gtk/follow_stream.c
@@ -23,9 +23,6 @@
#include "config.h"
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
#include <string.h>
#include <gtk/gtk.h>
diff --git a/ui/gtk/follow_tcp.c b/ui/gtk/follow_tcp.c
index 1fa5f30ba8..aece6aabd6 100644
--- a/ui/gtk/follow_tcp.c
+++ b/ui/gtk/follow_tcp.c
@@ -25,10 +25,6 @@
#include <string.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
#include <gtk/gtk.h>
#include <epan/follow.h>
diff --git a/ui/gtk/iax2_analysis.c b/ui/gtk/iax2_analysis.c
index 5f4178d98a..56a10f9770 100644
--- a/ui/gtk/iax2_analysis.c
+++ b/ui/gtk/iax2_analysis.c
@@ -38,14 +38,6 @@
#include <string.h>
#include <locale.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
#include <gtk/gtk.h>
#include <wsutil/file_util.h>
diff --git a/ui/gtk/main.c b/ui/gtk/main.c
index fc871d718b..29b665c743 100644
--- a/ui/gtk/main.c
+++ b/ui/gtk/main.c
@@ -36,10 +36,6 @@
#include <string.h>
#include <locale.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
diff --git a/ui/gtk/packet_panes.c b/ui/gtk/packet_panes.c
index 3c74b25dcb..6f78f8ef27 100644
--- a/ui/gtk/packet_panes.c
+++ b/ui/gtk/packet_panes.c
@@ -25,14 +25,6 @@
#include "config.h"
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#if GTK_CHECK_VERSION(3,0,0)
diff --git a/ui/gtk/rtp_analysis.c b/ui/gtk/rtp_analysis.c
index 695e405768..2d484ec0ef 100644
--- a/ui/gtk/rtp_analysis.c
+++ b/ui/gtk/rtp_analysis.c
@@ -37,14 +37,6 @@
#include <math.h>
#include <string.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
#include <gtk/gtk.h>
#include <wsutil/file_util.h>
diff --git a/ui/mcast_stream.c b/ui/mcast_stream.c
index 04cd9a3567..6d354a4e5d 100644
--- a/ui/mcast_stream.c
+++ b/ui/mcast_stream.c
@@ -28,9 +28,6 @@
*/
#include "config.h"
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
#include <glib.h>
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp
index 6f05c1de21..e4eab4e43a 100644
--- a/ui/qt/main_window_slots.cpp
+++ b/ui/qt/main_window_slots.cpp
@@ -21,14 +21,6 @@
#include <config.h>
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
// Qt 5.5.0 + Visual C++ 2013
#ifdef _MSC_VER
#pragma warning(push)
diff --git a/ui/rtp_stream.c b/ui/rtp_stream.c
index 07c9e81213..01b6198345 100644
--- a/ui/rtp_stream.c
+++ b/ui/rtp_stream.c
@@ -28,10 +28,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
#include "file.h"
#include <epan/epan.h>
diff --git a/ui/text_import.c b/ui/text_import.c
index dc103d75e6..d7f4b2dcac 100644
--- a/ui/text_import.c
+++ b/ui/text_import.c
@@ -113,10 +113,6 @@
#include <time.h>
#include <glib.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
#include <errno.h>
#include <assert.h>
diff --git a/ui/traffic_table_ui.c b/ui/traffic_table_ui.c
index 0a98a98de9..b76f15830c 100644
--- a/ui/traffic_table_ui.c
+++ b/ui/traffic_table_ui.c
@@ -41,9 +41,6 @@
#include <errno.h>
#include <stdio.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
#include "wsutil/filesystem.h"
#include "wsutil/file_util.h"
#include "wsutil/tempfile.h"