Glib String test core dumping.



Tom,
after a couple of tries,  I managed to get your suggestion to work to get Glib
compiled under SunOS.  I had to make sure that  HAVE_POLL was deliberately
undefined, and I put in your memory patch, and the whole thing compiled and
installed with only minor complaints.  The usual no prototype messages.

But when I ran the test programs, everything passed EXCEPT the gstring test which
core dumped.  I rebuilt it twice from scratch, with rehashes inbetween to ensure
a good compile, but it still cores.  Before I go instrumenting the code to trace
execution, have you are anyone else run into this problem, and if so, what did
you do to fix it?

Thanks
mike

Tom Geiger wrote:

> So Mike Johnson was saying...
> >
> > If anyone has sucessfully managed to compile glib without a poll,
> > (implied by the configure and header files) would you please give me
> > some hints about what you did differently.
>
> I just compiled glib for sunos 4.1.4, I had to comment out all HAVE_POLL
> defines in config.h, then make sure all HAVE_SYS_POLL_H defines are 1.
> My system does have /usr/include/poll.h linked to sys/poll.h
>
> The other problem I had was that in gmem.c in the function g_realloc there's
> a statement that says:
>
>         if (!mem)
>     {
>         p = (gpointer) realloc (NULL, size);
>     }
>           else
>
> This doesn't work on SunOS, it will always return NULL. so I had to change
> it to:
>
>         if (!mem)
>     {
>             //p = (gpointer) realloc (NULL, size);
>         p = (gpointer) malloc (size);
>         }
>         else
>
> This is how it was coded prior to glib1.2, so I'm not sure why it was changed.
>
> -Tom
>
>
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null





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