Bug 34614 - [Qt] npapi header leaves XP_WIN flag defined even when __SYMBIAN32__ flag is found
Summary: [Qt] npapi header leaves XP_WIN flag defined even when __SYMBIAN32__ flag is ...
Status: CLOSED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: S60 Emulator S60 3rd edition
: P2 Normal
Assignee: Abhinav Mithal
URL:
Keywords: Qt
: 39708 (view as bug list)
Depends on:
Blocks: 35784
  Show dependency treegraph
 
Reported: 2010-02-04 13:27 PST by Abhinav Mithal
Modified: 2010-06-16 08:55 PDT (History)
5 users (show)

See Also:


Attachments
This patch checks for Symbian flag definition before defining XP_WIN flag and takes care of the issue. (1.33 KB, patch)
2010-04-06 07:55 PDT, Abhinav Mithal
no flags Details | Formatted Diff | Diff
This is a new patch which has been tested for both winscw and armv5 (1.03 KB, patch)
2010-04-06 11:28 PDT, Abhinav Mithal
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Abhinav Mithal 2010-02-04 13:27:09 PST
When MinGW compiler is used to compile Netscape Plugins on Windows XP with Qt, npapi.h tries to include windows.h. This is because in npapi.h ifdef clause for __SYMBIAN32__ does not undefine XP_WIN and npapi.h eventually ends up trying to include windows.h eventhough user is building for Symbian.

This problem is reproducible with nightly build -r54342


Here is the error seen while trying to compile a sample Netscape Plug-in:
make -s  -r -f "\EPOC32\BUILD\cwrt\plugins\s60\SampleNPQtPlugin\SAMPLENPQTPLUGIN_0XE0AE5E3D\WINSCW\SAMPLENPQTPLUGIN_0XE0AE5E3D.WINSCW" UDEB
samplenpqtplugin.cpp
npapi.h:116: the file 'windows.h' cannot be opened

Proposed Solution:

add #undef XP_WIN after #define XP_SYMBIAN 1 in the ifdef clause for __SYMBIAN32__
Comment 1 Laszlo Gombos 2010-04-05 16:36:17 PDT
Abhinav, any update on this ?
Comment 2 Abhinav Mithal 2010-04-06 07:55:36 PDT
Created attachment 52639 [details]
This patch checks for Symbian flag definition before defining XP_WIN flag and takes care of the issue.
Comment 3 Abhinav Mithal 2010-04-06 11:28:26 PDT
Created attachment 52653 [details]
This is a new patch which has been tested for both winscw and armv5
Comment 4 Laszlo Gombos 2010-04-06 11:42:21 PDT
Comment on attachment 52653 [details]
This is a new patch which has been tested for both winscw and armv5

lgtm, thanks. This seems to be a regression after r49987.
Comment 5 WebKit Commit Bot 2010-04-06 15:32:48 PDT
Comment on attachment 52653 [details]
This is a new patch which has been tested for both winscw and armv5

Clearing flags on attachment: 52653

Committed r57170: <http://trac.webkit.org/changeset/57170>
Comment 6 WebKit Commit Bot 2010-04-06 15:32:53 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Simon Hausmann 2010-04-07 00:32:38 PDT
Revision r57170 cherry-picked into qtwebkit-2.0 with commit b246edd8056941a91f1ceec2fcd45850d647ef34
Comment 8 Simon Hausmann 2010-06-16 06:33:47 PDT
*** Bug 39708 has been marked as a duplicate of this bug. ***
Comment 9 Simon Hausmann 2010-06-16 08:55:44 PDT
Revision r57170 cherry-picked into qtwebkit-4.6 with aa3f786bdba4dc153620ae7f98e4b0e41770d1d1