glib/girepository
Tor Lillqvist 97e04b2b5d Make g-ir-scanner work on Windows. Still problems with the typelib code.
2008-08-27  Tor Lillqvist  <tml@novell.com>

	Make g-ir-scanner work on Windows. Still problems with the typelib
	code. Changes okayed by jdahlin.

	* configure.ac: Check for Windows, set Automake conditional
	OS_WIN32. Change backslashes to forward slashes in pyexecdir to
	avoid shell quoting issues
	
	* girepository/Makefile.am: Use -no-undefined so that libtool
	agrees to build a shared library on Windows.

	* girepository/girparser.c (backtrace_stderr): No backtrace() on
	Windows. Empty implementation on Windows so far.

	* girepository/gtypelib.c (g_typelib_check_sanity): Give more
	informative error message for the assertion failures. Tell also
	what the expected size of the struct is. Check all sizes first and
	fail afterwards if at least one size was different from expected.

	* tools/Makefile.am: Reorder libraries into proper logical
	dependency order.

	* tools/generate.c: Don't include <dlfcn.h>, not used.

	* giscanner/Makefile.am: On Windows, link with the Python library,
	and install the module DLL as _giscanner.pyd. Remove the
	unnecessary import library and libtool library that libtool has
	installed.

	* giscanner/scannerlexer.l: Recognize the gcc __attribute__ syntax
	and just skip it. Recognize also two "l" suffixes for long long
	constants. Recognize also __inline__.

	* giscanner/grealpath.h (g_realpath): Implement on Windows, using
	GetFullPathName(). As such, GetFullPathName() does more than the
	UNIX realpath(). It also changes relative paths into absolute
	paths. But for our purposes that shouldn't matter.

	* giscanner/giscannermodule.c (pygi_source_scanner_parse_file): On
	Windows the file descriptor passed to us is from Python. Python
	Python2.5 uses the msvcr71.dll C library, while mingw-built code
	uses msvcrt.dll. On Windows, file descriptors are specific to
	which C library is used. So we must find out what underlying OS
	handle corresponds to the file descriptor Python passes us, and
	then make that into a file descriptor valid for the C library this
	code uses.

	* giscanner/sourcescanner.py (_parse): Don't need to bypass
	__attribute__ as the lexer now handles it. The definition as empty
	was ineffective for mingw anyway, as mingw's _mingw.h undefines
	__attribute__. Close the temp file before unlinking it.

	* giscanner/cgobject.py: Use correct library name for the gobject
	DLL on Windows.

	* gir/Makefile.am: Must pass the full basename of the DLLs on
	Windows to g-ir-scanner. It's a bit ugly that we have to "know"
	that the names of the GLib DLLs are like libglib-2.0-0.dll, but in
	reality they won't change, until there is a GLib 3, and then also
	the Unix code here needs changing.

	Must pass CPPFLAGS to g-ir-scanner when building GLib.gir so that
	libintl.h is found.


