libmicrohttpd
[Top][All Lists]
Advanced

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

[libmicrohttpd] enum size


From: simon h
Subject: [libmicrohttpd] enum size
Date: Tue, 5 Jun 2012 14:40:41 +0100

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.

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?
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?

btsimonh



reply via email to

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