summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-10-11 08:13:35 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-10-11 08:13:35 +0900
commit8ed6324a31a3f07cee3c604ccf410d9a4d7048df (patch)
treedfed8dbf99752e48ff006f9250565246b885f9fc /src
parentf7a43e9dbc276881f24ece012fe5c4ce4f9927db (diff)
ecore-con - followup commit to curl dynamic load - support win and osx names
Diffstat (limited to 'src')
-rw-r--r--src/lib/ecore_con/ecore_con_url.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/lib/ecore_con/ecore_con_url.c b/src/lib/ecore_con/ecore_con_url.c
index 959ca94af3..4e4c19dd00 100644
--- a/src/lib/ecore_con/ecore_con_url.c
+++ b/src/lib/ecore_con/ecore_con_url.c
@@ -247,9 +247,26 @@ _c_init(void)
247 if (_c_fail) return EINA_FALSE; 247 if (_c_fail) return EINA_FALSE;
248 _c = calloc(1, sizeof(Ecore_Con_Curl)); 248 _c = calloc(1, sizeof(Ecore_Con_Curl));
249 if (!_c) goto error; 249 if (!_c) goto error;
250 _c->mod = eina_module_new("libcurl.so.4"); 250
251#define LOAD(x) \
252 if (!_c->mod) { \
253 if ((_c->mod = eina_module_new(x))) { \
254 if (!eina_module_load(_c->mod)) { \
255 eina_module_free(_c->mod); \
256 _c->mod = NULL; \
257 } \
258 } \
259 }
260#if defined(_WIN32) || defined(__CYGWIN__)
261 LOAD("libcurl.dll"); // try 1
262 LOAD("curllib.dll"); // if fail try 2
263#elif defined(__APPLE__) && defined(__MACH__)
264 LOAD("libcurl.4.dylib"); // try 1
265 LOAD("libcurl.so.4"); // if fail try 2
266#else
267 LOAD("libcurl.so.4"); // try only
268#endif
251 if (!_c->mod) goto error; 269 if (!_c->mod) goto error;
252 if (!eina_module_load(_c->mod)) goto error;
253 270
254#define SYM(x) if (!(_c->x = eina_module_symbol_get(_c->mod, #x))) goto error 271#define SYM(x) if (!(_c->x = eina_module_symbol_get(_c->mod, #x))) goto error
255 SYM(curl_global_init); 272 SYM(curl_global_init);