Re: Compiling GLib2.6.4 - error : 'SSIZE'



On Wed, 2005-05-18 at 13:55 +0100, Clive Chapman wrote:
> Owen
> 
> I hope you don't mind me emailing you. I have just started to cross compile 
> GTK 2.6.7 for ARM and  I have a problem compiling Glib 2.6.4.
> 
> I saw your posting at;
> http://mail.gnome.org/archives/gtk-devel-list/2002-April/msg00117.html
> 
> Regarding a problem when running make to build glib. The file giounic.c fails 
> to compile with the following error;
> 
> giounix.c:185: error: `SSIZE_MAX' undeclared (first use in this function)
> 
> In the posting you suggest that the correct way to fix the problem is to 
> include the following statement;
> 
>  #define _POSIX_SOURCE
> 
> I am trying to compile glib 2.6.4 and I am having the same problem but the  
> #define _POSIX_SOURCE is already in giounix.c
> 
> Should I be doing something else  instead - I did find another article that 
> suggest I delete the two lines at line 185 and 186 (see them below)
> 
>   if (count > SSIZE_MAX)
> 	    count = SSIZE_MAX;
> 
> That doesn't seem like a good idea!

That's not a good idea.

If you want to just get things compiled, you can obviously add:
 
 #ifndef SSIZE_MAX
 #define SSIZE_MAX 0x7fffffff
 #endif

somewhere in that file. (that's the correct value for 32-bit machines
like the ARM)

As my mail said, the correct fix is to add G_MAXSSIZE in the same way
that G_MAXSIZE is defined.

Regards,
						Owen

Attachment: signature.asc
Description: This is a digitally signed message part



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