Ethereal-dev: [ethereal-dev] win32 changes, really
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
From: Gilbert Ramirez <gram@xxxxxxxxxx>
Date: Fri, 14 Jan 2000 08:45:56 -0600
:-) --gilbert
? out
? main.diff
? inet_pton.c.mod
? w.diff
? win.diff
? win32.diff
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/ethereal/Makefile.am,v
retrieving revision 1.151
diff -u -r1.151 Makefile.am
--- Makefile.am 2000/01/14 07:51:14 1.151
+++ Makefile.am 2000/01/14 14:41:39
@@ -31,15 +31,6 @@
# Any POSIX-compatible YACC should honor the -p flag
YFLAGS=-d -p dfilter_
-## use @LIBLTDL@ because some broken makes do not accept macros in targets
-## we can only do this because our LIBLTDL does not contain ${top_builddir}
-@LIBLTDL@: libtool libltdl/libtool libltdl/config.h \
- $(srcdir)/libltdl/ltdl.c $(srcdir)/libltdl/ltdl.h
- (cd libltdl; $(MAKE) `echo $(LIBLTDL) | sed 's,.*\.\./libltdl/,,g'`)
-# Without the following line, the check may fail if libltdl/libtool is
-# removed after libltdl is configured
-libltdl/libtool libltdl/config.h:
-
DISSECTOR_SOURCES = \
packet-aarp.c \
packet-afs.c \
@@ -269,7 +260,6 @@
ethereal_DEPENDENCIES = \
$(ethereal_optional_objects) \
$(ethereal_additional_libs) \
- @LIBLTDL@
plugins/gryphon/gryphon.la
# This automake variable adds to the link-line for the executable
@@ -277,8 +267,8 @@
$(ethereal_optional_objects) \
$(ethereal_additional_libs) \
@SNMP_A@ \
- @LIBLTDL@ "-dlopen" self \
- "-dlopen" plugins/gryphon/gryphon.la @GTK_LIBS@
+ "-dlopen" self \
+ "-dlopen" plugins/gryphon/gryphon.la @GTK_LIBS@ -lgmodule
ethereal_LDFLAGS = -export-dynamic
@@ -289,8 +279,8 @@
tethereal_DEPENDENCIES = wiretap/libwiretap.a
tethereal_LDADD = wiretap/libwiretap.a \
@SNMP_A@ \
- @LIBLTDL@ "-dlopen" self \
- "-dlopen" plugins/gryphon/gryphon.la @GLIB_LIBS@ -lm
+ "-dlopen" self \
+ "-dlopen" plugins/gryphon/gryphon.la @GLIB_LIBS@ -lgmodule -lm
editcap_SOURCES = editcap.c
editcap_DEPENDENCIES = wiretap/libwiretap.a
@@ -387,7 +377,7 @@
dist-hook:
@rm -f $(distdir)/register.c
-SUBDIRS = wiretap gtk plugins libltdl @ethereal_SUBDIRS@
+SUBDIRS = wiretap gtk plugins @ethereal_SUBDIRS@
ethereal.1: ethereal doc/ethereal.pod.template
(cd doc ; \
@@ -403,8 +393,6 @@
dfilter-scanner.c : dfilter-scanner.l
$(LEX) -Pdfilter_ -t $(srcdir)/dfilter-scanner.l > dfilter-scanner.c
-
-INCLUDES = -I$(srcdir)/libltdl
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck
Index: acconfig.h
===================================================================
RCS file: /usr/local/cvsroot/ethereal/acconfig.h,v
retrieving revision 1.13
diff -u -r1.13 acconfig.h
--- acconfig.h 1999/12/28 04:40:05 1.13
+++ acconfig.h 2000/01/14 14:41:39
@@ -37,4 +37,6 @@
#undef NEED_STRERROR_H
+#undef NEED_MKSTEMP
+
#undef PLUGIN_DIR
Index: config.h.win32
===================================================================
RCS file: /usr/local/cvsroot/ethereal/config.h.win32,v
retrieving revision 1.4
diff -u -r1.4 config.h.win32
--- config.h.win32 2000/01/10 17:32:50 1.4
+++ config.h.win32 2000/01/14 14:41:39
@@ -8,102 +8,75 @@
byte first (like Motorola and SPARC, unlike Intel and VAX). */
/* #undef WORDS_BIGENDIAN */
-/* Define if lex declares yytext as a char * by default, not a char[]. */
-#define YYTEXT_POINTER 1
-
/* #undef HAVE_SA_LEN */
#define DATAFILE_DIR "/usr/local/etc"
-
-/* #undef NEED_INET_V6DEFS_H */
+#define PLUGIN_DIR "/usr/local/lib/ethereal/plugins/0.8"
/* #undef NEED_SNPRINTF_H */
/* #undef NEED_STRERROR_H */
-
-/* Define if you have the pcap library (-lpcap). */
-/* #define HAVE_LIBPCAP 1 */ /* although there are versions available */
-
-/* #undef HAVE_LIBZ */ /* I think it might be available */
-/* Define if you have the gethostbyname2 function. */
-/* #undef HAVE_GETHOSTBYNAME2 */
+#define NEED_MKSTEMP 1
-/* Define if you have the getprotobynumber function. */
-/* #undef HAVE_GETPROTOBYNUMBER */
-
-/* Define if you have the <dlfcn.h> header file. */
-/* #undef HAVE_DLFCN_H */ /* XXX - use "LoadLibrary()"? */
-
/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
-/* Define if you have the <net/if.h> header file. */
-/* #undef HAVE_NET_IF_H */
-
-/* Define if you have the <netdb.h> header file. */
-/* #undef HAVE_NETDB_H */
-
/* Define if you have the <netinet/in.h> header file. */
/* #define HAVE_NETINET_IN_H 1 */
/* Define if you have the <snmp/snmp.h> header file. */
/* #undef HAVE_SNMP_SNMP_H */
-/* Define if you have the <snmp/version.h> header file. */
-/* #undef HAVE_SNMP_VERSION_H */
-
/* Define if you have the <stdarg.h> header file. */
#define HAVE_STDARG_H 1
-/* Define if you have the <stddef.h> header file. */
-/* #undef HAVE_STDDEF_H */
-
/* Define if you have the <sys/ioctl.h> header file. */
/* #undef HAVE_SYS_IOCTL_H */
-/* Define if you have the <sys/socket.h> header file. */
-/* #undef HAVE_SYS_SOCKET_H */
-
/* Define if you have the <sys/sockio.h> header file. */
/* #undef HAVE_SYS_SOCKIO_H */
-/* Define if you have the <sys/stat.h> header file. */
-/* #undef HAVE_SYS_STAT_H */
-
/* Define if you have the <sys/time.h> header file. */
/* #define HAVE_SYS_TIME_H 1 */
+/* #undef HAVE_DIRENT_H 1 */
/* Define if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
-/* Define if you have the <sys/wait.h> header file. */
-/* #undef HAVE_SYS_WAIT_H */
-
/* Define if you have the <ucd-snmp/snmp.h> header file. */
/* #undef HAVE_UCD_SNMP_SNMP_H */
-/* Define if you have the <ucd-snmp/version.h> header file. */
-/* #undef HAVE_UCD_SNMP_VERSION_H */
-
/* Define if you have the <unistd.h> header file. */
/* #define HAVE_UNISTD_H 1 */
+/* Define if you have the pcap library (-lpcap). */
+/* #define HAVE_LIBPCAP 1 */
+
+/* Define if you have the z library (-lz). */
+/*#define HAVE_LIBZ 1*/
+
/* Name of package */
#define PACKAGE "ethereal"
/* Version number of package */
-#define VERSION "0.8.0"
+#define VERSION "0.8.1"
-#define HAVE_WINSOCK_H 1
-#define HAVE_DIRECT_H 1
-#define HAVE_IO_H 1
-#define NEED_INET_V6DEFS_H 1
-#define snprintf _snprintf
-#define vsnprintf _vsnprintf
-#define strncasecmp strnicmp
-#define open _open
-#define close _close
-#define popen _popen
-#define pclose _pclose
+#define HAVE_WINDOWS_H 1
+#define HAVE_WINSOCK_H 1
+#define HAVE_DIRECT_H 1
+#define HAVE_IO_H 1
+#define NEED_INET_V6DEFS_H 1
+#define snprintf _snprintf
+#define vsnprintf _vsnprintf
+#define strncasecmp strnicmp
+#define open _open
+#define close _close
+#define popen _popen
+#define pclose _pclose
+
+/* Needed for zlib, according to http://www.winimage.com/zLibDll/ */
+/*#define ZLIB_DLL 1
+#define _WINDOWS 1*/
+#define HAVE_PLUGINS 1
Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/ethereal/configure.in,v
retrieving revision 1.72
diff -u -r1.72 configure.in
--- configure.in 2000/01/10 17:32:50 1.72
+++ configure.in 2000/01/14 14:41:39
@@ -153,7 +153,7 @@
dnl Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h stdarg.h netdb.h)
+AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h stdarg.h netdb.h dirent.h)
AC_CHECK_HEADERS(sys/stat.h sys/sockio.h sys/types.h sys/socket.h)
AC_CHECK_HEADERS(sys/wait.h sys/param.h)
AC_CHECK_HEADERS(netinet/in.h net/if.h)
@@ -231,6 +231,7 @@
if test "$ac_cv_func_mkstemp" = no ; then
MKSTEMP_C="mkstemp.c"
MKSTEMP_O="mkstemp.o"
+ AC_DEFINE(NEED_MKSTEMP)
fi
AC_SUBST(MKSTEMP_C)
AC_SUBST(MKSTEMP_O)
@@ -313,14 +314,11 @@
AC_SUBST(PLUGIN_DIR)
dnl libtool defs
-AC_LIBLTDL_CONVENIENCE(libltdl)
-AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL
-AC_SUBST(LIBLTDL)
AC_SUBST(LIBTOOL_DEPS)
AM_CONFIG_HEADER(config.h)
-AC_CONFIG_SUBDIRS(wiretap libltdl)
+AC_CONFIG_SUBDIRS(wiretap)
AC_OUTPUT(
Makefile
ethereal.spec
Index: dfilter.h
===================================================================
RCS file: /usr/local/cvsroot/ethereal/dfilter.h,v
retrieving revision 1.14
diff -u -r1.14 dfilter.h
--- dfilter.h 1999/10/12 05:00:47 1.14
+++ dfilter.h 2000/01/14 14:41:39
@@ -26,6 +26,10 @@
#ifndef __DFILTER_H__
#define __DFILTER_H__
+#ifndef __PROTO_H__
+#include "proto.h"
+#endif
+
/* dfilter_error_msg is NULL if there was no error during dfilter_compile,
* otherwise it points to a displayable error message. */
extern gchar *dfilter_error_msg;
Index: file.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/file.c,v
retrieving revision 1.152
diff -u -r1.152 file.c
--- file.c 2000/01/13 00:53:09 1.152
+++ file.c 2000/01/14 14:41:39
@@ -1,7 +1,7 @@
/* file.c
* File I/O routines
*
- * $Id: file.c,v 1.152 2000/01/13 00:53:09 guy Exp $
+ * $Id: file.c,v 1.151 2000/01/10 01:43:48 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@xxxxxxxx>
@@ -83,9 +83,7 @@
#include "conversation.h"
#include "globals.h"
-#ifdef HAVE_DLFCN_H
#include "plugins.h"
-#endif
extern GtkWidget *packet_list, *prog_bar, *info_bar, *byte_view, *tree_view;
extern guint file_ctx;
@@ -534,13 +532,13 @@
proto_tree_free(protocol_tree);
}
else {
-#ifdef HAVE_DLFCN_H
+#ifdef HAVE_PLUGINS
if (plugin_list)
protocol_tree = proto_tree_create_root();
#endif
dissect_packet(buf, fdata, protocol_tree);
fdata->passed_dfilter = TRUE;
-#ifdef HAVE_DLFCN_H
+#ifdef HAVE_PLUGINS
if (protocol_tree)
proto_tree_free(protocol_tree);
#endif
Index: packet-isis-lsp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-isis-lsp.c,v
retrieving revision 1.1
diff -u -r1.1 packet-isis-lsp.c
--- packet-isis-lsp.c 1999/12/15 04:34:18 1.1
+++ packet-isis-lsp.c 2000/01/14 14:41:40
@@ -37,12 +37,16 @@
#include <stdio.h>
#include <string.h>
#include <glib.h>
-#include <netinet/in.h>
+
+#ifdef HAVE_NET_INET_H
+#include <net/inet.h>
+#endif
+
#include "packet.h"
-#include "resolv.h"
#include "packet-isis.h"
#include "packet-isis-clv.h"
#include "packet-isis-lsp.h"
+#include "resolv.h"
/* lsp packets */
static int proto_isis_lsp = -1;
Index: packet-tcp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-tcp.c,v
retrieving revision 1.54
diff -u -r1.54 packet-tcp.c
--- packet-tcp.c 1999/12/09 20:54:32 1.54
+++ packet-tcp.c 2000/01/14 14:41:40
@@ -51,9 +51,7 @@
# include "snprintf.h"
#endif
-#ifdef HAVE_DLFCN_H
#include "plugins.h"
-#endif
#ifndef __PACKET_IP_H__
#include "packet-ip.h"
@@ -490,7 +488,7 @@
if (packet_max > offset) {
/* try to apply the plugins */
-#ifdef HAVE_DLFCN_H
+#ifdef HAVE_PLUGINS
plugin *pt_plug = plugin_list;
if (pt_plug) {
Index: packet-udp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-udp.c,v
retrieving revision 1.45
diff -u -r1.45 packet-udp.c
--- packet-udp.c 2000/01/07 09:10:12 1.45
+++ packet-udp.c 2000/01/14 14:41:40
@@ -44,9 +44,7 @@
#include "globals.h"
#include "resolv.h"
-#ifdef HAVE_DLFCN_H
#include "plugins.h"
-#endif
static int proto_udp = -1;
static int hf_udp_srcport = -1;
@@ -247,7 +245,7 @@
return;
/* try to apply the plugins */
-#ifdef HAVE_DLFCN_H
+#ifdef HAVE_PLUGINS
{
plugin *pt_plug = plugin_list;
Index: plugins.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/plugins.c,v
retrieving revision 1.4
diff -u -r1.4 plugins.c
--- plugins.c 2000/01/04 21:29:43 1.4
+++ plugins.c 2000/01/14 14:41:40
@@ -27,19 +27,35 @@
# include "config.h"
#endif
-#ifdef HAVE_DLFCN_H
+#include "plugins.h"
+
+#ifdef HAVE_PLUGINS
#include <time.h>
+
+#ifdef HAVE_DIRENT_H
#include <dirent.h>
+#endif
+
+#ifdef HAVE_DIRECT_H
+#include <direct.h>
+#endif
+
#include <string.h>
+#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
+
+#ifdef HAVE_FCNTL_H
#include <fcntl.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include "globals.h"
-#include "plugins.h"
/* linked list of all plugins */
plugin *plugin_list;
@@ -240,7 +256,11 @@
if (!statusfile) {
pf_path = g_malloc(strlen(getenv("HOME")) + strlen(PF_DIR) + 2);
sprintf(pf_path, "%s/%s", getenv("HOME"), PF_DIR);
+ #ifdef WIN32
+ mkdir(pf_path);
+ #else
mkdir(pf_path, 0755);
+ #endif
g_free(pf_path);
statusfile=fopen(plugin_status_file, "w");
if (!statusfile) return -1;
@@ -262,7 +282,7 @@
* If necessary, enable the plugin, and change the filter.
*/
static void
-check_plugin_status(gchar *name, gchar *version, lt_dlhandle handle,
+check_plugin_status(gchar *name, gchar *version, GModule *handle,
gchar *filter_string, FILE *statusfile)
{
gchar *ref_string;
@@ -285,9 +305,9 @@
else { /* found the plugin */
if (line[ref_string_len+1] == '1') {
enable_plugin(name, version);
- proto_init = (void (*)())lt_dlsym(handle, "proto_init");
- if (proto_init)
+ if (g_module_symbol(handle, "proto_init", (gpointer*)&proto_init) == TRUE) {
proto_init();
+ }
}
if (fgets(line, 512, statusfile) == NULL) return;
@@ -307,7 +327,7 @@
DIR *dir; /* scanned directory */
struct dirent *file; /* current file */
gchar filename[512]; /* current file name */
- lt_dlhandle handle; /* handle returned by dlopen */
+ GModule *handle; /* handle returned by dlopen */
gchar *name;
gchar *version;
gchar *protocol;
@@ -318,7 +338,11 @@
int cr;
FILE *statusfile;
+#ifdef WIN32
+#define LT_LIB_EXT ".dll"
+#else
#define LT_LIB_EXT ".la"
+#endif
if (!plugin_status_file)
{
@@ -341,34 +365,31 @@
sprintf(filename, "%s/%s", dirname, file->d_name);
- if ((handle = lt_dlopen(filename)) == NULL) continue;
+ if ((handle = g_module_open(filename, 0)) == NULL) continue;
name = (gchar *)file->d_name;
- if ((version = (gchar *)lt_dlsym(handle, "version")) == NULL)
+ if (g_module_symbol(handle, "version", (gpointer*)&version) == FALSE)
{
- lt_dlclose(handle);
+ g_module_close(handle);
continue;
}
- if ((protocol = (gchar *)lt_dlsym(handle, "protocol")) == NULL)
+ if (g_module_symbol(handle, "protocol", (gpointer*)&protocol) == FALSE)
{
- lt_dlclose(handle);
+ g_module_close(handle);
continue;
}
- if ((filter_string = (gchar *)lt_dlsym(handle, "filter_string")) == NULL)
+ if (g_module_symbol(handle, "filter_string", (gpointer*)&filter_string) == FALSE)
{
- lt_dlclose(handle);
+ g_module_close(handle);
continue;
}
if (dfilter_compile(filter_string, &filter) != 0) {
- lt_dlclose(handle);
+ g_module_close(handle);
continue;
}
- if ((dissector = (void (*)(const u_char *, int,
- frame_data *,
- proto_tree *)) lt_dlsym(handle, "dissector")) == NULL)
- {
+ if (g_module_symbol(handle, "dissector", (gpointer*)&dissector) == FALSE) {
if (filter != NULL)
dfilter_destroy(filter);
- lt_dlclose(handle);
+ g_module_close(handle);
continue;
}
@@ -384,7 +405,7 @@
name, version);
if (filter != NULL)
dfilter_destroy(filter);
- lt_dlclose(handle);
+ g_module_close(handle);
continue;
}
if (statusfile) {
Index: plugins.h
===================================================================
RCS file: /usr/local/cvsroot/ethereal/plugins.h,v
retrieving revision 1.4
diff -u -r1.4 plugins.h
--- plugins.h 2000/01/04 20:37:07 1.4
+++ plugins.h 2000/01/14 14:41:40
@@ -26,10 +26,30 @@
#ifndef __PLUGINS_H__
#define __PLUGINS_H__
-#include "ltdl.h"
+#include <glib.h>
+#include <gmodule.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#ifdef HAVE_DLFCN_H
+#define HAVE_PLUGINS 1
+#endif
+#endif /* HAVE_CONFIG_H */
+
+#ifndef __DFILTER_H__
+#include "dfilter.h"
+#endif
+
+#ifndef __PACKET_H__
+#include "packet.h"
+#endif
+
+#ifdef HAVE_WINSOCK_H
+#include <winsock.h>
+#endif
+
typedef struct _plugin {
- lt_dlhandle handle; /* handle returned by dlopen */
+ GModule *handle; /* handle returned by dlopen */
gchar *name; /* plugin name */
gchar *version; /* plugin version */
gboolean enabled; /* is it active ? */
Index: util.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/util.c,v
retrieving revision 1.25
diff -u -r1.25 util.c
--- util.c 2000/01/10 17:32:53 1.25
+++ util.c 2000/01/14 14:41:40
@@ -55,6 +55,10 @@
# include "snprintf.h"
#endif
+#ifdef NEED_MKSTEMP
+#include "mkstemp.h"
+#endif
+
#include "util.h"
#ifdef HAVE_IO_H
Index: gtk/main.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/gtk/main.c,v
retrieving revision 1.86
diff -u -r1.86 main.c
--- main.c 2000/01/12 22:07:56 1.86
+++ main.c 2000/01/14 14:41:41
@@ -53,6 +53,10 @@
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef HAVE_IO_H
+#include <io.h> /* open/close on win32 */
+#endif
+
#ifdef HAVE_DIRECT_H
#include <direct.h>
#endif
@@ -1294,8 +1298,10 @@
if (capture_option_specified)
fprintf(stderr, "This version of Ethereal was not built with support for capturing packets.\n");
#endif
+#ifndef WIN32
if (arg_error)
print_usage();
+#endif
#ifdef HAVE_LIBPCAP
if (start_capture) {
if (cf.iface == NULL) {
Index: gtk/main.h
===================================================================
RCS file: /usr/local/cvsroot/ethereal/gtk/main.h,v
retrieving revision 1.8
diff -u -r1.8 main.h
--- main.h 1999/12/10 06:28:23 1.8
+++ main.h 2000/01/14 14:41:41
@@ -64,7 +64,7 @@
void file_reload_cmd_cb(GtkWidget *, gpointer);
void file_print_cmd_cb(GtkWidget *, gpointer);
void file_print_packet_cmd_cb(GtkWidget *, gpointer);
-#ifdef HAVE_DLFCN_H
+#ifdef HAVE_PLUGINS
void tools_plugins_cmd_cb(GtkWidget *, gpointer);
#endif
void expand_all_cb(GtkWidget *, gpointer);
Index: gtk/menu.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/gtk/menu.c,v
retrieving revision 1.15
diff -u -r1.15 menu.c
--- menu.c 2000/01/08 23:34:50 1.15
+++ menu.c 2000/01/14 14:41:41
@@ -114,7 +114,7 @@
{"/Display/Collapse _All", NULL, GTK_MENU_FUNC(collapse_all_cb), 0, NULL},
{"/Display/_Expand All", NULL, GTK_MENU_FUNC(expand_all_cb), 0, NULL},
{"/_Tools", NULL, NULL, 0, "<Branch>" },
-#ifdef HAVE_DLFCN_H
+#ifdef HAVE_PLUGINS
{"/Tools/_Plugins...", NULL, GTK_MENU_FUNC(tools_plugins_cmd_cb), 0, NULL},
#endif
{"/Tools/_Follow TCP Stream", NULL, GTK_MENU_FUNC(follow_stream_cb), 0, NULL},
Index: gtk/plugins_dlg.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/gtk/plugins_dlg.c,v
retrieving revision 1.9
diff -u -r1.9 plugins_dlg.c
--- plugins_dlg.c 2000/01/04 20:37:18 1.9
+++ plugins_dlg.c 2000/01/14 14:41:41
@@ -27,7 +27,7 @@
#include "config.h"
#endif
-#ifdef HAVE_DLFCN_H
+#ifdef HAVE_PLUGINS
#include <errno.h>
#include <sys/types.h>
@@ -160,7 +160,6 @@
gtk_widget_show(plugins_window);
- lt_dlinit();
}
/*
@@ -186,10 +185,16 @@
while (pt_plug)
{
plugent[0] = pt_plug->name;
- plugent[1] = (gchar *)lt_dlsym(pt_plug->handle, "desc");
+
+ if (g_module_symbol(pt_plug->handle, "desc", &plugent[1]) == FALSE) {
+ /* This plugin fails; continue next plugin */
+ goto NEXT_PLUGIN;
+ }
+
plugent[2] = pt_plug->version;
plugent[3] = (pt_plug->enabled ? "Yes" : "No");
gtk_clist_append(GTK_CLIST(clist), plugent);
+ NEXT_PLUGIN:
pt_plug = pt_plug->next;
}
}
@@ -240,8 +245,7 @@
simple_dialog(ESD_TYPE_WARN, NULL, "Plugin not found");
return;
}
- proto_init = (void (*)())lt_dlsym(pt_plug->handle, "proto_init");
- if (proto_init)
+ if (g_module_symbol(pt_plug->handle, "proto_init", (void**)&proto_init) == TRUE)
proto_init();
gtk_clist_set_text(GTK_CLIST(clist), selected_row, 3, "Yes");
@@ -370,7 +374,7 @@
filter_entry = gtk_object_get_data(GTK_OBJECT(parent_w), PLUGINS_DFILTER_TE);
pt_plug = find_plugin(selected_name, selected_version);
- filter_string = (gchar *)lt_dlsym(pt_plug->handle, "filter_string");
+ g_module_symbol(pt_plug->handle, "filter_string", &filter_string);
gtk_entry_set_text(GTK_ENTRY(filter_entry), filter_string);
}
#endif
Index: wiretap/config.h.win32
===================================================================
RCS file: /usr/local/cvsroot/ethereal/wiretap/config.h.win32,v
retrieving revision 1.3
diff -u -r1.3 config.h.win32
--- config.h.win32 2000/01/10 17:33:17 1.3
+++ config.h.win32 2000/01/14 14:41:41
@@ -1,23 +1,12 @@
+
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
-
-/* Define if your processor stores words with the most significant
- byte first (like Motorola and SPARC, unlike Intel and VAX). */
-/* #undef WORDS_BIGENDIAN */
-
-/* Define if lex declares yytext as a char * by default, not a char[]. */
-#define YYTEXT_POINTER 1
-/* #undef HAVE_GLIB10 */
+/* Define if you have the <unistd.h> header file. */
+/* #define HAVE_UNISTD_H */
-/* Define if you have the <netinet/in.h> header file. */
-/* #undef HAVE_NETINET_IN_H */
-
-/* Define if you have the <sys/time.h> header file. */
-/* #undef HAVE_SYS_TIME_H */
-
/* Define if you have the z library (-lz). */
-/* #undef HAVE_LIBZ */
+/*#define HAVE_LIBZ 1*/
/* Name of package */
#define PACKAGE "libwtap.a"
@@ -27,5 +16,9 @@
#define HAVE_WINSOCK_H 1
#define HAVE_IO_H 1
-#define open _open
-#define close _close
+#define open _open
+#define close _close
+
+/* Needed for zlib, according to http://www.winimage.com/zLibDll/ */
+/*#define ZLIB_DLL 1
+#define _WINDOWS 1*/
- Prev by Date: [ethereal-dev] win32/gmodule changes
- Next by Date: [ethereal-dev] Live Capture Scrolling?
- Previous by thread: [ethereal-dev] win32/gmodule changes
- Next by thread: [ethereal-dev] Live Capture Scrolling?
- Index(es):





