Ethereal-dev: [Ethereal-dev] patches for MSVC build process
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
From: Lars Roland <lars.roland@xxxxxxx>
Date: Wed, 25 Aug 2004 04:41:43 +0200
Hello all, these patches make ethereal compile again with MSVC 6. - strtoull() replaced with corresponding glib function g_ascii_strtoull() - added tvb_get_ntoh64() to plugin api - cosmetic fix for nsis installerI still get a warning in ftype-integer.c in line 324: Conversion of "__int64" into "int". Possible loss of data.
I assume MSVC6 doesn't know, how to do a "bitwise and" with 64-bit integers.The nsis installer can show a readme file, but there is a limitation. It is necessary to use a standard file extension, e.g. ".txt". "README.win32" won't work. I didn't activate this feature, but I fixed the comment. However I do not think "README.win32" is a good readme file for a normal user. It is mainly about setting up an development environment on Windows. Any suggestions?
Regards, Lars
Index: ethereal-new/packaging/nsis/ethereal.nsi =================================================================== --- ethereal-new/packaging/nsis/ethereal.nsi (revision 11821) +++ ethereal-new/packaging/nsis/ethereal.nsi (working copy) @@ -60,13 +60,19 @@ !define MUI_UNICON "..\..\image\ethereal.ico" !define MUI_COMPONENTSPAGE_SMALLDESC +!define MUI_FINISHPAGE_NOAUTOCLOSE +!define MUI_UNFINISHPAGE_NOAUTOCLOSE !define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of Ethereal.\r\n\r\nBefore starting the installation, make sure Ethereal is not running.\r\n\r\nClick 'Next' to continue." !define MUI_FINISHPAGE_LINK "Install WinPcap to be able to capture packets from a network!" !define MUI_FINISHPAGE_LINK_LOCATION "http://winpcap.polito.it" -; show readme doesn't seem to work even with NSIS 2.0rc3 -;!define MUI_FINISHPAGE_SHOWREADME "..\..\README.win32" -;!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED +; NSIS shows Readme files by opening the Readme file with the default application for +; the file's extension. "README.win32" won't work in most cases, because extension "win32" +; is usually not associated with an appropriate text editor. We should use extension "txt" +; for a text file or "html" for an html README file. +;!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\help\overview.txt" +;!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED + ; ============================================================================ ; MUI Pages ; ============================================================================
Index: ethereal-new/plugins/plugin_api_list.c =================================================================== --- ethereal-new/plugins/plugin_api_list.c (revision 11821) +++ ethereal-new/plugins/plugin_api_list.c (working copy) @@ -480,3 +480,4 @@ proto_tree *tree, int offset, int result_id, int prog_id, int vers_id, int proc_id); guint16 crc16_ccitt_tvb(tvbuff_t *tvb, unsigned int len); +guint64 tvb_get_ntoh64(tvbuff_t *tvb, gint offset); Index: ethereal-new/plugins/Xplugin_api_decls.h =================================================================== --- ethereal-new/plugins/Xplugin_api_decls.h (revision 11821) +++ ethereal-new/plugins/Xplugin_api_decls.h (working copy) @@ -1,4 +1,4 @@ -/* This file is generated by ./plugin_gen.py, do not edit. */ +/* This file is generated by plugin_gen.py, do not edit. */ addr_check_col p_check_col; addr_col_clear p_col_clear; @@ -292,3 +292,4 @@ addr_dissect_rpc_indir_call p_dissect_rpc_indir_call; addr_dissect_rpc_indir_reply p_dissect_rpc_indir_reply; addr_crc16_ccitt_tvb p_crc16_ccitt_tvb; +addr_tvb_get_ntoh64 p_tvb_get_ntoh64; Index: ethereal-new/plugins/Xplugin_table.h =================================================================== --- ethereal-new/plugins/Xplugin_table.h (revision 11821) +++ ethereal-new/plugins/Xplugin_table.h (working copy) @@ -1,4 +1,4 @@ -/* This file is generated by ./plugin_gen.py, do not edit. */ +/* This file is generated by plugin_gen.py, do not edit. */ typedef gint (*addr_check_col) (column_info *, gint); typedef void (*addr_col_clear) (column_info *, gint); @@ -292,3 +292,4 @@ typedef int (*addr_dissect_rpc_indir_call) (tvbuff_t *, packet_info *, proto_tree *, int, int, guint32, guint32, guint32); typedef int (*addr_dissect_rpc_indir_reply) (tvbuff_t *, packet_info *, proto_tree *, int, int, int, int, int); typedef guint16 (*addr_crc16_ccitt_tvb) (tvbuff_t *, unsigned int); +typedef guint64 (*addr_tvb_get_ntoh64) (tvbuff_t *, gint); Index: ethereal-new/plugins/Xass-list =================================================================== --- ethereal-new/plugins/Xass-list (revision 11821) +++ ethereal-new/plugins/Xass-list (working copy) @@ -1,4 +1,4 @@ -/* This file is generated by ./plugin_gen.py, do not edit. */ +/* This file is generated by plugin_gen.py, do not edit. */ check_col, col_clear, col_add_fstr, col_append_fstr, col_prepend_fstr, col_add_str, col_append_str, col_set_str, register_init_routine, @@ -86,4 +86,4 @@ dissect_rpc_opaque_data, dissect_rpc_data, dissect_rpc_bytes, dissect_rpc_list, dissect_rpc_array, dissect_rpc_uint32, dissect_rpc_uint64, dissect_rpc_indir_call, dissect_rpc_indir_reply, crc16_ccitt_tvb, - +tvb_get_ntoh64, Index: ethereal-new/plugins/Xplugin_api.c =================================================================== --- ethereal-new/plugins/Xplugin_api.c (revision 11821) +++ ethereal-new/plugins/Xplugin_api.c (working copy) @@ -1,4 +1,4 @@ -/* This file is generated by ./plugin_gen.py, do not edit. */ +/* This file is generated by plugin_gen.py, do not edit. */ p_check_col = pat->p_check_col; p_col_clear = pat->p_col_clear; @@ -292,3 +292,4 @@ p_dissect_rpc_indir_call = pat->p_dissect_rpc_indir_call; p_dissect_rpc_indir_reply = pat->p_dissect_rpc_indir_reply; p_crc16_ccitt_tvb = pat->p_crc16_ccitt_tvb; +p_tvb_get_ntoh64 = pat->p_tvb_get_ntoh64; Index: ethereal-new/plugins/Xplugin_api.h =================================================================== --- ethereal-new/plugins/Xplugin_api.h (revision 11821) +++ ethereal-new/plugins/Xplugin_api.h (working copy) @@ -1,4 +1,4 @@ -/* This file is generated by ./plugin_gen.py, do not edit. */ +/* This file is generated by plugin_gen.py, do not edit. */ #define check_col (*p_check_col) #define col_clear (*p_col_clear) @@ -292,3 +292,4 @@ #define dissect_rpc_indir_call (*p_dissect_rpc_indir_call) #define dissect_rpc_indir_reply (*p_dissect_rpc_indir_reply) #define crc16_ccitt_tvb (*p_crc16_ccitt_tvb) +#define tvb_get_ntoh64 (*p_tvb_get_ntoh64) Index: ethereal-new/epan/libethereal.def =================================================================== --- ethereal-new/epan/libethereal.def (revision 11821) +++ ethereal-new/epan/libethereal.def (working copy) @@ -472,6 +472,7 @@ tvb_get_nstringz tvb_get_nstringz0 tvb_get_ntoh24 +tvb_get_ntoh64 tvb_get_ntohl tvb_get_ntohs tvb_get_ptr
Index: ethereal-new/epan/ftypes/ftype-integer.c =================================================================== --- ethereal-new/epan/ftypes/ftype-integer.c (revision 11821) +++ ethereal-new/epan/ftypes/ftype-integer.c (working copy) @@ -220,7 +220,7 @@ char *endptr; errno = 0; - value = strtoull(s, &endptr, 0); + value = g_ascii_strtoull(s, &endptr, 0); if (errno == EINVAL || endptr == s || *endptr != '\0') { /* This isn't a valid number. */ Index: ethereal-new/config.h.win32 =================================================================== --- ethereal-new/config.h.win32 (revision 11821) +++ ethereal-new/config.h.win32 (working copy) @@ -157,9 +157,6 @@ #endif /* _MSC_EXTENSIONS */ #endif /* PRIx64 */ -/* Define as a function that behaves like strtoull */ -#define strtoull _strtoui64 - /* Define if you have the z library (-lz). */ @HAVE_LIBZ@
- Follow-Ups:
- Re: [Ethereal-dev] patches for MSVC build process
- From: Guy Harris
- Re: [Ethereal-dev] patches for MSVC build process
- Prev by Date: Re: [Ethereal-dev] MSVC problem
- Next by Date: Re: [Ethereal-dev] patches for MSVC build process
- Previous by thread: Re: [Ethereal-dev] Access violation in v0.10.6 (reproducible in decode_as_dlg.c)
- Next by thread: Re: [Ethereal-dev] patches for MSVC build process
- Index(es):