The attached patch does the following cleanup, mostly related to Visual C++ predefined macros. 1. Do not define _M_AMD64, _M_IA64, and _WIN64 on the compiler command line because these are Visual C++ predefined macros. Note that we don't define _M_IX86 or _WIN32 on the compiler command line. 2. Remove obsolete code for Windows NT Alpha and MIPS. 3. Test the predefined macros (_M_FOO) in addition to the macros defined by <windows.h> (_FOO_). Note: _win95.cfg and _winnt.cfg are NSPR public headers (prcpucfg.h). They may be compiled by the resource compiler (rc.exe), which does not predefine the _M_FOO macros, so _win95.cfg and _winnt.cfg must also test the _FOO_ macros, which our build systems define on the resource compiler command line. On the other hand, _win95.h and _winnt.h are only used by NSPR internally. They are never compiled by the resource compiler. So _win95.h and _winnt.h only need to test the _M_FOO predefined macros. Should we do that to simplify the code?
I checked in the patch on the NSPR trunk (NSPR 4.8.4). Checking in configure; /cvsroot/mozilla/nsprpub/configure,v <-- configure new revision: 1.265; previous revision: 1.264 done Checking in configure.in; /cvsroot/mozilla/nsprpub/configure.in,v <-- configure.in new revision: 1.269; previous revision: 1.268 done Checking in pr/include/md/_win95.cfg; /cvsroot/mozilla/nsprpub/pr/include/md/_win95.cfg,v <-- _win95.cfg new revision: 3.10; previous revision: 3.9 done Checking in pr/include/md/_win95.h; /cvsroot/mozilla/nsprpub/pr/include/md/_win95.h,v <-- _win95.h new revision: 3.38; previous revision: 3.37 done Checking in pr/include/md/_winnt.cfg; /cvsroot/mozilla/nsprpub/pr/include/md/_winnt.cfg,v <-- _winnt.cfg new revision: 3.9; previous revision: 3.8 done Checking in pr/include/md/_winnt.h; /cvsroot/mozilla/nsprpub/pr/include/md/_winnt.h,v <-- _winnt.h new revision: 3.34; previous revision: 3.33 done
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 4.8.4
Comment on attachment 423161 [details] [diff] [review] Proposed patch Not that you need it now, but this looks fine. :)
Attachment #423161 - Flags: superreview?(ted.mielczarek) → superreview+
You need to log in before you can comment on or make changes to this bug.