Closed Bug 374029 Opened 17 years ago Closed 17 years ago

Fix for bug 363997 breaks Mingwbuild

Categories

(Firefox Build System :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 363997

People

(Reporter: bengt.erik.soderstrom, Unassigned)

References

Details

Attachments

(1 obsolete file)

Unfortunately the fix for bug 363997 breaks Mingw builds:

95sock.o -c      -pipe -O   -UDEBUG -UWINNT  -DMOZILLA_CLIENT=1 -DNDEBUG=1 -DXP_
PC=1 -DWIN32=1 -DWIN95=1 -D_PR_GLOBAL_THREADS_ONLY=1 -D_X86_=1 -DHAVE_STRERROR=1
  -DFORCE_PR_LOG -D_NSPR_BUILD_ -Id:/mozilla/mozilla/object-mingw/dist/include/n
spr -I/cygdrive/d/mozilla/mozilla/nsprpub/pr/include -I/cygdrive/d/mozilla/mozil
la/nsprpub/pr/include/private  /cygdrive/d/mozilla/mozilla/nsprpub/pr/src/md/win
dows/w95sock.c
d:/mozilla/mozilla/nsprpub/pr/src/md/windows/w95sock.c:86: error: conflicting ty
pes for 'OVERLAPPED'
d:/mozilla/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winbase.h:734:
 error: previous declaration of 'OVERLAPPED' was here
d:/mozilla/mozilla/nsprpub/pr/src/md/windows/w95sock.c:86: error: conflicting ty
pes for 'LPWSAOVERLAPPED'
d:/mozilla/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winsock2.h:704
: error: previous declaration of 'LPWSAOVERLAPPED' was here
d:/mozilla/mozilla/nsprpub/pr/src/md/windows/w95sock.c:93: error: conflicting ty
pes for 'LPWSAOVERLAPPED_COMPLETION_ROUTINE'
d:/mozilla/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winsock2.h:103
5: error: previous declaration of 'LPWSAOVERLAPPED_COMPLETION_ROUTINE' was here
d:/mozilla/mozilla/nsprpub/pr/src/md/windows/w95sock.c: In function `_PR_MD_SOCK
ET':
d:/mozilla/mozilla/nsprpub/pr/src/md/windows/w95sock.c:185: warning: passing arg
 7 of pointer to function from incompatible pointer type
d:/mozilla/mozilla/nsprpub/pr/src/md/windows/w95sock.c: In function `_MD_SocketA
vailable':
d:/mozilla/mozilla/nsprpub/pr/src/md/windows/w95sock.c:217: warning: passing arg
 3 of `ioctlsocket' from incompatible pointer type
make[7]: *** [w95sock.o] Error 1
make[7]: Leaving directory `/cygdrive/d/mozilla/mozilla/object-mingw/nsprpub/pr/
src/md/windows'
make[6]: *** [export] Error 2
make[6]: Leaving directory `/cygdrive/d/mozilla/mozilla/object-mingw/nsprpub/pr/
src/md'
make[5]: *** [export] Error 2
make[5]: Leaving directory `/cygdrive/d/mozilla/mozilla/object-mingw/nsprpub/pr/
src'
make[4]: *** [export] Error 2
make[4]: Leaving directory `/cygdrive/d/mozilla/mozilla/object-mingw/nsprpub/pr'
make[3]: *** [export] Error 2
make[3]: Leaving directory `/cygdrive/d/mozilla/mozilla/object-mingw/nsprpub'
make[2]: *** [tier_nspr] Error 2
Blocks: 363997
Blocks: mingw
Attached patch patch (obsolete) — Splinter Review
With this I'm able to build again. I have no idea if this is the correct solution.
Attachment #258669 - Flags: review?(wtchang)
I think the patch is OK. It excludes, in case we are using Mingw, variables already defined in the Mingw includes: winbase.h and winsock2.h . It works for me.
Thanks for a quick and dirty solution, Martijn.

Now we look forward to a quick review and check-in!
Attachment #258669 - Flags: review?(nelsonbhchan) → review?(nelson)
Martijn, thanks for coming up with a fix.  My apologies for breaking the mingw build.

it looks reasonable, and we already use __MINGW32__ in NSPR (http://lxr.mozilla.org/nspr/search?string=__MINGW32__) so that's a good sign.

Wan-Teh may not available to review for a couple weeks, but perhaps Nelson Bolyard (a frequent reviewer of Wan-Teh's patches over the past year) can take a look?
Let's attach the patches for this bug to bug 363997 so
that it will be easier to backport all necessary patches
for bug 363997 to the NSPR_4_6_BRANCH.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
> Let's attach the patches for this bug to bug 363997 so
> that it will be easier to backport all necessary patches
> for bug 363997 to the NSPR_4_6_BRANCH.

I've moved Martijn's patch to that bug, and request review from Wan-Teh.

Attachment #258669 - Flags: review?(nelson)
Attachment #258669 - Attachment is obsolete: true
Attachment #258669 - Flags: review?(wtc)
Component: Build Config → General
Product: Firefox → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: