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

Configure feature test macros in meson #2812

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions app/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,19 @@ if host_machine.system() == 'windows'
'src/sys/win/file.c',
'src/sys/win/process.c',
]
add_project_arguments('-D_WIN32_WINNT=0x0600', language: 'c')
add_project_arguments('-DWINVER=0x0600', language: 'c')
else
src += [
'src/sys/unix/file.c',
'src/sys/unix/process.c',
]
add_project_arguments('-D_POSIX_C_SOURCE=200809L', language: 'c')
add_project_arguments('-D_XOPEN_SOURCE=700', language: 'c')
add_project_arguments('-D_GNU_SOURCE', language: 'c')
if host_machine.system() == 'darwin'
add_project_arguments('-D_DARWIN_C_SOURCE', language: 'c')
endif
endif

v4l2_support = host_machine.system() == 'linux'
Expand Down
7 changes: 0 additions & 7 deletions app/src/compat.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
#ifndef COMPAT_H
#define COMPAT_H

#define _POSIX_C_SOURCE 200809L
#define _XOPEN_SOURCE 700
#define _GNU_SOURCE
#ifdef __APPLE__
# define _DARWIN_C_SOURCE
#endif

#include <libavformat/version.h>
#include <SDL2/SDL_version.h>

Expand Down
3 changes: 0 additions & 3 deletions app/src/sys/win/process.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// <https://devblogs.microsoft.com/oldnewthing/20111216-00/?p=8873>
#define _WIN32_WINNT 0x0600 // For extended process API

#include "util/process.h"

#include <processthreadsapi.h>
Expand Down