Re: GLib and 64-bit Windows
- From: Tor Lillqvist <tml iki fi>
- To: Jake Goulding <goulding vivisimo com>
- Cc: GTK Devel List <gtk-devel-list gnome org>
- Subject: Re: GLib and 64-bit Windows
- Date: Fri, 20 Apr 2007 00:23:33 +0300
Jake Goulding writes:
Some comments inline below:
> +#if defined(_MSC_VER) && defined (_M_X64)
It would be better to separate things that are compiler-dependent and
things that are platform dependent. If and when gcc becomes available
for 64-bit Windows, _MSC_VER won't be defined when using it.
Also, the current mingw (gcc for x86) seems to not predefine _M_IX86,
that gets defined only if one includes <windows.h>. Thus I would
assume a gcc for 64-bit Windows will do the same. Testing for _WIN64
is probably a better choice than _M_X64.
So, for 64-bit Windows in general, using #ifdef _WIN64 is probably
better. Then, use _MSC_VER to differentiate between MSVC and others.
> +typedef signed __int64 gssize;
> +typedef unsigned __int64 gsize;
These are MSVC-specific, for gcc we can presumably use signed/unsigned
long long.
> struct _GPollFD
> {
> - gint fd;
> +// gint fd;
> + gpointer fd;
We can't change GPollFD::fd to a gpointer, that would break user
code. This is already changed in trunk as follows:
struct _GPollFD
{
#if defined (G_OS_WIN32) && GLIB_SIZEOF_VOID_P == 8
gint64 fd;
#else
gint fd;
#endif
...
> g_date_set_time (GDate *date,
> - GTime *time_)
> + GTime time_)
Already fixed in trunk and glib-2-12.
--tml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]