int32 not typedef'ed when _WINSOCK2API_ #define'd.

VERIFIED FIXED

Status

()

P3
minor
VERIFIED FIXED
19 years ago
17 years ago

People

(Reporter: jason, Assigned: rogerl)

Tracking

Trunk
x86
Windows NT
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

19 years ago
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
BuildID:    

#include'ing winsock2.h before jsapi.h causes the typdef of int32 in jsotypes.h 
(line 101) to be #ifdef'ed out. According to the comment, it's implying that 
winsock2.h is defining its own int32 but searching winsock2.h shows that there 
is no definition of int32.


Reproducible: Always


Steps to Reproduce:

1. Create a file with the following "code":
#include <winsock2.h>
#define XP_PC
#include "jsapi.h"
2. Compile.


Actual Results:  

Compiling...
Test.cpp
c:\code\spidermonkey\src\jspubtd.h(47) : error C2146: syntax error : 
missing ';' before identifier 'jsint'
c:\code\spidermonkey\src\jspubtd.h(47) : fatal error C1004: unexpected end of 
file found
Error executing cl.exe.


Expected Results:  

Compiling...
Test.cpp

Test.obj - 0 error(s), 0 warning(s)


Using Visual C++ 6.0 with Visual Studio SP3 installed.

The workaround is to #include jsapi.h before winsock2.h or do a typedef long 
int32; before #include'ing jsapi.h.
(Assignee)

Comment 1

19 years ago
The winsock2 case doesn't seem all that relevant - it dates from before Mozilla 
and the current winsock2 header files don't have an issue any more, I'll remove 
it.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
(Assignee)

Comment 2

18 years ago
Created attachment 11064 [details] [diff] [review]
remove winsock reference
(Assignee)

Comment 3

18 years ago
Fix checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 4

18 years ago
Verified -
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.