Commit Graph

61 Commits

Author SHA1 Message Date
Philip Withnall
b3efef5b6f build: Drop autotools support
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>
2019-01-15 15:11:43 +00:00
Ernestas Kulik
03e86d000f Remove HAVE_CONFIG_H defs and uses
Since GLib files are only meant to be built as part of GLib, config.h
always exists, so the checks are more or less pointless.

https://bugzilla.gnome.org/show_bug.cgi?id=793399
2018-02-21 13:57:10 +00:00
SilentFlame
bd2fa54637 glib: Correct typos of ‘character’
https://bugzilla.gnome.org/show_bug.cgi?id=774083
2017-10-06 12:49:12 +01:00
Tim-Philipp Müller
2f29ee1735 meson: add -fvisibility=hidden explicitly to selected targets
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.
2017-07-13 19:03:39 -04:00
Patrick Griffis
d10be6102f meson: Minor modernizations 2017-07-13 19:03:39 -04:00
Nirbheek Chauhan
fe2a9887a8 meson: Improve MSVC and MinGW support and fix dependencies everywhere
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.
2017-07-13 19:03:39 -04:00
Philip Withnall
a131134918 build: Drop nmake/MSC build system for GLib
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
2017-07-10 11:22:40 +01:00
Iain Lane
476f30a004 regex test: Fix with --with-pcre=internal
We were linking with the wrong path for the internal libpcre, and
furthermore the function pcre_version was declared but never defined.
2016-01-18 18:37:28 +00:00
Ryan Lortie
dce88768dc all: remove use of 'register' keyword
We should have done this a decade ago...

https://bugzilla.gnome.org/show_bug.cgi?id=730293
2014-06-28 13:07:52 -04:00
Dan Winship
6e4a7fca43 Require C90 compliance
Assume all supported platforms implement C90, and therefore they
(correctly) implement atexit(), memmove(), setlocale(), strerror(),
and vprintf(), and have <float.h> and <limits.h>.

