Re: solution for Making glib 2.00, 2.02



Miroslaw Dobrzanski-Neumann <mne mosaic-ag com> writes:

> On Wed, Apr 17, 2002 at 11:14:36AM +0200, Matthijs van Henten wrote:
> > Hello,
> > I just wanted to report the following (little) thing I ran into when doing
> > 'make' for glib2.00 and 2.02:
> > 
> > 'make' broke off w following error:
> > 
> > Making all in libcharset
> > make[3]: Entering directory `/usr/temp/glib-2.0.0/glib/libcharset'
> > make[3]: Nothing to be done for `all'.
> > make[3]: Leaving directory `/usr/temp/glib-2.0.0/glib/libcharset'
> > make[3]: Entering directory `/usr/temp/glib-2.0.0/glib'
> > /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I..
> > -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION     -g
> > -O2 -Wall -D_REENTRANT -c giounix.c
> > gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -DG_LOG_DOMAIN=\"GLib\"
> > -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION -g -O2 -Wall -D_REENTRANT -c
> > giounix.c  -fPIC -DPIC -o giounix.o
> > giounix.c: In function `g_io_unix_read':
> > giounix.c:181: `SSIZE_MAX' undeclared (first use in this function)
> > giounix.c:181: (Each undeclared identifier is reported only once
> > giounix.c:181: for each function it appears in.)
> > make[3]: *** [giounix.lo] Error 1
> > make[3]: Leaving directory `/usr/temp/glib-2.0.0/glib'
> > make[2]: *** [all-recursive] Error 1
> > make[2]: Leaving directory `/usr/temp/glib-2.0.0/glib'
> > make[1]: *** [all-recursive] Error 1
> > make[1]: Leaving directory `/usr/temp/glib-2.0.0'
> > make: *** [all-recursive-am] Error 2
> > 
> > I solved it by adding
> > 
> > "#include <bits/posix1_lim.h>"
> 
> the file bits/posix1_lim.h is linux specific; one should always use
> #include <limits.h>

The correct solution to get the contents of the header would be:

 #define _POSIX_SOURCE

but, as you say, there should be a GLib #define for this, I think.

> if glib defines gssize it should also define SSIZE_MAX, if not yet
> present

We should #define G_MAXSIZE, G_MAXSSIZE, instead of infringing on the 
C libraries namespace.

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]