| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Try to get the value of __STDC_VERSION__ if supported, if not just
fallback to the oldest standard that any compiler should handle.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sadly, in C++ there's not an universal way to get what language standard
is used to compile GLib-based programs, in fact while most compilers
relies on `__cplusplus`, MSVC is defining that, but it does not use it
to expose such information (unless `/Zc:__cplusplus` arg is used).
On the other side, MSVC reports the language standard via _MSVC_LANG [1].
This complication makes us defining some macros in a very complex way
(such as glib_typeof()), because we need to perform many checks just to
understand if a C++ compiler is used and what standard is expecting.
To avoid this, define multiple macros that can be used to figure out
what C++ standard is being used.
[1] https://docs.microsoft.com/en-us/cpp/build/reference/zc-cplusplus?view=msvc-170
|
|
|
|
|
|
|
|
| |
This reverts commit e85635daa07e9c669ded75c476d67d02aa85c7c1.
See the previous revert for rationale.
Fixes: #2802
|
|
|
|
| |
It has enough differences to expose it as an unix-subtype.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add SPDX license (but not copyright) headers to all files which follow a
certain pattern in their existing non-machine-readable header comment.
This commit was entirely generated using the command:
```
git ls-files glib/tests/*.c | xargs perl -0777 -pi -e 's/\n \*\n \* This library is free software; you can redistribute it and\/or\n \* modify it under the terms of the GNU Lesser General Public/\n \*\n \* SPDX-License-Identifier: LGPL-2.1-or-later\n \*\n \* This library is free software; you can redistribute it and\/or\n \* modify it under the terms of the GNU Lesser General Public/igs'
```
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Helps: #1415
|
|
|
|
|
|
| |
A convenient macro present in the Linux kernel, named FIELD_SIZE() there.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
|
|
|
|
|
| |
We can't actually use it inside an expression, so keep the old macro
for that. Also add a test so that this doesn't break the next time we
change it.
See: https://gitlab.gnome.org/GNOME/glib/merge_requests/955#note_542646
|
|
To guarantee that its behaviour is always the same as the
G_STRUCT_OFFSET fallback.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/glib/issues/1055
|