[gnutls-devel] [sr #108623] gnutls for Windows port.

Bjørn Christensen INVALID.NOREPLY at gnu.org
Wed Jul 30 15:14:03 CEST 2014


URL:
  <http://savannah.gnu.org/support/?108623>

                 Summary: gnutls for Windows port.
                 Project: GnuTLS
            Submitted by: cybear
            Submitted on: Wed 30 Jul 2014 01:14:01 PM GMT
                Category: Core library
                Priority: 5 - Normal
                Severity: 3 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: None

    _______________________________________________________

Details:

The declaration of the gnutls memory function casuses problems.

It is all the memory function but I will try and describe the problem with
gnutls_free.

gnutls_free is declared as follows:
typedef void (*gnutls_free_function) (void *);
extern gnutls_free_function gnutls_free;

when cross-compiled and made to a windows .lib file _fnutls_free is not found
in the library because the declaration misses a __declspec(dllimport).

typedef void (*gnutls_free_function) (void *);
extern __declspec(dllimport) gnutls_free_function gnutls_free;

this is one solution but since the headers is platform independant right now,
a better solution could be to convert the gnutls_free to a real function and
have a placeholder for the gnutls_free_function_pointer that it could call.
void gnutls_free(void *p)
{
   (*gnutls_free_function_pointer)(p);
}

all the function calls in the gnutls library is ok since for functions the
__declspec(dllimport) is implicit.






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/support/?108623>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




More information about the Gnutls-devel mailing list