diff options
author | Stephen Fisher <steve@stephen-fisher.com> | 2008-04-07 05:22:54 +0000 |
---|---|---|
committer | Stephen Fisher <steve@stephen-fisher.com> | 2008-04-07 05:22:54 +0000 |
commit | 726a1caaf1c717a5784beb2fb5a05900552563f0 (patch) | |
tree | 3f861f04f60e8872bcf7f82f56de654af93a7590 /wiretap | |
parent | 545d54ae745aa147ffa2e883dd0b982b56f86761 (diff) | |
download | wireshark-726a1caaf1c717a5784beb2fb5a05900552563f0.tar.gz wireshark-726a1caaf1c717a5784beb2fb5a05900552563f0.tar.bz2 wireshark-726a1caaf1c717a5784beb2fb5a05900552563f0.zip |
- Remove GLIB1 code
- Change ugly GLIB version checking statements to GLIB_CHECK_VERSION
- Remove ws_strsplit files because we no longer need to borrow GLIB2's
g_strsplit code for the no longer supported GLIB1 builds
svn path=/trunk/; revision=24829
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/file_util.h | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/wiretap/file_util.h b/wiretap/file_util.h index 57f5a5e30c..61cc64f546 100644 --- a/wiretap/file_util.h +++ b/wiretap/file_util.h @@ -44,7 +44,7 @@ extern "C" { * must tweak a given filename from UTF8 to UTF16 as we use NT Unicode (Win9x * - now unsupported - used locale based encoding here). */ -#if defined _WIN32 && (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 6)) +#if defined _WIN32 && GLIB_CHECK_VERSION(2,6,0) #include <stdio.h> extern int eth_stdio_open (const gchar *filename, int flags, int mode); @@ -65,7 +65,7 @@ extern FILE * eth_stdio_freopen (const gchar *filename, const gchar *mode, FILE #define eth_fopen eth_stdio_fopen #define eth_freopen eth_stdio_freopen -#else /* _WIN32 && GLIB_MAJOR_VERSION */ +#else /* _WIN32 && GLIB_CHECK_VERSION */ /* GLib 2.4 or below, using "old school" functions */ #ifdef _WIN32 @@ -85,7 +85,7 @@ extern FILE * eth_stdio_freopen (const gchar *filename, const gchar *mode, FILE #define eth_fopen fopen #define eth_freopen freopen -#endif /* _WIN32 && GLIB_MAJOR_VERSION */ +#endif /* _WIN32 && GLIB_CHECK_VERSION */ /* some common file function differences between UNIX and WIN32 */ @@ -106,7 +106,6 @@ extern FILE * eth_stdio_freopen (const gchar *filename, const gchar *mode, FILE #endif /* _WIN32 */ /* directory handling */ -#if GLIB_MAJOR_VERSION >= 2 #define ETH_DIR GDir #define ETH_DIRENT const char #define eth_dir_open g_dir_open @@ -114,15 +113,6 @@ extern FILE * eth_stdio_freopen (const gchar *filename, const gchar *mode, FILE #define eth_dir_get_name(dirent) dirent #define eth_dir_rewind g_dir_rewind #define eth_dir_close g_dir_close -#else -#define ETH_DIR DIR -#define ETH_DIRENT struct dirent -#define eth_dir_open(name,flags,error) opendir(name) -#define eth_dir_read_name readdir -#define eth_dir_get_name(dirent) (gchar *)(dirent)->d_name -#define eth_dir_rewind rewinddir -#define eth_dir_close closedir -#endif /* GLIB_MAJOR_VERSION */ /* XXX - remove include "dirent.h" */ /* XXX - remove include "direct.h" */ |