64-bit cleanliness fixes.

Sat Jan 10 00:11:12 2004  Manish Singh  <yosh@gimp.org>

        * glib/gutils.h (g_bit_nth_lsf,g_bit_nth_msf): 64-bit cleanliness
        fixes.

        * docs/reference/glib/tmpl/misc_utils.sgml: update to reflect the
        above take gulongs now. My docs suck, someone should revisit it.
This commit is contained in:
Manish Singh
2004-01-10 08:20:26 +00:00
committed by Manish Singh
parent 1147ef896f
commit a723c99dc9
8 changed files with 69 additions and 19 deletions

View File

@@ -1,9 +1,17 @@
Sat Jan 10 00:11:12 2004 Manish Singh <yosh@gimp.org>
* glib/gutils.h (g_bit_nth_lsf,g_bit_nth_msf): 64-bit cleanliness
fixes.
* docs/reference/glib/tmpl/misc_utils.sgml: update to reflect the
above take gulongs now. My docs suck, someone should revisit it.
Tue Jan 6 15:38:30 2004 Owen Taylor <otaylor@redhat.com>
* glib/gutils.h: Check defined (__OPTIMIZE__) not
__OPTIMIZE__. (Zack Rusin)
Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
* glib/gstrfuncs.c: Fixed a bad pointer comparison in
g_ascii_strtod that came up in fa_IR locale (#126640, Behdad
@@ -11,7 +19,7 @@ Tue Jan 6 15:38:30 2004 Owen Taylor <otaylor@redhat.com>
* tests/strtod-test.c: Fixed the tests to catch the above.
Sat Nov 22 14:16:51.15 2003 Andrew Lanoix <alanoix@umich.edu>
Sat Nov 22 14:16:51.15 2003 Andrew Lanoix <alanoix@umich.edu>
* glib/giowin32.c: Bind inter-thread comminication
sockets to INADDR_LOOPBACK instead of INADDR_ANY.

View File

@@ -1,9 +1,17 @@
Sat Jan 10 00:11:12 2004 Manish Singh <yosh@gimp.org>
* glib/gutils.h (g_bit_nth_lsf,g_bit_nth_msf): 64-bit cleanliness
fixes.
* docs/reference/glib/tmpl/misc_utils.sgml: update to reflect the
above take gulongs now. My docs suck, someone should revisit it.
Tue Jan 6 15:38:30 2004 Owen Taylor <otaylor@redhat.com>
* glib/gutils.h: Check defined (__OPTIMIZE__) not
__OPTIMIZE__. (Zack Rusin)
Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
* glib/gstrfuncs.c: Fixed a bad pointer comparison in
g_ascii_strtod that came up in fa_IR locale (#126640, Behdad
@@ -11,7 +19,7 @@ Tue Jan 6 15:38:30 2004 Owen Taylor <otaylor@redhat.com>
* tests/strtod-test.c: Fixed the tests to catch the above.
Sat Nov 22 14:16:51.15 2003 Andrew Lanoix <alanoix@umich.edu>
Sat Nov 22 14:16:51.15 2003 Andrew Lanoix <alanoix@umich.edu>
* glib/giowin32.c: Bind inter-thread comminication
sockets to INADDR_LOOPBACK instead of INADDR_ANY.

View File

@@ -1,9 +1,17 @@
Sat Jan 10 00:11:12 2004 Manish Singh <yosh@gimp.org>
* glib/gutils.h (g_bit_nth_lsf,g_bit_nth_msf): 64-bit cleanliness
fixes.
* docs/reference/glib/tmpl/misc_utils.sgml: update to reflect the
above take gulongs now. My docs suck, someone should revisit it.
Tue Jan 6 15:38:30 2004 Owen Taylor <otaylor@redhat.com>
* glib/gutils.h: Check defined (__OPTIMIZE__) not
__OPTIMIZE__. (Zack Rusin)
Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
* glib/gstrfuncs.c: Fixed a bad pointer comparison in
g_ascii_strtod that came up in fa_IR locale (#126640, Behdad
@@ -11,7 +19,7 @@ Tue Jan 6 15:38:30 2004 Owen Taylor <otaylor@redhat.com>
* tests/strtod-test.c: Fixed the tests to catch the above.
Sat Nov 22 14:16:51.15 2003 Andrew Lanoix <alanoix@umich.edu>
Sat Nov 22 14:16:51.15 2003 Andrew Lanoix <alanoix@umich.edu>
* glib/giowin32.c: Bind inter-thread comminication
sockets to INADDR_LOOPBACK instead of INADDR_ANY.

View File

@@ -1,9 +1,17 @@
Sat Jan 10 00:11:12 2004 Manish Singh <yosh@gimp.org>
* glib/gutils.h (g_bit_nth_lsf,g_bit_nth_msf): 64-bit cleanliness
fixes.
* docs/reference/glib/tmpl/misc_utils.sgml: update to reflect the
above take gulongs now. My docs suck, someone should revisit it.
Tue Jan 6 15:38:30 2004 Owen Taylor <otaylor@redhat.com>
* glib/gutils.h: Check defined (__OPTIMIZE__) not
__OPTIMIZE__. (Zack Rusin)
Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
* glib/gstrfuncs.c: Fixed a bad pointer comparison in
g_ascii_strtod that came up in fa_IR locale (#126640, Behdad
@@ -11,7 +19,7 @@ Tue Jan 6 15:38:30 2004 Owen Taylor <otaylor@redhat.com>
* tests/strtod-test.c: Fixed the tests to catch the above.
Sat Nov 22 14:16:51.15 2003 Andrew Lanoix <alanoix@umich.edu>
Sat Nov 22 14:16:51.15 2003 Andrew Lanoix <alanoix@umich.edu>
* glib/giowin32.c: Bind inter-thread comminication
sockets to INADDR_LOOPBACK instead of INADDR_ANY.

View File

@@ -1,9 +1,17 @@
Sat Jan 10 00:11:12 2004 Manish Singh <yosh@gimp.org>
* glib/gutils.h (g_bit_nth_lsf,g_bit_nth_msf): 64-bit cleanliness
fixes.
* docs/reference/glib/tmpl/misc_utils.sgml: update to reflect the
above take gulongs now. My docs suck, someone should revisit it.
Tue Jan 6 15:38:30 2004 Owen Taylor <otaylor@redhat.com>
* glib/gutils.h: Check defined (__OPTIMIZE__) not
__OPTIMIZE__. (Zack Rusin)
Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
* glib/gstrfuncs.c: Fixed a bad pointer comparison in
g_ascii_strtod that came up in fa_IR locale (#126640, Behdad
@@ -11,7 +19,7 @@ Tue Jan 6 15:38:30 2004 Owen Taylor <otaylor@redhat.com>
* tests/strtod-test.c: Fixed the tests to catch the above.
Sat Nov 22 14:16:51.15 2003 Andrew Lanoix <alanoix@umich.edu>
Sat Nov 22 14:16:51.15 2003 Andrew Lanoix <alanoix@umich.edu>
* glib/giowin32.c: Bind inter-thread comminication
sockets to INADDR_LOOPBACK instead of INADDR_ANY.

View File

@@ -1,9 +1,17 @@
Sat Jan 10 00:11:12 2004 Manish Singh <yosh@gimp.org>
* glib/gutils.h (g_bit_nth_lsf,g_bit_nth_msf): 64-bit cleanliness
fixes.
* docs/reference/glib/tmpl/misc_utils.sgml: update to reflect the
above take gulongs now. My docs suck, someone should revisit it.
Tue Jan 6 15:38:30 2004 Owen Taylor <otaylor@redhat.com>
* glib/gutils.h: Check defined (__OPTIMIZE__) not
__OPTIMIZE__. (Zack Rusin)
Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
* glib/gstrfuncs.c: Fixed a bad pointer comparison in
g_ascii_strtod that came up in fa_IR locale (#126640, Behdad
@@ -11,7 +19,7 @@ Tue Jan 6 15:38:30 2004 Owen Taylor <otaylor@redhat.com>
* tests/strtod-test.c: Fixed the tests to catch the above.
Sat Nov 22 14:16:51.15 2003 Andrew Lanoix <alanoix@umich.edu>
Sat Nov 22 14:16:51.15 2003 Andrew Lanoix <alanoix@umich.edu>
* glib/giowin32.c: Bind inter-thread comminication
sockets to INADDR_LOOPBACK instead of INADDR_ANY.

View File

@@ -206,10 +206,11 @@ freed when no longer needed.
<para>
Find the position of the first bit set in @mask, searching from (but not
including) @nth_bit upwards. Bits are numbered from 0 (least significant)
to 31. To start searching from the 0th bit, set @nth_bit to -1.
to sizeof(#gulong) * 8 - 1 (31 or 63, usually). To start searching from the
0th bit, set @nth_bit to -1.
</para>
@mask: a #guint32 containing up to 32 bit flags.
@mask: a #gulong containing flags.
@nth_bit: the index of the bit to start the search from.
@Returns: the index of the first bit set which is higher than @nth_bit.
@@ -218,10 +219,11 @@ to 31. To start searching from the 0th bit, set @nth_bit to -1.
<para>
Find the position of the first bit set in @mask, searching from (but not
including) @nth_bit downwards. Bits are numbered from 0 (least significant)
to 31. To start searching from the 31st bit, set @nth_bit to 32 or -1.
to sizeof(#gulong) * 8 - 1 (31 or 63, usually). To start searching from the
last bit, set @nth_bit to -1 or GLIB_SIZEOF_LONG * 8.
</para>
@mask: a #guint32 containing up to 32 bit flags.
@mask: a #gulong containing flags.
@nth_bit: the index of the bit to start the search from.
@Returns: the index of the first bit set which is lower than @nth_bit.

View File

@@ -232,10 +232,10 @@ g_bit_nth_lsf (gulong mask,
do
{
nth_bit++;
if (mask & (1 << (gulong) nth_bit))
if (mask & (1UL << nth_bit))
return nth_bit;
}
while (nth_bit < 31);
while (nth_bit < ((GLIB_SIZEOF_LONG * 8) - 1));
return -1;
}
G_INLINE_FUNC gint
@@ -247,7 +247,7 @@ g_bit_nth_msf (gulong mask,
do
{
nth_bit--;
if (mask & (1 << (gulong) nth_bit))
if (mask & (1UL << nth_bit))
return nth_bit;
}
while (nth_bit > 0);