summaryrefslogtreecommitdiff
path: root/gthread
Commit message (Collapse)AuthorAgeFilesLines
* meson: Add tests for generated pkg-config filesMarco Trevisan (Treviño)2023-04-171-0/+19
| | | | Ensure things are generated as we expect and avoid we regress on that.
* meson: Use 'tap' test protocol by defaultMarco Trevisan (Treviño)2023-01-171-1/+7
| | | | | | | | | Meson supports tap protocol results parsing, allowing us to track better the tests that are running (and the ones that are actually skipped) without manually parsing the test output. However this also implies that using the verbose mode for a test doesn't show its output by default (unless there are failures).
* gthread: Fully initialize GThreadFunctions structure in testSimon McVittie2022-11-141-1/+8
| | | | | | | | | | The macOS CI builds with -Werror=missing-field-initializers by default, making incomplete initializers a compile-time error (even though their meaning is well-defined: missing fields are initialized as if with .field = 0). Resolves: https://gitlab.gnome.org/GNOME/glib/-/issues/2812 Signed-off-by: Simon McVittie <smcv@collabora.com>
* tests: Add some trivial tests for g_thread_init()Philip Withnall2022-11-103-0/+120
| | | | | | | It’s deprecated, but the big red 0/0/0 line for the `glib/gthread` directory in the lcov output for GLib is driving me nuts. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
* Fix symbol visibility macros on WindowsXavier Claessens2022-10-131-1/+2
| | | | | | | | | | | | | | | | | | | | | There is currently no `dllimport` attribute on any of our function, which prevents MSVC to optimize function calls. To fix that issue, we need to redeclare all our visibility macros for each of our libraries, because when compiling e.g. GIO code, we need dllimport in GLIB headers and dllexport in GIO headers. That means they cannot use the same GLIB_AVAILABLE_* macro. Since that's a lot of boilerplate to copy/paste after each version bump, this MR generate all those macros using a python script. Also simplify the meson side by using `gnu_symbol_visibility : 'hidden'` keyword argument instead of passing the cflag manually. This leaves only API index to add manually into glib-docs.xml when bumping GLib version. That file cannot be generated because Meson does not allow passing a buit file to gnome.gtkdoc()'s main_xml kwarg unfortunately.
* Add SPDX license headers for LGPL-2.1-or-later to various filesPhilip Withnall2022-06-011-0/+2
| | | | | | | | | | | | | These have all been added manually, as I’ve finished all the files which I can automatically detect. All the license headers in this commit are for LGPL-2.1-or-later, and all have been double-checked against the license paragraph in the file header. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #1415
* build: Drop checks and workarounds for older Meson versionsPhilip Withnall2022-05-061-4/+1
| | | | Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
* Meson: Override every dependency glib providesXavier Claessens2020-04-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | Meson 0.54.0 added a new method meson.override_dependency() that must be used to ensure dependency consistency. This patch ensures a project that depends on glib will never link to a mix of system and subproject libraries. It would happen in such cases: The system has glib 2.40 installed, and a project does: dependency('glib-2.0', version: '>=2.60', fallback: ['glib', 'glib_dep']) dependency('gobject-2.0') The first call will configure glib subproject because the system libglib is too old, but the 2nd call will return system libgobject. By overriding 'gobject-2.0' dependency while configuring glib subproject during the first call, meson knows that on the 2nd call it must return the subproject dependency instead of system dependency. This also has the nice side effect that with Meson >0.54.0 an application depending on glib can declare the fallback without knowing the dependency variable name: dependency('glib-2.0', fallback: 'glib').
* build: Drop autotools supportPhilip Withnall2019-01-151-97/+0
| | | | | | | | | | | | So long, and thanks for everything. We’re a Meson-only shop now. glib-2-58 will remain the last stable GLib release series which is buildable using autotools. We continue to install autoconf macros for autotools-using projects which depend on GLib; they are stable API. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* Meson: Fix deprecation warning with 0.49.0 releaseXavier Claessens2018-12-101-1/+2
| | | | http://mesonbuild.com/Release-notes-for-0-49-0.html#deprecation-warning-in-pkgconfig-generator
* meson: Add macOS libtool versioning for ABI compatibilityNirbheek Chauhan2018-10-221-0/+1
| | | | | | | With this, the compatibility version and current version values in macOS and iOS dylibs will match the values set by Autotools. See: https://github.com/mesonbuild/meson/issues/1451
* Meson: build and install remaining testsXavier Claessens2018-09-211-0/+2
|
* Remove all static ChangeLog filesChristoph Reiter2018-09-041-837/+0
| | | | They only contain old information which is also available in git
* Meson: Do not build tests with nodelete/Bsymbolic-functionsXavier Claessens2018-05-091-1/+3
| | | | | | | | | | | | -z nodelete breaks the libresourceplugin module usage in the resources.c test, which expects to be able to unload it. Make the Meson build match what the autotools build does: only pass glib_link_flags to the headline libraries (glib-2.0, gio-2.0, gobject-2.0, gthread-2.0, gmodule-2.0) and omit it from all other build targets. https://bugzilla.gnome.org/show_bug.cgi?id=788771
* Meson: Use pkgconfig module to generate all pc filesXavier Claessens2018-03-281-0/+9
| | | | | | This requires improved pc file generator from meson 0.45. https://bugzilla.gnome.org/show_bug.cgi?id=788773
* meson: fix static build under WindowsChristoph Reiter2018-01-041-1/+1
| | | | | | | Properly define GLIB/GOBJECT_STATIC_COMPILATION when static build is enabled. Use library() instead of shared_library() to allow selecting static builds. https://bugzilla.gnome.org/show_bug.cgi?id=784995
* meson: build Windows resource filesChristoph Reiter2018-01-042-2/+14
| | | | | | | configure_file() forces utf-8 atm but .rc files are not utf-8. To work around the issue just remove the only non-ASCII char. https://bugzilla.gnome.org/show_bug.cgi?id=784995
* meson: add -fvisibility=hidden explicitly to selected targetsTim-Philipp Müller2017-07-131-2/+1
| | | | | | Don't use it project-wide for building everything. Otherwise symbols for shared modules won't be exposed, e.g. in the resourceplugin used by the gio resource unit test.
* meson: Improve MSVC and MinGW support and fix dependencies everywhereNirbheek Chauhan2017-07-131-5/+4
| | | | | | | | | | | | | | | | Disable gio tests on Windows, fix .gitignore to not ignore config.h.meson, and add more things to it. Rename the library file naming and versioning to match what Autotools outputs, e.g., libglib-2.0.so.0.5000.2 on Linux, libglib-2.0-0.dll and glib-2.0-0.dll on Windows with MSVC. Several more tiny fixes, more executables built and installed, install pkg-config and m4 files, fix building of gobject tests. Changes to gdbus-codegen to support out-of-tree builds without environment variables set (which you can't in Meson). We now add the build directory to the Python module search path.
* meson: Fix glib, add gobject, gio, gthread, gmodule, etcTim-Philipp Müller2017-07-131-0/+11
| | | | | | Several small fixes to the build files. Lots of tests have also been added, and glib tests pass now.
* build: Drop nmake/MSC build system for GLibPhilip Withnall2017-07-103-29/+0
| | | | | | | | | | | | It hasn’t been seriously maintained for the best part of 10 years and is very outdated. The recommended way to build GLib on Windows is now Visual Studio: https://wiki.gnome.org/Projects/GTK%2B/Win32/MSVCCompilationOfGTKStack#GLib Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=722047
* gthread/: LGPLv2+ -> LGPLv2.1+Sébastien Wilmet2017-05-241-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=776504
* win32: fixup lib.exe invocationRyan Lortie2014-02-151-1/+1
| | | | | | | | | | | | | | | | | | We have a configure.ac check for lib.exe that attempts to enable creation of .lib files for our 5 public libraries. That has been broken for a long time for two reasons: 1) the Makefiles hardcode 'lib' instead of 'lib.exe' 2) we dropped generation of .def files quite some time ago (except for in gthread where we have the two-symbol file under version control) Add new rules for creating .def files from dumpbin.exe (which you should have if you have lib.exe) and fix the .lib rules to use lib.exe. Add a bit of $(AM_V_GEN) all around, as well. https://bugzilla.gnome.org/show_bug.cgi?id=722033
* Updated FSF's addressDaniel Mustieles2014-01-311-3/+1
|
* Rework the build system for a new tests approachRyan Lortie2013-05-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Perform a substantial cleanup of the build system with respect to building and installing testcases. First, Makefile.decl has been renamed glib.mk and substantially expanded. We intend to add more stuff here in the future, like canned rules for mkenums, marshallers, resources, etc. By default, tests are no longer compiled as part of 'make'. They will be built when 'make check' is run. The old behaviour can be obtained with --enable-always-build-tests. --disable-modular-tests is gone (because tests are no longer built by default). There is no longer any way to cause 'make check' to be a no-op, but that's not very useful anyway. A new glibtests.m4 file is introduced. Along with glib.mk, this provides for consistent handling of --enable-installed-tests and --enable-always-build-tests (mentioned above). Port our various test-installing Makefiles to the new framework. This patch substantially improves the situation in the toplevel tests/ directory. Things are now somewhat under control there. There were some tests being built that weren't even being run and we run those now. The long-running GObject performance tests in this directory have been removed from 'make check' because they take too long. As an experiment, 'make check' now runs the testcases on win32 builds, by default. We can't run them under gtester (since it uses a pipe to communicate with the subprocess) so just toss them in TESTS. Most of them are passing on win32. Things are not quite done here, but this patch is already a substantial improvement. More to come.
* build: Add --disable-compile-warningsColin Walters2013-02-271-0/+2
| | | | | | | | Some (broken) toolchains for example trip up -Werror=missing-prototypes in system headers. This patch allows people to skip the formerly hardcoded "baseline" warnings. https://bugzilla.gnome.org/show_bug.cgi?id=694757
* visibility: Use a separate CFLAGS variableRyan Lortie2013-01-141-0/+1
| | | | | | | | | | | | | | | | | | | | | We only want to control the default visibility for our five main installable libraries: libglib, libgthread, libgmodule, libgobject, libgio. We should therefore only set -fvisibility=hidden when building those. Use a separate substitution variable for this purpose. Using CFLAGS directly leads to some modules built in testcases not exporting their symbols (and then the tests fail). It also affects the fam file monitoring module. Colin had originally done it this way in his visibility patch series but I failed to understand why so I didn't copy it. Now I do. Also: revert changes made to two testcases in an attempt to work around this issue. https://bugzilla.gnome.org/show_bug.cgi?id=691756
* gthread-impl.c: add missing #include "config.h"Ryan Lortie2013-01-141-0/+2
| | | | | | | | | | | One of the features of our new symbol exporting regime is that it forces config.h to be included at the top of every .c file. This was missed in gthread-impl.c. The only reason this wasn't noticed is because nothing in this file is being used anymore. We need those symbols to continue to be exported for reasons of ABI backwards compatibility, however.
* Actually Don't define GLIB_COMPILATION in libgthreadAlexander Larsson2011-10-182-1/+4
| | | | Last commit was wrong, fixing it up
* Don't define GLIB_COMPILATION in libgthreadAlexander Larsson2011-10-181-4/+0
| | | | | | | This was turning all the GLIB_VARs in the glib headers into dllexports on windows, causing all sort of nastiness. libgthread is mostly empty now anyway, so we don't need any GLIB_COMPILATION like flag.
* gthread/: fix up declarationsRyan Lortie2011-10-162-3/+2
| | | | | | g_thread_init() is now a deprecated API, so drop G_DISABLE_DEPRECATED from the CFLAGS for gthread/. Add the missing declaration for g_thread_init_with_errorcheck_mutexes() back to deprecated/gthread.h.
* gthread: move test cases to glib/Ryan Lortie2011-10-169-1051/+0
|
* tests: merge gthread/ and glib/ atomic testsRyan Lortie2011-10-162-74/+0
|
* g_thread_new: never failRyan Lortie2011-10-134-8/+5
| | | | | Remove the GError argument from g_thread_new() and abort on failure. Introduce g_thread_try() for those who want to handle failure.
* thread: nuke the concept of 'joinable'Ryan Lortie2011-10-134-6/+5
| | | | | | | | And remove the 'joinable' argument from g_thread_new() and g_thread_new_full(). Change the wording in the docs. Clarify expectations for (deprecated) g_thread_create().
* Disable deprecations where appropriate in testsMatthias Clasen2011-10-126-21/+7
|
* Add a warning to g_thread_init_with_errorcheck_mutexesMatthias Clasen2011-10-051-0/+1
| | | | | Should anybody try to use this, we should at least tell them that its gone.
* Deprecate g_thread_init()Ryan Lortie2011-10-041-13/+0
| | | | | | | Move the last few things that needed thread-safe initialisation to a global ctor. https://bugzilla.gnome.org/show_bug.cgi?id=660744
* Define GLIB_COMPILATION when building libgthread.soMatthias Clasen2011-10-021-0/+1
| | | | | This is necessary, because gthreadprivate.h can only be included inside GLib, otherwise single-include guards trigger.
* g_thread_init: take a gpointer as the argRyan Lortie2011-09-211-2/+2
| | | | GThreadFunctions is about to disappear.
* Stop using GStaticMutex in two testcasesRyan Lortie2011-09-211-8/+6
|
* emufutex: remove init from g_thread_init_glibRyan Lortie2011-09-091-4/+2
| | | | Use a GStaticMutex instead.
* Move the GThread implementations to glib/Ryan Lortie2011-09-094-981/+5
| | | | | We can now get threads initialised from inside of libglib by calling g_thread_init_glib().
* invert gthread-impl includesRyan Lortie2011-09-094-8/+13
| | | | | | | | | | | configure.ac defined G_THREAD_SOURCE and gthread-impl would #include it. Instead, since we only have two thread implementations now, and since we always use the Windows one only on Windows, move the logic to the Makefile, predicated on 'if OS_WIN32'. Then have the chosen backend do the #include "gthread-impl.c" from there. Remove the G_THREAD_SOURCE define from configure.ac.
* win32 threads: assume TryEnterCriticalSectionRyan Lortie2011-09-091-83/+7
| | | | | Remove the dynamic lookup for TryEnterCriticalSection, which has existed since Windows 2000.
* Stop using HAVE_G_THREAD_IMPL_INITRyan Lortie2011-09-093-8/+1
| | | | Just always call the init function.
* Move thread priority translation into the backendsRyan Lortie2011-09-093-37/+51
| | | | | | The translation of GLib priorities into the thread priorities of different operating systems belongs in the implementation -- not half-way in the front end.
* Remove useless macros from when we supported DCERyan Lortie2011-09-091-15/+8
| | | | These are non-ops now, and easily replaced.
* Remove support for DCE threadsRyan Lortie2011-09-091-56/+4
|
* Remove support for custom thread implementationsRyan Lortie2011-09-091-54/+10
|