Now that we have all symbols annotated as GLIB_PUBLIC, we can switch
the build to default to hiding symbols. The major advantage of this
is that it's much harder to accidentally leak symbols.
This patch only adds it to CFLAGS for the sublibraries; we don't want
to affect things like gio/fam, nor the executables.
However, this patch only changes Unix - on Windows, we keep the
.symbols file because we still ultimately need a .def file in order to
generate a .dll.
To unify both Unix and Windows again, we need to do what cairo does
and parse the headers at build time.
https://bugzilla.gnome.org/show_bug.cgi?id=688681
To switch GLib to have private-by-default symbols, we need to have a
macro which expands to G_PUBLIC_API only when compiling a particular
"sublibrary" in GLib (e.g. gmodule, gio).
This patch implements that with a two-level scheme. First, each
sublibrary has its own preprocessor macro e.g. _GTHREAD_API. Then,
the Makefiles are modified to define this to G_PUBLIC_API only when
building that library - so when building libgthread, _GMODULE_API is
left undefined.
Now, we could simply add _G*_API to every entry point, but because
we've already been annotating all the headers with
GLIB_AVAILABLE_IN_XX, let's modify those macros to automatically
depend on a new "_G_API". Then the Makefiles further define _G_API to
the target such as _GTHREAD_API. This indirection avoids a
(glib version)*(sublibrary) explosion of preprocessor definitions in
gversionmacros.h.
https://bugzilla.gnome.org/show_bug.cgi?id=688681
Previously:
* On Unix, an -export-symbol-regex (g_)|(glib_) was used, and the .symbols
files were used in "make check"
* On Windows, the .symbols files are massaged into a format which MSVC
expects as an export list
Now:
* On both Unix and Windows, the .symbols file is used as the list of
symbols to export, and code to generate the exported list per
platform is unified. Even symbols starting with g_ are not exported
unless they are in the file. The abicheck.sh tools are deleted.
https://bugzilla.gnome.org/show_bug.cgi?id=688681
To avoid -Wmissing-prototype warnings, we need to prototype both the
original and the _utf8 versions of all of the functions that have had
_utf8-renaming on Windows. But duplicating all the prototypes is ugly,
so rather than doing them "in-place", move them all to a new header
file just for that.
https://bugzilla.gnome.org/show_bug.cgi?id=688109
When building with MinGW/MSYS with srcdir != builddir the build fails:
- to locate the generated .def files
- creating libglib-gdb.py
- creating libgobject-gdb.py
Solved this by explicitly instructing these files to be generated
in $(builddir)/...
https://bugzilla.gnome.org/show_bug.cgi?id=653167
All locks are now zero-initialised, so we can drop the G_*_INIT macros
for them.
Adjust various users around GLib accordingly and change the docs.
https://bugzilla.gnome.org/show_bug.cgi?id=659866
The -e parameter to echo isn't recognized by echo in POSIX sh,
but isn't needed when no escaped characters need to be
interpreted.
This fixes building glib with a mingw cross compiler on Mac OS X.
https://bugzilla.gnome.org/show_bug.cgi?id=654085
Don't call LoadLibrary() on shell32.dll or kernel32.dll. kernel32.dll
is always loaded. Shell32.dll is also already loaded as glib links to
functions in it. So just call GetModuleHandle() on them.
For mlang.dll in win_iconv.c and winhttp.dll in gwinhttpvfs.c, always
try loading them from a complete path, from the Windows system
directory.
Use the "tool help" API to enumerate modules in gmodule-win32.c. It is
present in all Windows versions since Windows 2000, which is all we
support anyway. Thus no need to look that API up dynamically. Just
link to it normally. We can bin the fallback code that attempts to use
the psapi API.
This is a minimal patch-out of the galias functionality. We will do a
release like this so that we can easily back it out if there are
reported problems.
A more substantial cleanup (mostly removing #includes from every file)
will follow if there are no issues.
Update various README files to refer to git instead of svn.
Add a README.commits that is pretty much a copy of the same file
in GTK+. Also discontinue ChangeLog files.
2008-09-26 Tor Lillqvist <tml@novell.com>
* gmodule-win32.c: Improve error reporting: When g_module_open()
fails, include the name of the module passed to LoadLibrary() in
what g_module_error() returns.
svn path=/trunk/; revision=7543
2008-09-08 Tor Lillqvist <tml@novell.com>
Bug 551408 - gmodule.def generated to builddir, but required in srcdir
* Makefile.am: Use gmodule.def from builddir, not srcdir.
svn path=/trunk/; revision=7446