Closed Bug 1130787 Opened 9 years ago Closed 9 years ago

prtime.h does not compile with MSVC's /Za (ISO C/C++ conformance) option

Categories

(NSPR :: NSPR, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
4.10.9

People

(Reporter: briansmith, Assigned: briansmith)

Details

Attachments

(2 files)

When compiling a C++ program that includes prtime.h with MSVC's /Za option, the build fails with these errors/warnings:

Nonstandard extension used: formal parameter 'tm' was previously defined as a type.

The /Za option is described here: https://msdn.microsoft.com/en-us/library/0k0w269d.aspx
Note that this patch is not enough to allow NSPR itself to be compiled with /Za. It simply enables programs that include prtime.h (perhaps indirectly through NSS's header files) to compile with /Za.
Attachment #8560931 - Flags: review?(wtc)
Target Milestone: --- → 4.10.9
Attachment #8560931 - Flags: review?(wtc) → review?(ted)
Comment on attachment 8560931 [details] [diff] [review]
Enable prtime.h to be compiled with MSVC's /Za option

Review of attachment 8560931 [details] [diff] [review]:
-----------------------------------------------------------------

Sorry for the review delay.
Attachment #8560931 - Flags: review?(ted) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Attachment #8596208 - Flags: review?(brian) → review+
Comment on attachment 8596208 [details] [diff] [review]
Fix indentation in prtime.h and rename the function parameter in prtime.c.

Patch checked in: https://hg.mozilla.org/projects/nspr/rev/5e45180adf13
Attachment #8596208 - Flags: checked-in+
Attachment #8596208 - Flags: superreview?(ted) → superreview+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: