Closed Bug 698592 Opened 15 years ago Closed 14 years ago

build failure because of undefined C++11 user-defined literals

Categories

(NSS :: Libraries, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED
3.13.2

People

(Reporter: octoploid, Assigned: octoploid)

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0a1) Gecko/20100101 Firefox/10.0a1 Build ID: 20111030133305 Steps to reproduce: gcc-4.7.0 recently (2011-10-26) implemented the new C++11 user-defined literals. It turns out that the nss source contains a few errors according to the new standard: error: inconsistent user-defined literal suffixes ‘fips’ and ‘SECMOD_SLOT_FLAGS’ in string literal error: unable to find user-defined string literal operator ‘operator"" fips’ This is because of the following lines in lib/softoken/secmodt.h: #define SECMOD_MAKE_NSS_FLAGS(fips,slot) \ "Flags=internal,critical"fips" slotparams=("#slot"={"SECMOD_SLOT_FLAGS"})" See https://bugzilla.mozilla.org/show_bug.cgi?id=698264 for a related issue.
Attached patch nss_c++0x.patch (obsolete) — — Splinter Review
This patch fixes the issue for me.
Assignee: nobody → cryptooctoploid
Comment on attachment 570850 [details] [diff] [review] nss_c++0x.patch Just tagging an arbitrary NSS reviewer here.
Attachment #570850 - Flags: review?(kaie)
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P1
Target Milestone: --- → 3.13.2
Comment on attachment 570850 [details] [diff] [review] nss_c++0x.patch Review of attachment 570850 [details] [diff] [review]: ----------------------------------------------------------------- ::: security/nss/lib/softoken/secmodt.h @@ +338,4 @@ > #define SECMOD_SLOT_FLAGS "slotFlags=[RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,Camellia,SEED,SHA256,SHA512]" > > #define SECMOD_MAKE_NSS_FLAGS(fips,slot) \ > +"Flags=internal,critical" fips" slotparams=("#slot"={" SECMOD_SLOT_FLAGS"})" Does the compiler interpret these as user-defined literals even when wrapped with SEC_BEGIN_PROTOS / SEC_END_PROTOS--i.e. extern "C" { }--as the patch in bug 699672 does? Use consistent whitespace. e.g. One space before and one space after |fips|, one space before and one space after |#slot|, and one space before and one space after SECMOD_SLOT_FLAGS.
Attachment #570850 - Flags: review-
Attachment #570850 - Attachment is obsolete: true
Attachment #570850 - Flags: review?(kaie)
(In reply to Brian Smith (:bsmith) from comment #3) > Comment on attachment 570850 [details] [diff] [review] [diff] [details] [review] > nss_c++0x.patch > > Review of attachment 570850 [details] [diff] [review] [diff] [details] [review]: > ----------------------------------------------------------------- > > ::: security/nss/lib/softoken/secmodt.h > @@ +338,4 @@ > > #define SECMOD_SLOT_FLAGS "slotFlags=[RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,Camellia,SEED,SHA256,SHA512]" > > > > #define SECMOD_MAKE_NSS_FLAGS(fips,slot) \ > > +"Flags=internal,critical" fips" slotparams=("#slot"={" SECMOD_SLOT_FLAGS"})" > > Does the compiler interpret these as user-defined literals even when wrapped > with SEC_BEGIN_PROTOS / SEC_END_PROTOS--i.e. extern "C" { }--as the patch in > bug 699672 does? Yes. > Use consistent whitespace. e.g. One space before and one space after |fips|, > one space before and one space after |#slot|, and one space before and one > space after SECMOD_SLOT_FLAGS. OK. I've updated the patch.
(In reply to Octoploid from comment #5) > OK. I've updated the patch. You should re-request review from Brian on the updated patch to make sure he is aware of it.
Attachment #573137 - Flags: review?(bsmith)
ping?
Adding whitespace for syntax clarification seems absolutely reasonable to me. r=kaie
Comment on attachment 573137 [details] [diff] [review] fix build failure because of undefined C++11 user-defined literals r=kaie
Attachment #573137 - Flags: review?(bsmith) → review+
Bob, please note, this change is in the restricted area "softoken". However, it's a whitespace-only syntax fix. I assume this is ok to check in.
Checking in secmodt.h; /cvsroot/mozilla/security/nss/lib/softoken/secmodt.h,v <-- secmodt.h new revision: 1.40; previous revision: 1.39 done
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: