summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertise.dev>2020-05-04 13:49:52 -0300
committerFelipe Magno de Almeida <felipe@expertise.dev>2020-05-04 22:11:44 -0300
commit4d714f44e1c4580870bc250e3102a0a56cde83d1 (patch)
treeac7bfd5d52c8af2e05004be46cb5610e24d97dfe
parentdf31f3b168af913d5cb280812cdc80fb93822796 (diff)
Commit to be squashed in other commits
-rw-r--r--src/lib/eina/eina_inline_lock_win32.x38
-rw-r--r--src/lib/eina/eina_lock.h68
-rw-r--r--src/lib/evil/evil_fcntl.c5
-rw-r--r--src/lib/evil/evil_unistd.c8
-rw-r--r--src/lib/evil/evil_windows.h6
-rw-r--r--src/lib/evil/meson.build8
6 files changed, 64 insertions, 69 deletions
diff --git a/src/lib/eina/eina_inline_lock_win32.x b/src/lib/eina/eina_inline_lock_win32.x
index dc5c8659de..3787b743c3 100644
--- a/src/lib/eina/eina_inline_lock_win32.x
+++ b/src/lib/eina/eina_inline_lock_win32.x
@@ -48,8 +48,8 @@ typedef void (*Eina_Lock_Bt_Func) ();
48#include "eina_inlist.h" 48#include "eina_inlist.h"
49#endif 49#endif
50 50
51EAPI void _eina_lock_debug_abort(int err, const char *fn, const volatile void *ptr); 51EINA_API void _eina_lock_debug_abort(int err, const char *fn, const volatile void *ptr);
52EAPI void _eina_lock_debug_deadlock(const char *fn, const volatile void *ptr); 52EINA_API void _eina_lock_debug_deadlock(const char *fn, const volatile void *ptr);
53 53
54#define EINA_LOCK_ABORT_DEBUG(err, fn, ptr) \ 54#define EINA_LOCK_ABORT_DEBUG(err, fn, ptr) \
55 _eina_lock_debug_abort(err, #fn, ptr) 55 _eina_lock_debug_abort(err, #fn, ptr)
@@ -75,7 +75,7 @@ typedef PCRITICAL_SECTION Eina_Spinlock;
75typedef Eina_Lock Eina_Spinlock; 75typedef Eina_Lock Eina_Spinlock;
76#endif 76#endif
77 77
78EAPI void eina_lock_debug(const Eina_Lock *mutex); 78EINA_API void eina_lock_debug(const Eina_Lock *mutex);
79 79
80/** @privatesection @{ */ 80/** @privatesection @{ */
81typedef HANDLE _Eina_Thread; 81typedef HANDLE _Eina_Thread;
@@ -121,24 +121,24 @@ struct _Eina_RWLock
121}; 121};
122/** @} privatesection */ 122/** @} privatesection */
123 123
124EAPI extern Eina_Bool _eina_threads_activated; 124EINA_API extern Eina_Bool _eina_threads_activated;
125 125
126#ifdef EINA_HAVE_DEBUG_THREADS 126#ifdef EINA_HAVE_DEBUG_THREADS
127EAPI extern int _eina_threads_debug; 127EINA_API extern int _eina_threads_debug;
128EAPI extern _Eina_Thread _eina_main_loop; 128EINA_API extern _Eina_Thread _eina_main_loop;
129EAPI extern Eina_Lock _eina_tracking_lock; 129EINA_API extern Eina_Lock _eina_tracking_lock;
130EAPI extern Eina_Inlist *_eina_tracking; 130EINA_API extern Eina_Inlist *_eina_tracking;
131#endif 131#endif
132 132
133EAPI Eina_Bool eina_lock_new(Eina_Lock *mutex); 133EINA_API Eina_Bool eina_lock_new(Eina_Lock *mutex);
134EAPI void eina_lock_free(Eina_Lock *mutex); 134EINA_API void eina_lock_free(Eina_Lock *mutex);
135EAPI Eina_Lock_Result eina_lock_take(Eina_Lock *mutex); 135EINA_API Eina_Lock_Result eina_lock_take(Eina_Lock *mutex);
136EAPI Eina_Lock_Result eina_lock_take_try(Eina_Lock *mutex); 136EINA_API Eina_Lock_Result eina_lock_take_try(Eina_Lock *mutex);
137EAPI Eina_Lock_Result eina_lock_release(Eina_Lock *mutex); 137EINA_API Eina_Lock_Result eina_lock_release(Eina_Lock *mutex);
138EAPI Eina_Bool eina_condition_new(Eina_Condition *cond, Eina_Lock *mutex); 138EINA_API Eina_Bool eina_condition_new(Eina_Condition *cond, Eina_Lock *mutex);
139EAPI void eina_condition_free(Eina_Condition *cond); 139EINA_API void eina_condition_free(Eina_Condition *cond);
140EAPI Eina_Bool eina_condition_wait(Eina_Condition *cond); 140EINA_API Eina_Bool eina_condition_wait(Eina_Condition *cond);
141EAPI Eina_Bool eina_condition_broadcast(Eina_Condition *cond); 141EINA_API Eina_Bool eina_condition_broadcast(Eina_Condition *cond);
142 142
143static inline Eina_Bool 143static inline Eina_Bool
144_eina_lock_new(Eina_Lock *mutex, Eina_Bool recursive) 144_eina_lock_new(Eina_Lock *mutex, Eina_Bool recursive)
diff --git a/src/lib/eina/eina_lock.h b/src/lib/eina/eina_lock.h
index 5ee177b873..cacb3c5f62 100644
--- a/src/lib/eina/eina_lock.h
+++ b/src/lib/eina/eina_lock.h
@@ -121,7 +121,7 @@ EINA_API extern Eina_Error EINA_ERROR_NOT_MAIN_LOOP;
121 * 121 *
122 * @see eina_lock_free() 122 * @see eina_lock_free()
123 */ 123 */
124EAPI Eina_Bool eina_lock_new(Eina_Lock *mutex); 124EINA_API Eina_Bool eina_lock_new(Eina_Lock *mutex);
125 125
126/** 126/**
127 * @brief Initializes a new #Eina_Lock that is recursive. 127 * @brief Initializes a new #Eina_Lock that is recursive.
@@ -137,7 +137,7 @@ EAPI Eina_Bool eina_lock_new(Eina_Lock *mutex);
137 * @see eina_lock_free() 137 * @see eina_lock_free()
138 * @since 1.19 138 * @since 1.19
139 */ 139 */
140EAPI Eina_Bool eina_lock_recursive_new(Eina_Lock *mutex); 140EINA_API Eina_Bool eina_lock_recursive_new(Eina_Lock *mutex);
141 141
142/** 142/**
143 * @brief Deallocates an #Eina_Lock. 143 * @brief Deallocates an #Eina_Lock.
@@ -148,7 +148,7 @@ EAPI Eina_Bool eina_lock_recursive_new(Eina_Lock *mutex);
148 * 148 *
149 * @see eina_lock_new() 149 * @see eina_lock_new()
150 */ 150 */
151EAPI void eina_lock_free(Eina_Lock *mutex); 151EINA_API void eina_lock_free(Eina_Lock *mutex);
152 152
153/** 153/**
154 * @brief Attempts to take a lock. 154 * @brief Attempts to take a lock.
@@ -166,7 +166,7 @@ EAPI void eina_lock_free(Eina_Lock *mutex);
166 * @see eina_lock_take_try() 166 * @see eina_lock_take_try()
167 * @see eina_lock_release() 167 * @see eina_lock_release()
168 */ 168 */
169EAPI Eina_Lock_Result eina_lock_take(Eina_Lock *mutex); 169EINA_API Eina_Lock_Result eina_lock_take(Eina_Lock *mutex);
170 170
171/** 171/**
172 * @brief Attempts to take a lock if possible. 172 * @brief Attempts to take a lock if possible.
@@ -182,7 +182,7 @@ EAPI Eina_Lock_Result eina_lock_take(Eina_Lock *mutex);
182 * @see eina_lock_take() 182 * @see eina_lock_take()
183 * @see eina_lock_release() 183 * @see eina_lock_release()
184 */ 184 */
185EAPI Eina_Lock_Result eina_lock_take_try(Eina_Lock *mutex); 185EINA_API Eina_Lock_Result eina_lock_take_try(Eina_Lock *mutex);
186 186
187/** 187/**
188 * @brief Releases a lock. 188 * @brief Releases a lock.
@@ -198,7 +198,7 @@ EAPI Eina_Lock_Result eina_lock_take_try(Eina_Lock *mutex);
198 * @see eina_lock_take() 198 * @see eina_lock_take()
199 * @see eina_lock_take_try() 199 * @see eina_lock_take_try()
200 */ 200 */
201EAPI Eina_Lock_Result eina_lock_release(Eina_Lock *mutex); 201EINA_API Eina_Lock_Result eina_lock_release(Eina_Lock *mutex);
202 202
203/** 203/**
204 * @brief Prints debug information about a lock. 204 * @brief Prints debug information about a lock.
@@ -230,7 +230,7 @@ EINA_API void eina_lock_debug(const Eina_Lock *mutex);
230 * 230 *
231 * @see eina_condition_free() 231 * @see eina_condition_free()
232 */ 232 */
233EAPI Eina_Bool eina_condition_new(Eina_Condition *cond, Eina_Lock *mutex); 233EINA_API Eina_Bool eina_condition_new(Eina_Condition *cond, Eina_Lock *mutex);
234 234
235/** 235/**
236 * @brief Deallocates a condition variable. 236 * @brief Deallocates a condition variable.
@@ -241,7 +241,7 @@ EAPI Eina_Bool eina_condition_new(Eina_Condition *cond, Eina_Lock *mutex);
241 * 241 *
242 * @see eina_condition_new() 242 * @see eina_condition_new()
243 */ 243 */
244EAPI void eina_condition_free(Eina_Condition *cond); 244EINA_API void eina_condition_free(Eina_Condition *cond);
245 245
246/** 246/**
247 * @brief Causes a thread to wait until signaled by the condition. 247 * @brief Causes a thread to wait until signaled by the condition.
@@ -253,7 +253,7 @@ EAPI void eina_condition_free(Eina_Condition *cond);
253 * 253 *
254 * @see eina_condition_timedwait() 254 * @see eina_condition_timedwait()
255 */ 255 */
256EAPI Eina_Bool eina_condition_wait(Eina_Condition *cond); 256EINA_API Eina_Bool eina_condition_wait(Eina_Condition *cond);
257 257
258/** 258/**
259 * @brief Causes a thread to wait until signaled by the condition or a 259 * @brief Causes a thread to wait until signaled by the condition or a
@@ -269,7 +269,7 @@ EAPI Eina_Bool eina_condition_wait(Eina_Condition *cond);
269 * 269 *
270 * @see eina_condition_wait() 270 * @see eina_condition_wait()
271 */ 271 */
272EAPI Eina_Bool eina_condition_timedwait(Eina_Condition *cond, double t); 272EINA_API Eina_Bool eina_condition_timedwait(Eina_Condition *cond, double t);
273 273
274/** 274/**
275 * @brief Signals all threads waiting for a condition. 275 * @brief Signals all threads waiting for a condition.
@@ -283,7 +283,7 @@ EAPI Eina_Bool eina_condition_timedwait(Eina_Condition *cond, double t);
283 * 283 *
284 * @see eina_condition_signal() 284 * @see eina_condition_signal()
285 */ 285 */
286EAPI Eina_Bool eina_condition_broadcast(Eina_Condition *cond); 286EINA_API Eina_Bool eina_condition_broadcast(Eina_Condition *cond);
287 287
288/** 288/**
289 * @brief Signals a thread waiting for a condition. 289 * @brief Signals a thread waiting for a condition.
@@ -300,7 +300,7 @@ EAPI Eina_Bool eina_condition_broadcast(Eina_Condition *cond);
300 * 300 *
301 * @see eina_condition_broadcast() 301 * @see eina_condition_broadcast()
302 */ 302 */
303EAPI Eina_Bool eina_condition_signal(Eina_Condition *cond); 303EINA_API Eina_Bool eina_condition_signal(Eina_Condition *cond);
304 304
305 305
306/** 306/**
@@ -315,7 +315,7 @@ EAPI Eina_Bool eina_condition_signal(Eina_Condition *cond);
315 * 315 *
316 * @see eina_rwlock_free() 316 * @see eina_rwlock_free()
317 */ 317 */
318EAPI Eina_Bool eina_rwlock_new(Eina_RWLock *mutex); 318EINA_API Eina_Bool eina_rwlock_new(Eina_RWLock *mutex);
319 319
320/** 320/**
321 * @brief Deallocates an #Eina_RWLock. 321 * @brief Deallocates an #Eina_RWLock.
@@ -326,7 +326,7 @@ EAPI Eina_Bool eina_rwlock_new(Eina_RWLock *mutex);
326 * 326 *
327 * @see eina_rwlock_new() 327 * @see eina_rwlock_new()
328 */ 328 */
329EAPI void eina_rwlock_free(Eina_RWLock *mutex); 329EINA_API void eina_rwlock_free(Eina_RWLock *mutex);
330 330
331/** 331/**
332 * @brief Attempts to take a read lock. 332 * @brief Attempts to take a read lock.
@@ -342,7 +342,7 @@ EAPI void eina_rwlock_free(Eina_RWLock *mutex);
342 * 342 *
343 * @see eina_rwlock_release() 343 * @see eina_rwlock_release()
344 */ 344 */
345EAPI Eina_Lock_Result eina_rwlock_take_read(Eina_RWLock *mutex); 345EINA_API Eina_Lock_Result eina_rwlock_take_read(Eina_RWLock *mutex);
346 346
347/** 347/**
348 * @brief Attempts to take a write lock. 348 * @brief Attempts to take a write lock.
@@ -358,7 +358,7 @@ EAPI Eina_Lock_Result eina_rwlock_take_read(Eina_RWLock *mutex);
358 * 358 *
359 * @see eina_rwlock_release() 359 * @see eina_rwlock_release()
360 */ 360 */
361EAPI Eina_Lock_Result eina_rwlock_take_write(Eina_RWLock *mutex); 361EINA_API Eina_Lock_Result eina_rwlock_take_write(Eina_RWLock *mutex);
362 362
363/** 363/**
364 * @brief Releases a lock. 364 * @brief Releases a lock.
@@ -372,7 +372,7 @@ EAPI Eina_Lock_Result eina_rwlock_take_write(Eina_RWLock *mutex);
372 * @see eina_rwlock_take_read() 372 * @see eina_rwlock_take_read()
373 * @see eina_rwlock_take_write() 373 * @see eina_rwlock_take_write()
374 */ 374 */
375EAPI Eina_Lock_Result eina_rwlock_release(Eina_RWLock *mutex); 375EINA_API Eina_Lock_Result eina_rwlock_release(Eina_RWLock *mutex);
376 376
377/** 377/**
378 * @brief Initializes a new #Eina_TLS, or thread level storage, to store thread 378 * @brief Initializes a new #Eina_TLS, or thread level storage, to store thread
@@ -390,7 +390,7 @@ EAPI Eina_Lock_Result eina_rwlock_release(Eina_RWLock *mutex);
390 * @see eina_tls_cb_new() 390 * @see eina_tls_cb_new()
391 * @see eina_tls_free() 391 * @see eina_tls_free()
392 */ 392 */
393EAPI Eina_Bool eina_tls_new(Eina_TLS *key); 393EINA_API Eina_Bool eina_tls_new(Eina_TLS *key);
394 394
395/** 395/**
396 * @brief Initializes a new #Eina_TLS, or thread level storage, to store thread 396 * @brief Initializes a new #Eina_TLS, or thread level storage, to store thread
@@ -407,7 +407,7 @@ EAPI Eina_Bool eina_tls_new(Eina_TLS *key);
407 * @see eina_tls_new() 407 * @see eina_tls_new()
408 * @see eina_tls_free() 408 * @see eina_tls_free()
409 */ 409 */
410EAPI Eina_Bool eina_tls_cb_new(Eina_TLS *key, Eina_TLS_Delete_Cb delete_cb); 410EINA_API Eina_Bool eina_tls_cb_new(Eina_TLS *key, Eina_TLS_Delete_Cb delete_cb);
411 411
412/** 412/**
413 * @brief Frees an allocated #Eina_TLS. 413 * @brief Frees an allocated #Eina_TLS.
@@ -419,7 +419,7 @@ EAPI Eina_Bool eina_tls_cb_new(Eina_TLS *key, Eina_TLS_Delete_Cb delete_cb);
419 * @see eina_tls_new() 419 * @see eina_tls_new()
420 * @see eina_tls_cb_new() 420 * @see eina_tls_cb_new()
421 */ 421 */
422EAPI void eina_tls_free(Eina_TLS key); 422EINA_API void eina_tls_free(Eina_TLS key);
423 423
424/** 424/**
425 * @brief Gets the value in #Eina_TLS for this thread. 425 * @brief Gets the value in #Eina_TLS for this thread.
@@ -432,7 +432,7 @@ EAPI void eina_tls_free(Eina_TLS key);
432 * 432 *
433 * @see eina_tls_set() 433 * @see eina_tls_set()
434 */ 434 */
435EAPI void *eina_tls_get(Eina_TLS key); 435EINA_API void *eina_tls_get(Eina_TLS key);
436 436
437/** 437/**
438 * @brief Sets the value in Eina_TLS for this thread. 438 * @brief Sets the value in Eina_TLS for this thread.
@@ -446,7 +446,7 @@ EAPI void *eina_tls_get(Eina_TLS key);
446 * 446 *
447 * @see eina_tls_get() 447 * @see eina_tls_get()
448 */ 448 */
449EAPI Eina_Bool eina_tls_set(Eina_TLS key, const void *data); 449EINA_API Eina_Bool eina_tls_set(Eina_TLS key, const void *data);
450 450
451/** 451/**
452 * @brief Initializes a new #Eina_Semaphore. 452 * @brief Initializes a new #Eina_Semaphore.
@@ -460,7 +460,7 @@ EAPI Eina_Bool eina_tls_set(Eina_TLS key, const void *data);
460 * 460 *
461 * @see eina_semaphore_free() 461 * @see eina_semaphore_free()
462 */ 462 */
463EAPI Eina_Bool eina_semaphore_new(Eina_Semaphore *sem, int count_init); 463EINA_API Eina_Bool eina_semaphore_new(Eina_Semaphore *sem, int count_init);
464 464
465/** 465/**
466 * @brief Frees an allocated #Eina_Semaphore. 466 * @brief Frees an allocated #Eina_Semaphore.
@@ -473,7 +473,7 @@ EAPI Eina_Bool eina_semaphore_new(Eina_Semaphore *sem, int count_init);
473 * 473 *
474 * @see eina_semaphore_new() 474 * @see eina_semaphore_new()
475 */ 475 */
476EAPI Eina_Bool eina_semaphore_free(Eina_Semaphore *sem); 476EINA_API Eina_Bool eina_semaphore_free(Eina_Semaphore *sem);
477 477
478/** 478/**
479 * @brief Gets a lock on an #Eina_Semaphore. 479 * @brief Gets a lock on an #Eina_Semaphore.
@@ -486,7 +486,7 @@ EAPI Eina_Bool eina_semaphore_free(Eina_Semaphore *sem);
486 * 486 *
487 * @see eina_semaphore_release() 487 * @see eina_semaphore_release()
488 */ 488 */
489EAPI Eina_Bool eina_semaphore_lock(Eina_Semaphore *sem); 489EINA_API Eina_Bool eina_semaphore_lock(Eina_Semaphore *sem);
490 490
491/** 491/**
492 * @brief Releases a lock on an #Eina_Semaphore. 492 * @brief Releases a lock on an #Eina_Semaphore.
@@ -500,7 +500,7 @@ EAPI Eina_Bool eina_semaphore_lock(Eina_Semaphore *sem);
500 * 500 *
501 * @see eina_semaphore_lock() 501 * @see eina_semaphore_lock()
502 */ 502 */
503EAPI Eina_Bool eina_semaphore_release(Eina_Semaphore *sem, int count_release); 503EINA_API Eina_Bool eina_semaphore_release(Eina_Semaphore *sem, int count_release);
504 504
505/** 505/**
506 * @brief Initializes a new #Eina_Barrier. 506 * @brief Initializes a new #Eina_Barrier.
@@ -515,7 +515,7 @@ EAPI Eina_Bool eina_semaphore_release(Eina_Semaphore *sem, int count_release);
515 * 515 *
516 * @see eina_barrier_free() 516 * @see eina_barrier_free()
517 */ 517 */
518EAPI Eina_Bool eina_barrier_new(Eina_Barrier *barrier, int needed); 518EINA_API Eina_Bool eina_barrier_new(Eina_Barrier *barrier, int needed);
519 519
520/** 520/**
521 * @brief Frees an allocated #Eina_Barrier. 521 * @brief Frees an allocated #Eina_Barrier.
@@ -525,7 +525,7 @@ EAPI Eina_Bool eina_barrier_new(Eina_Barrier *barrier, int needed);
525 * 525 *
526 * @see eina_barrier_new() 526 * @see eina_barrier_new()
527 */ 527 */
528EAPI void eina_barrier_free(Eina_Barrier *barrier); 528EINA_API void eina_barrier_free(Eina_Barrier *barrier);
529 529
530/** 530/**
531 * @brief Increments the count of threads that are waiting on @p barrier. 531 * @brief Increments the count of threads that are waiting on @p barrier.
@@ -536,7 +536,7 @@ EAPI void eina_barrier_free(Eina_Barrier *barrier);
536 * @return #EINA_TRUE on success, else #EINA_FALSE otherwise. 536 * @return #EINA_TRUE on success, else #EINA_FALSE otherwise.
537 * 537 *
538 */ 538 */
539EAPI Eina_Bool eina_barrier_wait(Eina_Barrier *barrier); 539EINA_API Eina_Bool eina_barrier_wait(Eina_Barrier *barrier);
540 540
541 541
542/** 542/**
@@ -553,7 +553,7 @@ EAPI Eina_Bool eina_barrier_wait(Eina_Barrier *barrier);
553 * 553 *
554 * @see eina_spinlock_free() 554 * @see eina_spinlock_free()
555 */ 555 */
556EAPI Eina_Bool eina_spinlock_new(Eina_Spinlock *spinlock); 556EINA_API Eina_Bool eina_spinlock_new(Eina_Spinlock *spinlock);
557 557
558/** 558/**
559 * @brief Attempts to take a spinlock. 559 * @brief Attempts to take a spinlock.
@@ -571,7 +571,7 @@ EAPI Eina_Bool eina_spinlock_new(Eina_Spinlock *spinlock);
571 * @see eina_spinlock_take_try() 571 * @see eina_spinlock_take_try()
572 * @see eina_spinlock_release() 572 * @see eina_spinlock_release()
573 */ 573 */
574EAPI Eina_Lock_Result eina_spinlock_take(Eina_Spinlock *spinlock); 574EINA_API Eina_Lock_Result eina_spinlock_take(Eina_Spinlock *spinlock);
575 575
576/** 576/**
577 * @brief Attempts to take a spinlock if possible. 577 * @brief Attempts to take a spinlock if possible.
@@ -587,7 +587,7 @@ EAPI Eina_Lock_Result eina_spinlock_take(Eina_Spinlock *spinlock);
587 * @see eina_spinlock_take_try() 587 * @see eina_spinlock_take_try()
588 * @see eina_spinlock_release() 588 * @see eina_spinlock_release()
589 */ 589 */
590EAPI Eina_Lock_Result eina_spinlock_take_try(Eina_Spinlock *spinlock); 590EINA_API Eina_Lock_Result eina_spinlock_take_try(Eina_Spinlock *spinlock);
591 591
592/** 592/**
593 * @brief Releases a spinlock. 593 * @brief Releases a spinlock.
@@ -603,7 +603,7 @@ EAPI Eina_Lock_Result eina_spinlock_take_try(Eina_Spinlock *spinlock);
603 * @see eina_spinlock_take_try() 603 * @see eina_spinlock_take_try()
604 604
605 */ 605 */
606EAPI Eina_Lock_Result eina_spinlock_release(Eina_Spinlock *spinlock); 606EINA_API Eina_Lock_Result eina_spinlock_release(Eina_Spinlock *spinlock);
607 607
608/** 608/**
609 * @brief Deallocates an #Eina_Spinlock. 609 * @brief Deallocates an #Eina_Spinlock.
@@ -613,7 +613,7 @@ EAPI Eina_Lock_Result eina_spinlock_release(Eina_Spinlock *spinlock);
613 * @param[in] spinlock The #Eina_Spinlock to be deallocated. 613 * @param[in] spinlock The #Eina_Spinlock to be deallocated.
614 * 614 *
615 */ 615 */
616EAPI void eina_spinlock_free(Eina_Spinlock *spinlock); 616EINA_API void eina_spinlock_free(Eina_Spinlock *spinlock);
617 617
618#ifdef EINA_HAVE_DEBUG_THREADS 618#ifdef EINA_HAVE_DEBUG_THREADS
619# define EINA_MAIN_LOOP_CHECK_RETURN_VAL(val) \ 619# define EINA_MAIN_LOOP_CHECK_RETURN_VAL(val) \
diff --git a/src/lib/evil/evil_fcntl.c b/src/lib/evil/evil_fcntl.c
index eabfeed046..9efe52c1a0 100644
--- a/src/lib/evil/evil_fcntl.c
+++ b/src/lib/evil/evil_fcntl.c
@@ -2,18 +2,15 @@
2# include "config.h" 2# include "config.h"
3#endif /* HAVE_CONFIG_H */ 3#endif /* HAVE_CONFIG_H */
4 4
5#include <define_lean_and_mean.h> 5#include <evil_windows.h>
6 6
7#include <stdio.h> 7#include <stdio.h>
8#include <sys/locking.h> 8#include <sys/locking.h>
9 9
10#include <winsock2.h> /* for ioctlsocket */
11#include <io.h> 10#include <io.h>
12 11
13#include "evil_private.h" 12#include "evil_private.h"
14 13
15#include <undefine_lean_and_mean.h>
16
17/* SOCKET is defined as a uintptr_t, so passing a fd (int) is not a problem */ 14/* SOCKET is defined as a uintptr_t, so passing a fd (int) is not a problem */
18static int 15static int
19_is_socket(SOCKET s) 16_is_socket(SOCKET s)
diff --git a/src/lib/evil/evil_unistd.c b/src/lib/evil/evil_unistd.c
index 2b596798ed..5f2ab1abae 100644
--- a/src/lib/evil/evil_unistd.c
+++ b/src/lib/evil/evil_unistd.c
@@ -4,17 +4,11 @@
4 4
5#include "evil_private.h" 5#include "evil_private.h"
6 6
7#include <define_lean_and_mean.h> 7#include <evil_windows.h>
8#include <errno.h> 8#include <errno.h>
9#include <define_lean_and_mean.h>
10#include <direct.h> 9#include <direct.h>
11#include <define_lean_and_mean.h>
12#include <sys/time.h> 10#include <sys/time.h>
13 11
14#include <define_lean_and_mean.h>
15//#include <winsock2.h>
16#include <undefine_lean_and_mean.h>
17
18LONGLONG _evil_time_freq; 12LONGLONG _evil_time_freq;
19LONGLONG _evil_time_count; 13LONGLONG _evil_time_count;
20long _evil_time_second; 14long _evil_time_second;
diff --git a/src/lib/evil/evil_windows.h b/src/lib/evil/evil_windows.h
index 38fb3d0fa2..008adbc60c 100644
--- a/src/lib/evil/evil_windows.h
+++ b/src/lib/evil/evil_windows.h
@@ -1,11 +1,15 @@
1#ifndef __EVIL_WINDOWS_H__ 1#ifndef __EVIL_WINDOWS_H__
2#define __EVIL_WINDOWS_H__ 2#define __EVIL_WINDOWS_H__
3 3
4#ifdef _INC_WINDOWS_
5#error Already included windows.h
6#endif
7
4#ifndef WIN32_LEAN_AND_MEAN 8#ifndef WIN32_LEAN_AND_MEAN
5# define WIN32_LEAN_AND_MEAN 9# define WIN32_LEAN_AND_MEAN
6#endif 10#endif
7 11
12#include <windows.h>
8#include <winsock2.h> 13#include <winsock2.h>
9#include <windows.h>
10 14
11#endif 15#endif
diff --git a/src/lib/evil/meson.build b/src/lib/evil/meson.build
index de56339843..7be46ef235 100644
--- a/src/lib/evil/meson.build
+++ b/src/lib/evil/meson.build
@@ -1,5 +1,5 @@
1if target_machine.system() == 'windows' 1if target_machine.system() == 'windows'
2 subdir('unposix') 2 #subdir('unposix')
3 3
4 evil_src = [ 4 evil_src = [
5 'evil_dlfcn.c', 5 'evil_dlfcn.c',
@@ -24,8 +24,8 @@ if target_machine.system() == 'windows'
24 secur32 = cc.find_library('secur32') 24 secur32 = cc.find_library('secur32')
25 uuid = cc.find_library('uuid') 25 uuid = cc.find_library('uuid')
26 26
27 evil_deps = [psapi, ole32, ws2_32, secur32, uuid, pcre_dep, evil_unposix] 27 evil_deps = [psapi, ole32, ws2_32, secur32, uuid, pcre_dep]
28 evil_pub_deps = [psapi, ole32, ws2_32, secur32, uuid, pcre_dep, evil_unposix] 28 evil_pub_deps = [psapi, ole32, ws2_32, secur32, uuid, pcre_dep]
29 29
30 evil_lib = library('evil', evil_src, 30 evil_lib = library('evil', evil_src,
31 c_args : ['-DEVIL_BUILD', '-DEVIL_DLL'], 31 c_args : ['-DEVIL_BUILD', '-DEVIL_DLL'],
@@ -36,7 +36,7 @@ if target_machine.system() == 'windows'
36 ) 36 )
37 37
38 evil = declare_dependency( 38 evil = declare_dependency(
39 include_directories: [include_directories('.')], 39 include_directories: [include_directories('.', 'unposix')],
40 dependencies : evil_pub_deps, 40 dependencies : evil_pub_deps,
41 link_with: evil_lib, 41 link_with: evil_lib,
42 ) 42 )