Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libvmaf: don't set _XOPEN_SOURCE #1390

Merged
merged 1 commit into from
Oct 10, 2024
Merged

Commits on Oct 10, 2024

  1. libvmaf: don't set _XOPEN_SOURCE

    This used to set _POSIX_C_SOURCE.  I tried to remove it, because it
    caused some functions to be unavailable on BSD, but this broke
    Windows, so I settled for setting _XOPEN_SOURCE=600, which exposed the
    necessary functions on BSDs.
    
    This no longer works.  libvmaf now uses the non-standard strsep()
    function, and FreeBSD only exposes non-standard functions if no
    standards macros are defined — they're purely subtractive.  So if
    setting _POSIX_C_SOURCE or _XOPEN_SOURCE isn't the right thing to do,
    what is?  The build error for Windows is due to a missing M_PI
    macro.  mingw provides this macro if any of the standards macros
    defined, or _BSD_SOURCE, _GNU_SOURCE, or _USE_MATH_DEFINES.  Since we
    already set _GNU_SOURCE for Linux, using that for mingw as well is
    probably the best thing to do.  That way, we don't have to set a macro
    thta causes FreeBSD to restrict which functions are available.
    alyssais committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    752e217 View commit details
    Browse the repository at this point in the history