libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] enum size


From: Christian Grothoff
Subject: Re: [libmicrohttpd] enum size
Date: Thu, 07 Jun 2012 18:58:59 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20120506 Lightning/1.0b1 Icedove/3.0.11

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/05/2012 03:40 PM, simon h wrote:
> Dear all,
> I'm looking to use libmicrohttpd to implement some webservices style
> interfaces on modules build for a windows environment.
> 
> I've downloaded the last windows binaries (0.4.5 ?) and notice the
> header uses a lot of enums, and enums are passed as parameters and
> exist in structures.

While not all that recent, there is at least:
ftp://ftp.gnu.org/pub/gnu/libmicrohttpd/libmicrohttpd-0.9.17-w32.zip

which is MUCH more recent than 0.4.5. How about trying this version first?

> problem is we use both BCB4 and VC6 and VS2008.
> These have different sizes for enums....  VS2008 always makes them 32
> bit.  BCB4 sizes them according to the biggest value....
> 
> 1. What compiler was used to make the windows binaries?

Also, I believe all of those are compiled using MinGW.

> 2. I know BCB4 is dead old, but if the binaries are 32 bit enums, then
> it might be an idea to add a value to the end of every enum to force
> use of 32 bit.  e.g.:
> 
> enum MHD_OPTION
> {
>   MHD_OPTION_END = 0,
>   MHD_OPTION_CONNECTION_MEMORY_LIMIT = 1,
>   MHD_OPTION_CONNECTION_LIMIT = 2,
>   MHD_OPTION_CONNECTION_TIMEOUT = 3,
>   MHD_OPTION_NOTIFY_COMPLETED = 4,
>   MHD_OPTION_PER_IP_CONNECTION_LIMIT = 5,
>   MHD_OPTION_SOCK_ADDR = 6,
>   MHD_OPTION_URI_LOG_CALLBACK = 7,
>   MHD_OPTION_HTTPS_MEM_KEY = 8,
>   MHD_OPTION_HTTPS_MEM_CERT = 9,
>   MHD_OPTION_CRED_TYPE = 10,
>   MHD_OPTION_PROTOCOL_VERSION = 11,
>   MHD_OPTION_CIPHER_ALGORITHM = 12,
>   MHD_OPTION_EXTERNAL_LOGGER = 13,
>   MHD_OPTION_THREAD_POOL_SIZE = 14,
>   MHD_OPTION_ARRAY = 15
>   MHD_OPTION_FORCE32 = 0xFFFFFFFF
> };
> 
> 3. structure packing is not explicit; it may be an issue?

I don't understand the problem.  In any case, I hear compiling MHD for
W32 is not all that hard (but I don't use W32).

Happy hacking!

Christian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/Q3dMACgkQv2Bwi0hCbH5/0wCfe5YEc20GjSM/GHV2y3Yph8uy
DUEAn2UbIzOYivU+zNmPvVuPydK2Zle5
=ypbf
-----END PGP SIGNATURE-----



reply via email to

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