Ethereal-dev: [Ethereal-dev] [Patch] packet-frame.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Gisle Vanem <giva@xxxxxxxxx>
Date: Tue, 24 Jan 2006 19:30:10 +0100
This file uses SEH which AFAIK is only available for MS Visual-C.
I build using MingW/gcc, so the attached patch is needed.

--gv
--- SVN-Latest\epan\dissectors\packet-frame.c	Tue Jan 24 18:35:03 2006
+++ epan\dissectors\packet-frame.c	Tue Jan 24 18:49:57 2006
@@ -268,8 +268,8 @@

    /* Portable Exception Handling to trap Ethereal specific exceptions like BoundsError exceptions */
	TRY {
-#ifdef _WIN32
-    /* WIN32 Structured Exception Handling (SEH) to trap hardware exceptions like memory access violations */
+#ifdef _MSC_VER
+    /* Visual-C Structured Exception Handling (SEH) to trap hardware exceptions like memory access violations */
    /* (a running debugger will be called before the except part below) */
    __try {
#endif
@@ -283,7 +283,7 @@
				    pinfo->fd->lnk_t);
			call_dissector(data_handle,tvb, pinfo, parent_tree);
		}
-#ifdef _WIN32
+#ifdef _MSC_VER
    } __except(TRUE /* handle all exceptions */) {
        switch(GetExceptionCode()) {
        case(STATUS_ACCESS_VIOLATION):