gnutls-devel
[Top][All Lists]
Advanced

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

Re: guile testsuite failure (gnutls 3.0.1 and later) and armel and mipse


From: Ludovic Courtès
Subject: Re: guile testsuite failure (gnutls 3.0.1 and later) and armel and mipsel
Date: Sun, 06 Nov 2011 22:35:45 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux)

Hi Nikos,

Nikos Mavrogiannopoulos <address@hidden> skribis:

> On 11/06/2011 09:57 PM, Ludovic Courtès wrote:
>
>>>> Ideally, though, GnuTLS would have a configure check to determine what
>>>> _FILE_OFFSET_BITS value Guile is expecting, but I can’t think of any
>>>> reliable way to do that.  Ideas?
>>>
>>> How does the size of off_t affect the gnutls-guile code? Which code
>>> does it affect? (could it be written so that it is independent of that
>>> size?)
>> The file guile/src/core.c contains code that manipulates the scm_t_port
>> structure, which is defined by Guile and contains off_t fields.  So the
>> gnutls-guile code thinks scm_t_port is 120-byte whereas libguile thinks
>> it’s 96-byte long, and more generally they use different field offsets.
>> The code that uses scm_t_port in gnutls-guile relates to the “session
>> record port” (info "(gnutls-guile) Input and Output").
>
> I don't quite understand the issue. Ok I see access of the structure in
> core.c but how is that an issue? Aren't the headers that define
> scm_t_port correct? (in systems where is 120-byte to actually define an
> 120-byte structure and otherwise?). Why would the size of off_t cause
> issues if the header is the same in guile and gnutls? Is it a guile
> issue or gnutls' guile code?

Try this:

  #include <libguile.h>
  int main () {
    printf ("%i -> %i\n", _FILE_OFFSET_BITS, sizeof (scm_t_port));
  }
  
Compile & run with -D_FILE_OFFSET_BITS=32 then -D_FILE_OFFSET_BITS=64:

  32 -> 96
  64 -> 120

Problems arise when libguile is compiled, say, with _FILE_OFFSET_BITS=32
whereas gnutls-guile is compiled with _FILE_OFFSET_BITS=64.

Does that clarify a bit?

Thanks,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]