Add G_MAXSIZE, define in terms of G_MAXUfoo.

Sun Jan 11 16:13:20 2004  Manish Singh  <yosh@gimp.org>

        * configure.in: Add G_MAXSIZE, define in terms of G_MAXUfoo.

        * tests/type-test.c: Add test for G_MAXSIZE.

        * glibconfig.h.win32.in: Cleanup, add some missing bits.
This commit is contained in:
Manish Singh 2004-01-12 00:16:18 +00:00 committed by Manish Singh
parent 3fa27319e9
commit 31a1fedf68
9 changed files with 63 additions and 4 deletions

View File

@ -1,3 +1,11 @@
Sun Jan 11 16:13:20 2004 Manish Singh <yosh@gimp.org>
* configure.in: Add G_MAXSIZE, define in terms of G_MAXUfoo.
* tests/type-test.c: Add test for G_MAXSIZE.
* glibconfig.h.win32.in: Cleanup, add some missing bits.
Sun Jan 11 16:05:35 2004 Manish Singh <yosh@gimp.org>
* glib/giounix.c: #define _POSIX_SOURCE for SSIZE_MAX. Fixes #128853.

View File

@ -1,3 +1,11 @@
Sun Jan 11 16:13:20 2004 Manish Singh <yosh@gimp.org>
* configure.in: Add G_MAXSIZE, define in terms of G_MAXUfoo.
* tests/type-test.c: Add test for G_MAXSIZE.
* glibconfig.h.win32.in: Cleanup, add some missing bits.
Sun Jan 11 16:05:35 2004 Manish Singh <yosh@gimp.org>
* glib/giounix.c: #define _POSIX_SOURCE for SSIZE_MAX. Fixes #128853.

View File

@ -1,3 +1,11 @@
Sun Jan 11 16:13:20 2004 Manish Singh <yosh@gimp.org>
* configure.in: Add G_MAXSIZE, define in terms of G_MAXUfoo.
* tests/type-test.c: Add test for G_MAXSIZE.
* glibconfig.h.win32.in: Cleanup, add some missing bits.
Sun Jan 11 16:05:35 2004 Manish Singh <yosh@gimp.org>
* glib/giounix.c: #define _POSIX_SOURCE for SSIZE_MAX. Fixes #128853.

View File

@ -1,3 +1,11 @@
Sun Jan 11 16:13:20 2004 Manish Singh <yosh@gimp.org>
* configure.in: Add G_MAXSIZE, define in terms of G_MAXUfoo.
* tests/type-test.c: Add test for G_MAXSIZE.
* glibconfig.h.win32.in: Cleanup, add some missing bits.
Sun Jan 11 16:05:35 2004 Manish Singh <yosh@gimp.org>
* glib/giounix.c: #define _POSIX_SOURCE for SSIZE_MAX. Fixes #128853.

View File

@ -1,3 +1,11 @@
Sun Jan 11 16:13:20 2004 Manish Singh <yosh@gimp.org>
* configure.in: Add G_MAXSIZE, define in terms of G_MAXUfoo.
* tests/type-test.c: Add test for G_MAXSIZE.
* glibconfig.h.win32.in: Cleanup, add some missing bits.
Sun Jan 11 16:05:35 2004 Manish Singh <yosh@gimp.org>
* glib/giounix.c: #define _POSIX_SOURCE for SSIZE_MAX. Fixes #128853.

View File

@ -1,3 +1,11 @@
Sun Jan 11 16:13:20 2004 Manish Singh <yosh@gimp.org>
* configure.in: Add G_MAXSIZE, define in terms of G_MAXUfoo.
* tests/type-test.c: Add test for G_MAXSIZE.
* glibconfig.h.win32.in: Cleanup, add some missing bits.
Sun Jan 11 16:05:35 2004 Manish Singh <yosh@gimp.org>
* glib/giounix.c: #define _POSIX_SOURCE for SSIZE_MAX. Fixes #128853.

View File

@ -2085,6 +2085,8 @@ typedef unsigned $glib_size_type_define gsize;
#define G_GSIZE_MODIFIER $gsize_modifier
#define G_GSSIZE_FORMAT $gssize_format
#define G_GSIZE_FORMAT $gsize_format
#define G_MAXSIZE G_MAXU$glib_msize_type
_______EOF
if test -z "$glib_unknown_void_p"; then
@ -2402,16 +2404,19 @@ short)
gsize_modifier='"h"'
gsize_format='"hu"'
gssize_format='"hi"'
glib_msize_type='SHRT'
;;
int)
gsize_modifier='""'
gsize_format='"u"'
gssize_format='"i"'
glib_msize_type='INT'
;;
long)
gsize_modifier='"l"'
gsize_format='"lu"'
gssize_format='"li"'
glib_msize_type='LONG'
;;
esac

View File

@ -28,10 +28,6 @@ G_BEGIN_DECLS
#define G_MAXLONG LONG_MAX
#define G_MAXULONG ULONG_MAX
#define G_MININT64 G_GINT64_CONSTANT(0x8000000000000000)
#define G_MAXINT64 G_GINT64_CONSTANT(0x7fffffffffffffff)
#define G_MAXUINT64 G_GINT64_CONSTANT(0xffffffffffffffffU)
typedef signed char gint8;
typedef unsigned char guint8;
typedef signed short gint16;
@ -69,6 +65,11 @@ typedef unsigned __int64 guint64;
typedef signed int gssize;
typedef unsigned int gsize;
#define G_GSIZE_MODIFIER ""
#define G_GSSIZE_FORMAT "i"
#define G_GSIZE_FORMAT "u"
#define G_MAXSIZE G_MAXUINT
#define GPOINTER_TO_INT(p) ((gint) (p))
#define GPOINTER_TO_UINT(p) ((guint) (p))

View File

@ -41,6 +41,7 @@ main (int argc,
gushort gus;
guint gui;
gulong gul;
gssize gsz;
gshort gs;
gint gi;
glong gl;
@ -83,6 +84,10 @@ main (int argc,
gul++;
g_assert (gul == 0);
gsz = G_MAXSIZE;
gsz++;
g_assert (gsz == 0);
gs = G_MAXSHORT;
gs++;
g_assert (gs == G_MINSHORT);