wlroots-hyprland/util
Simon Ser 842093bb84 Define _POSIX_C_SOURCE globally
Stop trying to maintain a per-file _POSIX_C_SOURCE. Instead,
require POSIX.1-2008 globally. A lot of core source files depend
on that already.

Some care must be taken on a few select files where we need a bit
more than POSIX. Some files need XSI extensions (_XOPEN_SOURCE) and
some files need BSD extensions (_DEFAULT_SOURCE). In both cases,
these feature test macros imply _POSIX_C_SOURCE. Make sure to not
define both these macros and _POSIX_C_SOURCE explicitly to avoid
POSIX requirement conflicts (e.g. _POSIX_C_SOURCE says POSIX.1-2001
but _XOPEN_SOURCE says POSIX.1-2008).

Additionally, there is one special case in render/vulkan/vulkan.c.
That file needs major()/minor(), and these are system-specific.
On FreeBSD, _POSIX_C_SOURCE hides system-specific symbols so we need
to make sure it's not defined for this file. On Linux, we can
explicitly include <sys/sysmacros.h> and ensure that apart from
symbols defined there the file only uses POSIX toys.
2024-02-15 15:41:12 +01:00
..
addon.c util/addon: make wlr_addon_set_finish() safer 2023-10-08 11:06:09 +00:00
array.c util/array: unclutter 2022-08-29 13:48:42 +00:00
box.c util/box: transform empty boxes' origins 2023-05-24 08:55:15 +00:00
env.c util/env: make env_parse_switch() return a size_t 2022-12-06 16:14:18 +01:00
global.c util/global: fix memory leak on display destroy in wlr_global_destroy_safe 2022-06-07 18:18:11 +02:00
log.c Define _POSIX_C_SOURCE globally 2024-02-15 15:41:12 +01:00
meson.build util/transform: move over wl_output_transform helpers 2023-11-23 11:03:57 +01:00
rect_union.c util: add struct to track union of rectangles 2023-10-05 11:45:32 +00:00
region.c util/region: forbid "shrinking" a region with wlr_region_expand() 2022-12-09 16:46:36 +00:00
set.c util/set: overhaul 2022-08-29 13:48:42 +00:00
shm.c Define _POSIX_C_SOURCE globally 2024-02-15 15:41:12 +01:00
time.c Define _POSIX_C_SOURCE globally 2024-02-15 15:41:12 +01:00
token.c Define _POSIX_C_SOURCE globally 2024-02-15 15:41:12 +01:00
transform.c util/transform: add wlr_output_transform_coords() 2023-11-23 11:07:34 +01:00
utf8.c xdg-toplevel: check that title provided actually is UTF-8 2023-11-22 22:03:00 +03:00