Commit graph

5 commits

Author SHA1 Message Date
Andrew Kaster
39f92fa131 LibC: Define offsetof in stddef.h instead of sys/cdefs.h
Just like Dr. POSIX ordered. Move the macro where it belongs, but make
sure it's visible to Userland files compiled with -DKERNEL. Parts of
LibEDID that are compiled into the Kernel use offsetof to parse the
EDID information given to us by hardware.
2022-02-28 20:28:01 -08:00
Andrew Kaster
fcb64311dc LibC: Don't export ALWAYS_INLINE from sys/cdefs.h
POSIX doesn't tell us to export a macro like this, and it's largely
going to never be defined when compiling a serenity-native C++ file,
since AK defines it already.

This does raise a strange issue where some futex-related helpers in
serenity.h are declared with ALWAYS_INLINE. Whether these helpers belong
in a C-visible header as file-static methods is questionable, but let's
work around the issue but adding some preprocessor magic to make sure
these declarations get the behavior they used to have without leaking
macros.
2022-02-28 20:28:01 -08:00
Andreas Kling
401c9415b4 LibC: Remove commented-out main() prototype from sys/cdefs.h 2021-11-21 20:22:48 +01:00
Brian Gianforcaro
1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
Andreas Kling
13d7c09125 Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Renamed from Libraries/LibC/sys/cdefs.h (Browse further)