svn path=/trunk/; revision=503
2024-02-08 13:53:59 +00:00
..
cmph girepository: Exclude private symbols from the ABI 2024-01-19 12:07:30 +00:00
compiler gitypelib: Switch to refcounting 2024-02-07 21:07:18 +00:00
introspection girepository: Move GIR generation into girepository and prior to tests 2024-01-30 00:50:40 -06:00
tests Merge branch '3155-union-tests' into 'main' 2024-02-08 10:25:13 +00:00
tools Make g-ir-scanner work on Windows. Still problems with the typelib code. 2024-02-08 13:53:59 +00:00
gdump.c girrepository: Replace usage of gsize with standard size_t 2024-01-16 18:40:42 +01:00
gi-dump-types.c girepository: Replace tabs with spaces in indentation 2024-01-16 17:30:37 +01:00
giarginfo.c girepository: Rename gi_arg_info_load_type() to gi_arg_info_load_type_info() 2024-02-05 15:13:46 +00:00
giarginfo.h girepository: Rename gi_arg_info_load_type() to gi_arg_info_load_type_info() 2024-02-05 15:13:46 +00:00
gibaseinfo-private.h gibaseinfo: Allow parent types to be specified for derived types 2024-01-18 13:15:22 +00:00
gibaseinfo.c gibaseinfo: Rename gi_info_new() to gi_base_info_new() 2024-02-08 10:34:40 +00:00
gibaseinfo.h gibaseinfo: Rename gi_info_new() to gi_base_info_new() 2024-02-08 10:34:40 +00:00
giboxedinfo.c giboxedinfo: Add a tag type for boxed types 2024-01-18 13:15:22 +00:00
giboxedinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
gicallableinfo.c gibaseinfo: Rename gi_info_new() to gi_base_info_new() 2024-02-08 10:34:40 +00:00
gicallableinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
gicallbackinfo.c gicallbackinfo: Port documentation to gi-docgen and update 2023-12-18 14:14:15 +00:00
gicallbackinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
giconstantinfo.c girrepository: Replace usage of gsize with standard size_t 2024-01-16 18:40:42 +01:00
giconstantinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
gienuminfo.c gibaseinfo: Rename gi_info_new() to gi_base_info_new() 2024-02-08 10:34:40 +00:00
gienuminfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
gifieldinfo.c gibaseinfo: Rename gi_info_new() to gi_base_info_new() 2024-02-08 10:34:40 +00:00
gifieldinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
giflagsinfo.c gienuminfo: Split out GIFlagsInfo as a derived type 2024-01-18 13:15:22 +00:00
giflagsinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
gifunctioninfo.c gibaseinfo: Rename gi_info_new() to gi_base_info_new() 2024-02-08 10:34:40 +00:00
gifunctioninfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
giinterfaceinfo.c gibaseinfo: Rename gi_info_new() to gi_base_info_new() 2024-02-08 10:34:40 +00:00
giinterfaceinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
ginvoke.c girrepository: Use standard int sized types instead of g[u]int* 2024-01-16 18:40:42 +01:00
giobjectinfo.c gibaseinfo: Rename gi_info_new() to gi_base_info_new() 2024-02-08 10:34:40 +00:00
giobjectinfo.h girepository: Fix declaration of ‘find using interfaces’ methods 2024-02-05 18:40:03 +00:00
gipropertyinfo.c gipropertyinfo: Port documentation to gi-docgen and update 2023-12-18 14:14:15 +00:00
gipropertyinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
giregisteredtypeinfo.c girepository: Use char instead of glib-specific gchar 2024-01-16 18:40:42 +01:00
giregisteredtypeinfo.h girepository: Fix copy-paste error in type check macro 2024-02-04 10:16:31 -08:00
girepository-private.h girepository: Rename gi_arg_info_load_type() to gi_arg_info_load_type_info() 2024-02-05 15:13:46 +00:00
girepository.c Merge branch '3155-typelib-boxed' into 'main' 2024-02-08 10:18:40 +00:00
girepository.h girepository: Add length ‘out’ arguments to several getter methods 2024-02-07 15:47:13 +00:00
girffi.c girepository: Rename gi_arg_info_load_type() to gi_arg_info_load_type_info() 2024-02-05 15:13:46 +00:00
girffi.h girffi: Rename gi_function_invoker_destroy() to …_clear() 2024-01-23 22:55:35 +00:00
girmodule-private.h girepository: Various indentation cleanups 2024-01-16 18:56:57 +01:00
girmodule.c Merge branch 'typelib-bytes' into 'main' 2024-01-26 10:15:49 +00:00
girnode-private.h girnode: Improve int types in GIIrNodeUnion 2024-01-26 09:29:30 +00:00
girnode.c girnode: Improve int types in GIIrNodeField 2024-01-26 09:29:30 +00:00
giroffsets.c girnode: Improve int types in GIIrNodeField 2024-01-26 09:29:30 +00:00
girparser-private.h girepository: Use char instead of glib-specific gchar 2024-01-16 18:40:42 +01:00
girparser.c girnode: Improve int types in GIIrNodeUnion 2024-01-26 09:29:30 +00:00
girwriter-private.h girepository: Rename symbols to the GI namespace 2023-11-08 15:05:20 +00:00
girwriter.c Merge branch '3155-union-tests' into 'main' 2024-02-08 10:25:13 +00:00
gisignalinfo.c gisignalinfo: Port documentation to gi-docgen and update 2023-12-18 14:14:16 +00:00
gisignalinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
gistructinfo.c gibaseinfo: Rename gi_info_new() to gi_base_info_new() 2024-02-08 10:34:40 +00:00
gistructinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
gitypeinfo.c gibaseinfo: Rename gi_info_new() to gi_base_info_new() 2024-02-08 10:34:40 +00:00
gitypeinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
gitypelib-internal.h Merge branch '3155-union-tests' into 'main' 2024-02-08 10:25:13 +00:00
gitypelib.c gitypelib: Add boxed type 2024-02-07 21:07:18 +00:00
gitypelib.h gitypelib: Add boxed type 2024-02-07 21:07:18 +00:00
gitypes.h gitypes: Fix integer values of GIInfoType 2024-02-06 13:40:20 +00:00
giunioninfo.c Merge branch 'gi-info-new' into 'main' 2024-02-08 10:34:40 +00:00
giunioninfo.h giunioninfo: Split success and return value for get_discriminator_offset() 2024-02-06 13:34:17 +00:00
giunresolvedinfo.c giunresolvedinfo: Port documentation to gi-docgen and update 2023-12-18 14:14:16 +00:00
giunresolvedinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
givalueinfo.c girepository: Split GIValueInfo out of gienuminfo.c 2024-01-18 13:15:22 +00:00
givalueinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
givfuncinfo.c gibaseinfo: Rename gi_info_new() to gi_base_info_new() 2024-02-08 10:34:40 +00:00
givfuncinfo.h girepository: Add type-checking cast macros 2024-01-18 13:15:22 +00:00
gthash.c girrepository: Use standard int sized types instead of g[u]int* 2024-01-16 18:40:42 +01:00
meson.build girepository: Update gi-compile-repository and use it to compile GIRs 2024-01-31 11:13:16 +00:00