(Also remove the configure check testing that "do ... while (0)" works
correctly; the non-do/while-based version of G_STMT_START and
G_STMT_END was removed years ago, but the check remained. Also, remove
some checks that configure.ac claimed were needed for libcharset, but
aren't actually used.)

Note that removing the g_memmove() function is not an ABI break even
on systems where g_memmove() was previously not a macro, because it
was never marked GLIB_AVAILABLE_IN_ALL or listed in glib.symbols, so
it would have been glib-internal since 2004.

https://bugzilla.gnome.org/show_bug.cgi?id=710519
2013-11-20 09:16:16 -05:00
Ryan Lortie
f9eb9eed10 Rework the build system for a new tests approach
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.
2013-05-31 23:12:15 -04:00
Ryan Lortie
346aa683de Fix visibility for glib/ and gio/ submodules
We have various sub directories in glib/ and gio/ (eg: inotify, gnulib,
pcre, xdgmime, etc.) that build convenience libraries that are then
included into libglib and libgio.  The files in these directories need
to be built with the same visibility policy as the files in the first
level directories, so add CFLAGS for them all.

This wasn't a problem when the visibility flags were set directly in
CFLAGS but then we had to deal with some modules that we built that we
explicitly wanted to export symbols from.

For now, we can keep things the way they are because it's less hacky and
although it's a theoretical hazard to forget these CFLAGS, we rarely add
new subdirectories to the build.
2013-01-18 13:23:40 -05:00
Christian Persch
9457833010 regex: Import PCRE 8.31
https://bugzilla.gnome.org/show_bug.cgi?id=679193
2012-07-07 22:08:02 +02:00
Christian Persch
7483315f83 regex: Fix unicode othercasing
Reorder the toupper/tolower calls when othercaseing, so this
function is bug-for-bug compatible with the pcre internal tables.

https://bugzilla.gnome.org/show_bug.cgi?id=678273
2012-07-02 15:59:39 +02:00
Christian Persch
53b48dfd3b regex: Fix unicode othercasing
The old _pcre_ucp_othercase() function was wrong in returning
NOTACHAR (0xffffffff) for characters that aren't changed by upper-
and lower-casing. This led to PCRE internally using incorrect (or
at least inefficient) character classes when using G_REGEX_CASELESS.

E.g. [Z-\x{100}] turned into:

[Z\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{39c}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{fffe}\x{178}z-\x{101}]

instead of the expected and efficient

[Z\x{39c}\x{178}z-\x{101}]

https://bugzilla.gnome.org/show_bug.cgi?id=678273
2012-06-23 17:32:15 -04:00
Matthias Clasen
e7c0f10ee0 Drop some unused PCRE sources
There is no point in compiling these, since we are not calling
any of the functions in them.
2012-04-01 23:08:42 -04:00
Matthias Clasen
c0c2cbe0ae Fix distcheck 2012-03-04 22:28:28 -05:00
Christian Persch
d2c37669f2 regex: unicode: Update to Unicode 6.1.0
Update some more PCRE tables to Unicode 6.1.0. Should be completely
updated now.
2012-02-27 13:27:13 +01:00
Christian Persch
989c466296 regex: Remove pcre_ucd.c 2012-02-26 22:09:05 -05:00
Christian Persch
706b72db21 regex: Use glib for unicode data
Use g_unichar_type() and g_unichar_get_script() instead of pcre tables.
2012-02-26 22:09:05 -05:00
Christian Persch
8e8ab99bad regex: unicode: Update to Unicode 6.1.0 2012-02-26 22:09:05 -05:00
Christian Persch
afa3375210 regex: Use glib memory allocator 2012-02-26 22:09:04 -05:00
Christian Persch
d02f6393df regex: Use g_ascii_is[x]digit 2012-02-26 22:09:04 -05:00
Christian Persch
a40523b7f2 regex: Update included PCRE to 8.30 2012-02-26 22:09:03 -05:00
Ryan Lortie
ea63f16c59 Remove duplicate 'struct real_pcre' declaration
The redundant forward declaration of 'struct real_pcre' before the
typedef was tripping up gtk-doc.  Remove it.
2011-07-22 15:47:24 +02:00
Matthias Clasen
fb2809ec99 Forgotten files 2011-01-22 00:01:54 -05:00
Behdad Esfahbod
0a57086540 Update to Unicode 6.0
One new GUnicodeBreak enum member.  Three new GUnicodeScript members,
and one member renamed to fix a typo.

Tests, docs, and scripts are updated.  PCRE update still needed.
2011-01-21 16:30:19 -05:00
Cody Russell
0a9bfa1c7d Add const to _pcre_ucp_othercase() definition in pcre_internal.h 2010-08-23 12:34:53 -05:00
Matthias Clasen
14e0ad7c53 Don't compile some unused functions in gio/xdgmime/ 2010-08-08 21:32:04 -04:00
Matthias Clasen
7acdaf6f1d Don't compile an unused function 2010-08-08 21:32:04 -04:00
Matthias Clasen
6ada7532b5 Drop some unused code
Some functions in pcre_get.c are not used.
2010-08-08 01:12:05 -04:00
Ryan Lortie
b3b7ea8e22 Replace -I with $(glib_INCLUDES) and friends
Stop using ad hoc -I in all of our Makefile.am.  Use the new variables
instead.
2010-08-06 13:10:34 -04:00
Matthias Clasen
caa9453b72 Fix a warning 2010-07-30 19:51:18 -04:00
Matthias Clasen
9d93dc5554 Remove some unused pcre code 2010-07-30 19:51:17 -04:00
Matthias Clasen
e0f2d0f28e Comment out an unused function
it is causing warnings, so it needs to die...bug 622600
2010-07-08 16:32:08 -04:00
Ryan Lortie
2e53e50244 glib/: fully remove galias hacks 2010-07-07 19:34:35 -04:00
Kristian Rietveld
87fd38bc4d Add PCRE_EXP_DECL to pcre_callout declaration
Fixes build on Mac OS X.
2010-06-26 22:55:47 +02:00
Matthias Clasen
85621f1a0f Update the include pcre to 8.02 2010-06-20 01:46:35 -04:00
Dan Winship
92ac8d165e Misc warning fixes
glib/pcre/pcre_ucp_search_funcs.c, glib/pcre/pcre_valid_utf8.c: add
back missing config.h includes, and this time add them to the copies
in glib/update-pcre/ too so they don't get lost again on the next PCRE
update.

glib/garray.c, glib/gbase64.c: fix signed/unsigned pointer casts

gio/xdgmime/xdgmimeglob.c: remove unused variable

gio/tests/live-g-file.c: fix printf args on x86_64

tests/Makefile.am, tests/regex-test.c: remove redundant -DENABLE_REGEX
2009-05-01 10:37:45 -04:00
Matthias Clasen
d6f23279e7 Update PCRE to 7.8
svn path=/trunk/; revision=7813
2009-01-18 06:32:03 +00:00
Matthias Clasen
0f6b25ca96 Fix some compiler warnings
svn path=/trunk/; revision=7755
2008-12-31 05:51:47 +00:00
Dan Winship
ea0970e9ca make this a "const gpointer" rather than a gconstpointer to avoid warnings
* glib/gthreadpool.c (wakeup_thread_marker): make this a "const
	gpointer" rather than a gconstpointer to avoid warnings later

	* glib/pcre/pcre_ucp_searchfuncs.c:
	* glib/pcre/pcre_valid_utf8.c: #include "config.h"

	* glib/tests/printf.c (test_d): fool gcc into not warning about
	some printf format strings that we know are dubious

svn path=/trunk/; revision=7552
2008-09-26 16:00:45 +00:00
Matthias Clasen
e42e2fe168 Set a sane default recursion limit of 8192 instead of 1000000. Patch by
* glib/pcre/Makefile.am: Set a sane default recursion limit
        of 8192 instead of 1000000.
        Patch by Mart Raudsepp.


svn path=/trunk/; revision=7166
2008-07-06 04:25:18 +00:00
Matthias Clasen
f869b1f693 Apply fix for CVE-2008-2371 to fix a heap-based buffer overflow.
* glib/pcre/pcre_compile.c: Apply fix for CVE-2008-2371 to
        fix a heap-based buffer overflow.



svn path=/trunk/; revision=7123
2008-07-01 03:27:14 +00:00
Matthias Clasen
f532b61fea Fix make check
svn path=/trunk/; revision=7014
2008-06-11 18:58:56 +00:00
Matthias Clasen
689a9e4b1a Revert the patch for bug 527214 and related changes. GTimer
is supposed to work without threads.


svn path=/trunk/; revision=6943
2008-05-27 16:00:51 +00:00
Matthias Clasen
adae23350a PCRE 7.7
svn path=/trunk/; revision=6938
2008-05-27 04:17:54 +00:00
Matthias Clasen
a134d9f42b Update to 7.6, for real
svn path=/trunk/; revision=6669
2008-03-11 01:51:07 +00:00
Murray Cumming
0d7b605f06 Fixed some minor typos in documentation.
2008-02-06  Murray Cumming  <murrayc@murrayc.com>

* glib/gconvert.c:
* glib/pcre/pcre_internal.h: Fixed some minor typos in documentation.

svn path=/trunk/; revision=6467
2008-02-06 16:02:20 +00:00
Hans Breuer
b877c83cdc removed -GD to compile with msvc9 (vs2008) with less complains
2007-12-09  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc glib/makefile.msc.in : removed -GD to compile
	with msvc9 (vs2008) with less complains
	
	* glibconfig.h.win32.in : #define G_HAVE_ISO_VARARGS 1 for
	msv8 (vs2005) and above
	
	* glib/gfileutils.c : s/stricmp/_stricmp/
	* msvc_recommended_pragmas.h : work around Microsoft's premature 
	attempt to deprecate the C-Library

	* tests/makefile.msc.in : added checksum-test


svn path=/trunk/; revision=6076
2007-12-09 14:38:26 +00:00