Closed Bug 1590972 Opened 5 years ago Closed 5 years ago

Use -std=c99 rather than -std=gnu99

Categories

(NSS :: Libraries, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mt, Assigned: mt)

Details

Attachments

(1 file)

This introduces fewer weird definitions into the build.

However, this also requires that we define _DEFAULT_SOURCE because we rely on many functions that are enabled by that.

After investigating this more (thanks to glandium too), I'll have to add _BSD_SOURCE to cover back to glibc 2.12.

  • the conversions from <endian.h>, which are used by HACL*, htole64, be64toh, le32toh, and htole32.
  • realpath is used in one place
  • strdup appears in a few places

The interesting one is getentropy, which is only conditioned on _DEFAULT_SOURCE. As we already test the GLIBC version in that code, we're OK.

gcc 4.4 turned up an interesting problem that I need to look into:

In file included from rijndael.c:16:
rijndael.h:71: warning: declaration does not declare anything
rijndael.c: In function ‘rijndael_key_expansion7’:
rijndael.c:333: error: ‘AESContext’ has no member named ‘expandedKey’

I think that the best plan there is to name the struct.

Attachment #9103842 - Attachment description: Bug 1590972 - Use -std=c99 and _DEFAULT_SOURCE for building, r?jcj → Bug 1590972 - Use -std=c99 for all C code, r?jcj
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.48
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: