summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2009-04-16 03:38:23 +0000
committerGerald Combs <gerald@wireshark.org>2009-04-16 03:38:23 +0000
commit17f0d877faff64832b2a93f24d21b873fe59919e (patch)
tree253e33214029012feff56f1b85d83121fef627cf
parent605ef095f929bf68880009342d530112bde91cc6 (diff)
downloadwireshark-17f0d877faff64832b2a93f24d21b873fe59919e.tar.gz
Fix Win64 compilation problems in the plugins directory.
svn path=/trunk/; revision=28064
-rw-r--r--plugins/asn1/asn1.c2
-rw-r--r--plugins/ethercat/packet-ecatmb.c2
-rw-r--r--plugins/ethercat/packet-ecatmb.h14
-rw-r--r--plugins/irda/packet-sir.c2
-rw-r--r--plugins/mate/Makefile.nmake5
-rw-r--r--plugins/mate/mate_util.c4
-rw-r--r--plugins/unistim/packet-unistim.c4
-rw-r--r--plugins/wimaxasncp/Makefile.nmake8
8 files changed, 25 insertions, 16 deletions
diff --git a/plugins/asn1/asn1.c b/plugins/asn1/asn1.c
index 3c711f7ef8..fe5b6c3f1c 100644
--- a/plugins/asn1/asn1.c
+++ b/plugins/asn1/asn1.c
@@ -705,7 +705,7 @@ asn1_bits_decode ( ASN1_SCK *asn1, int enc_len, guchar **bits,
return ret;
}
}
- *len = ptr - *bits;
+ *len = (guint) (ptr - *bits);
return ASN1_ERR_NOERROR;
}
diff --git a/plugins/ethercat/packet-ecatmb.c b/plugins/ethercat/packet-ecatmb.c
index 3623838afc..7c87c28840 100644
--- a/plugins/ethercat/packet-ecatmb.c
+++ b/plugins/ethercat/packet-ecatmb.c
@@ -1312,7 +1312,7 @@ static void dissect_ecat_mailbox(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
char szText[200];
int nMax = sizeof(szText)-1;
- guint mailbox_length = tvb_reported_length(tvb);
+ gint mailbox_length = tvb_reported_length(tvb);
if( mailbox_length >= ETHERCAT_MBOX_HEADER_LEN )
{
diff --git a/plugins/ethercat/packet-ecatmb.h b/plugins/ethercat/packet-ecatmb.h
index eec89fc5f5..2d09a36154 100644
--- a/plugins/ethercat/packet-ecatmb.h
+++ b/plugins/ethercat/packet-ecatmb.h
@@ -31,7 +31,7 @@ typedef struct TETHERNET_ADDRESS
{
guint8 b[6];
} ETHERNET_ADDRESS, *PETHERNET_ADDRESS;
-#define ETHERNET_ADDRESS_LEN sizeof(ETHERNET_ADDRESS)
+#define ETHERNET_ADDRESS_LEN ((int) sizeof(ETHERNET_ADDRESS))
/* Mailbox*/
#define ETHERCAT_MBOX_TYPE_ADS 1 /* AMS/ADS header follows*/
@@ -60,7 +60,7 @@ typedef struct TETHERCAT_MBOX_HEADER
MbxHeaderControlUnion aControlUnion;
} ETHERCAT_MBOX_HEADER, *PETHERCAT_MBOX_HEADER;
-#define ETHERCAT_MBOX_HEADER_LEN sizeof(ETHERCAT_MBOX_HEADER)
+#define ETHERCAT_MBOX_HEADER_LEN ((int) sizeof(ETHERCAT_MBOX_HEADER))
/*/////////////////////////////////////////////////////////////////////////////*/
/* EoE*/
@@ -118,13 +118,13 @@ typedef struct TETHERCAT_EOE_MACFILTER
ETHERNET_ADDRESS MacFilter[16];
ETHERNET_ADDRESS MacFilterMask[4];
} ETHERCAT_EOE_MACFILTER;
-#define ETHERCAT_EOE_MACFILTER_LEN sizeof(ETHERCAT_EOE_MACFILTER)
+#define ETHERCAT_EOE_MACFILTER_LEN ((int) sizeof(ETHERCAT_EOE_MACFILTER))
typedef struct TETHERCAT_EOE_TIMESTAMP
{
guint32 TimeStamp; /* 32 bit time stamp */
} ETHERCAT_EOE_TIMESTAMP;
-#define ETHERCAT_EOE_TIMESTAMP_LEN sizeof(ETHERCAT_EOE_TIMESTAMP)
+#define ETHERCAT_EOE_TIMESTAMP_LEN ((int) sizeof(ETHERCAT_EOE_TIMESTAMP))
typedef union tEoeHeaderDataUnion
{
@@ -157,7 +157,7 @@ typedef struct TETHERCAT_EOE_HEADER
EoeHeaderInfoUnion anEoeHeaderInfoUnion;
EoeHeaderDataUnion anEoeHeaderDataUnion;
} ETHERCAT_EOE_HEADER, *PETHERCAT_EOE_HEADER;
-#define ETHERCAT_EOE_HEADER_LEN sizeof(ETHERCAT_EOE_HEADER)
+#define ETHERCAT_EOE_HEADER_LEN ((int) sizeof(ETHERCAT_EOE_HEADER))
/*/////////////////////////////////////////////////////////////////////////////*/
/* CANopen*/
@@ -180,7 +180,7 @@ typedef union TETHERCAT_COE_HEADER
} v;
guint16 header;
} ETHERCAT_COE_HEADER, *PETHERCAT_COE_HEADER;
-#define ETHERCAT_COE_HEADER_LEN sizeof(ETHERCAT_COE_HEADER)
+#define ETHERCAT_COE_HEADER_LEN ((int) sizeof(ETHERCAT_COE_HEADER))
typedef union tSdoHeaderUnion
@@ -475,7 +475,7 @@ typedef struct TETHERCAT_SOE_HEADER
guint16 ErrorCode if (Error==1)
} MailBoxDataUnion;*/
} ETHERCAT_SOE_HEADER, *PETHERCAT_SOE_HEADER;
-#define ETHERCAT_SOE_HEADER_LEN sizeof(ETHERCAT_SOE_HEADER)
+#define ETHERCAT_SOE_HEADER_LEN ((int) sizeof(ETHERCAT_SOE_HEADER))
extern void init_mbx_header(PETHERCAT_MBOX_HEADER pMbox, tvbuff_t *tvb, gint offset);
diff --git a/plugins/irda/packet-sir.c b/plugins/irda/packet-sir.c
index 3be593f426..18a6a9d43b 100644
--- a/plugins/irda/packet-sir.c
+++ b/plugins/irda/packet-sir.c
@@ -85,7 +85,7 @@ unescape_data(tvbuff_t *tvb, packet_info *pinfo)
*dst++ = c;
}
- next_tvb = tvb_new_real_data(data, dst-data, dst-data);
+ next_tvb = tvb_new_real_data(data, (guint) (dst-data), (guint) (dst-data));
tvb_set_free_cb(next_tvb, g_free);
tvb_set_child_real_data_tvbuff(tvb, next_tvb);
add_new_data_source(pinfo, next_tvb, "Unescaped SIR");
diff --git a/plugins/mate/Makefile.nmake b/plugins/mate/Makefile.nmake
index 22e5902f24..bf33acc2d9 100644
--- a/plugins/mate/Makefile.nmake
+++ b/plugins/mate/Makefile.nmake
@@ -13,8 +13,10 @@ include Makefile.common
LEMON=..\..\tools\lemon
-CFLAGS=/WX /DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) /I$(LEMON)\
+# We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output
+GENERATED_CFLAGS=/DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) /I$(LEMON)\
/I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+CFLAGS=/WX $(GENERATED_CFLAGS)
.c.obj::
$(CC) $(CFLAGS) -Fd.\ -c $<
@@ -117,6 +119,7 @@ RUNLEX = ..\..\tools\runlex.sh
mate_parser_lex.h : mate_parser.c
mate_parser.obj : mate_parser.c
+ $(CC) $(CVARSDLL) $(GENERATED_CFLAGS) -Fd.\ -c $?
mate_grammar.h : mate_grammar.c
mate_grammar.c : mate_grammar.lemon $(LEMON)\lemon.exe
diff --git a/plugins/mate/mate_util.c b/plugins/mate/mate_util.c
index ade8fb2285..3a6ce69878 100644
--- a/plugins/mate/mate_util.c
+++ b/plugins/mate/mate_util.c
@@ -986,8 +986,8 @@ extern AVP* match_avp(AVP* src, AVP* op) {
}
case AVP_OP_ENDS:
/* does this work? */
- ls = strlen(src->v);
- lo = strlen(op->v);
+ ls = (guint) strlen(src->v);
+ lo = (guint) strlen(op->v);
if ( ls < lo ) {
return NULL;
diff --git a/plugins/unistim/packet-unistim.c b/plugins/unistim/packet-unistim.c
index f2ecffb9c4..86460e18a1 100644
--- a/plugins/unistim/packet-unistim.c
+++ b/plugins/unistim/packet-unistim.c
@@ -2604,7 +2604,7 @@ dissect_audio_phone(proto_tree *msg_tree,
static void
set_ascii_item(proto_tree *msg_tree,tvbuff_t *tvb, gint offset,guint msg_len){
char *buffer=NULL;
- guint16 buffer_index=0;
+ gsize buffer_index=0;
guint16 msg_index=0;
guint8 character;
char *label="DATA: ";
@@ -2637,7 +2637,7 @@ set_ascii_item(proto_tree *msg_tree,tvbuff_t *tvb, gint offset,guint msg_len){
static void
set_ascii_null_term_item(proto_tree *msg_tree,tvbuff_t *tvb, gint offset,guint msg_len,char *label){
char *buffer=NULL;
- guint16 buffer_index=0;
+ gsize buffer_index=0;
guint16 msg_index=0;
guint8 character;
#define MAX_BUFFER 1024
diff --git a/plugins/wimaxasncp/Makefile.nmake b/plugins/wimaxasncp/Makefile.nmake
index dc3f07e5f6..4d3fcf97b9 100644
--- a/plugins/wimaxasncp/Makefile.nmake
+++ b/plugins/wimaxasncp/Makefile.nmake
@@ -10,8 +10,13 @@ include ..\..\Makefile.nmake.inc
include Makefile.common
-CFLAGS=/WX /DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) \
+# We use GENERATED_CFLAGS to get around flex's non-LLP64-compliant output
+GENERATED_CFLAGS=/DHAVE_CONFIG_H /I../.. $(GLIB_CFLAGS) \
/I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+CFLAGS=/WX $(GENERATED_CFLAGS)
+
+
+
.c.obj::
$(CC) $(CFLAGS) -Fd.\ -c $<
@@ -96,6 +101,7 @@ RUNLEX = ..\..\tools\runlex.sh
wimaxasncp_dict_lex.h : wimaxasncp_dict.c
wimaxasncp_dict.obj : wimaxasncp_dict.c
+ $(CC) $(CVARSDLL) $(GENERATED_CFLAGS) -Fd.\ -c $?
clean:
rm -f $(OBJECTS) $(RESOURCE) plugin.c *.pdb \