Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Vorbis Vorbis
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Xiph.Org
  • VorbisVorbis
  • Merge requests
  • !19

Set _USE_MATH_DEFINES for MSVC builds.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Ralph Giles requested to merge math_defines into master May 09, 2021
  • Overview 5
  • Commits 1
  • Pipelines 1
  • Changes 2

Add this define to lib/os.h and test/util.c so M_PI is available when building with Microsoft's math.h. On other systems, it's typically enabled by default, e.g. through __USE_XOPEN or __USE_GNU.

We already had a fallback definition of M_PI in os.h which was used by the core library, but not included in the test harness, which failed to compile under CMake and MSVC.

Using the system define should be more consistent.

Based on a patch by Ozkan Sezer.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: math_defines