libmicrohttpd
[Top][All Lists]
Advanced

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

[libmicrohttpd] Help with a change in the code with version 0.9.71


From: Chris
Subject: [libmicrohttpd] Help with a change in the code with version 0.9.71
Date: Fri, 6 Nov 2020 14:45:39 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

Hello,

I build my own Windows DLL with Libmicrohttpd. This week I downloaded Version 0.9.71 and now I have a warning that I can't seem to fix.

I appologize ahead of time if this has been discussed on the list, I have been busy with other things and have not subscribed for a little while.

I would appreciate some guidance. It would seem that the prototype for some of the callback functions have changed.

Here are my warnings...

httpd.c(485) : warning C4133: 'function' : incompatible types - from 'int (__cdecl *)(void *,const sockaddr *,socklen_t)' to 'MHD_AcceptPolicyCallback' httpd.c(487) : warning C4133: 'function' : incompatible types - from 'int (__cdecl *)(void *,MHD_Connection *,const char *,const char *,const char *,const char *,size_t *,void **)' to 'MHD_AccessHandlerCallback' httpd.c(689) : warning C4133: 'function' : incompatible types - from 'int (__cdecl *)(void *,MHD_ValueKind,const char *,const char *,const char *,const char *,const char *,uint64_t,size_t)' to 'MHD_PostDataIterator' httpd.c(732) : warning C4133: 'function' : incompatible types - from 'int (__cdecl *)(void *,MHD_ValueKind,const char *,const char *)' to 'MHD_KeyValueIterator'

Right now I am building with Visual Studio 2008  but I get the same warnings with Visual Studio 2019.

I'm sure there is a simple solution but I have not figured it out.

Here are my callback prototypes...

  int
  AccessHandlerCallback
  (
    void* cls,
    struct MHD_Connection* connection,
    const char* url,
    const char* method,
    const char* version,
    const char* upload_data,
    size_t* upload_data_size,
    void** con_cls
  );

  int
  AcceptPolicyCallback
  (
    void* cls,
    const struct sockaddr* addr,
    socklen_t addrlen
  );

  int
  PostDataIterator
  (
    void* coninfo_cls,
    enum MHD_ValueKind kind,
    const char* key,
    const char* filename,
    const char* content_type,
    const char* transfer_encoding,
    const char* data,
    uint64_t off,
    size_t size
  );

  int
  KeyValueIterator
  (
    void* cls,
    enum MHD_ValueKind kind,
    const char* key,
    const char* value
  );

Thanks,

Chris





reply via email to

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