Solaris doesn't like _XOPEN_SOURCE being defined but with no value, at least
when being compiled in C99-mode.  So set it to 600 (XPG6); hopefully this
won't break any other systems.


git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39501 f5534014-38df-0310-8fa8-9805f1628bb7
This commit is contained in:
morriss 2011-10-21 01:03:48 +00:00
parent 4fce6e6d5c
commit dd7f71cd57
2 changed files with 12 additions and 12 deletions

View File

@ -88,7 +88,7 @@
# define __USE_XOPEN
#endif
#ifndef _XOPEN_SOURCE
# define _XOPEN_SOURCE
# define _XOPEN_SOURCE 600
#endif
/*
@ -435,7 +435,7 @@ write_current_packet (void)
/* Write UDP header */
if (hdr_udp) {
vec_t cksum_vector[3];
HDR_UDP.source_port = g_htons(hdr_src_port);
HDR_UDP.dest_port = g_htons(hdr_dest_port);
HDR_UDP.length = g_htons(proto_length);
@ -453,7 +453,7 @@ write_current_packet (void)
/* Write TCP header */
if (hdr_tcp) {
vec_t cksum_vector[3];
HDR_TCP.source_port = g_htons(hdr_src_port);
HDR_TCP.dest_port = g_htons(hdr_dest_port);
/* HDR_TCP.seq_num already correct */
@ -518,7 +518,7 @@ write_current_packet (void)
/* Write the packet */
struct wtap_pkthdr pkthdr;
int err;
pkthdr.ts.secs = (guint32)ts_sec;
pkthdr.ts.nsecs = ts_usec * 1000;
if (ts_fmt == NULL) { ts_usec++; } /* fake packet counter */
@ -865,7 +865,7 @@ text_import_setup(text_import_info_t *info)
fprintf(stderr, "FATAL ERROR: no memory for packet buffer");
exit(-1);
}
/* Lets start from the beginning */
state = INIT;
curr_offset = 0;

View File

@ -90,7 +90,7 @@
# define __USE_XOPEN
#endif
#ifndef _XOPEN_SOURCE
# define _XOPEN_SOURCE
# define _XOPEN_SOURCE 600
#endif
/*
@ -275,7 +275,7 @@ typedef struct {
guint32 dest_addr;
} hdr_ip_t;
static hdr_ip_t HDR_IP = {0x45, 0, 0, 0x3412, 0, 0, 0xff, 0, 0,
static hdr_ip_t HDR_IP = {0x45, 0, 0, 0x3412, 0, 0, 0xff, 0, 0,
#ifdef WORDS_BIGENDIAN
0x0a010101, 0x0a020202
#else
@ -944,7 +944,7 @@ parse_token (token_t token, char *str)
fprintf(stderr, "(%s, %s \"%s\") -> (",
state_str[state], token_str[token], str ? str : "");
}
/* First token must be treated as a timestamp if time strip format is
not empty */
if (state == INIT || state == START_OF_LINE) {
@ -1074,11 +1074,11 @@ parse_token (token_t token, char *str)
if (identify_ascii) {
/* Here a line of pkt bytes reading is finished
compare the ascii and hex to avoid such situation:
"61 62 20 ab ", when ab is ascii dump then it should
"61 62 20 ab ", when ab is ascii dump then it should
not be treat as byte */
rollback = 0;
/* s2 is the ASCII string, s1 is the HEX string, e.g, when
s2 = "ab ", s1 = "616220"
/* s2 is the ASCII string, s1 is the HEX string, e.g, when
s2 = "ab ", s1 = "616220"
we should find out the largest tail of s1 matches the head
of s2, it means the matched part in tail is the ASCII dump
of the head byte. These matched should be rollback */
@ -1104,7 +1104,7 @@ parse_token (token_t token, char *str)
}
/* If packet line start contains possible byte pattern, the line end
should contain the matched pattern if the user open the -a flag.
The packet will be possible invalid if the byte pattern cannot find
The packet will be possible invalid if the byte pattern cannot find
a matched one in the line of packet buffer.*/
if (rollback > 0) {
if (strncmp(pkt_lnstart+line_size-rollback, s2, rollback) == 0) {