Sukender wrote:
Daniel Stenberg wrote:
On Wed, 8 Apr 2009, Sukender wrote:

I'm not really sure about chat to remove/change. Do you have an idea? Should we use a special flag that means "I'm using directly mprintf.c, so don't set printf-like functions to be imported"?

I will commit my changes in include/curl/curl.h and mprintf.h and such. They are not really intrusive. However, if you find the changes unsuitable, I'll modify or rollback anything you want. Just tell me in that case.

If you post your suggested changes here as a patch we can discuss them before you commit anything. That's a better way...


In curl.h, line 100 the code looks like:

#if (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)) && \
    !defined(CURL_STATICLIB)
#if defined(BUILDING_LIBCURL)
#define CURL_EXTERN  __declspec(dllexport)
#else
#define CURL_EXTERN  __declspec(dllimport)
#endif
#else

#ifdef CURL_HIDDEN_SYMBOLS
#define CURL_EXTERN CURL_EXTERN_SYMBOL
#else
#define CURL_EXTERN
#endif
#endif


My question is: why don't CURL_HIDDEN_SYMBOLS is tested when we're in Win32 DLL? Isn't there something missing here?


And about the define to avoid DLL linkage problem, I suggest:
#ifdef USES_DIRECT_CURL_UTILITIES
 #define CURL_UTILITY_EXTERN
#else
 #define CURL_UTILITY_EXTERN CURL_EXTERN
#endif

And changing CURL_EXTERN to CURL_UTILITY_EXTERN when needed. For example with curl_strequal, we would change:
 CURL_EXTERN int (curl_strequal)(const char *s1, const char *s2);
to
 CURL_UTILITY_EXTERN int (curl_strequal)(const char *s1, const char *s2);

But that's not clear if it sounds coherent with my first remark... Any idea?


And another little question: What, in plain english, means the definition of "CURL_HIDDEN_SYMBOLS"? 
Is it "Hide some symbols" or "Activate some symbols that are hidden otherwise"? Because 
lib558.c reads
 #if !defined(CURL_HIDDEN_SYMBOLS)
and then uses symbols like Curl_hash_destroy(). I thought it was the opposite...

--
Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

Reply via email to