efl/src/lib
Felipe Magno de Almeida 4cee5b05c9 evil: Rename EAPI macro to EVIL_API in Evil library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.

EAPI was designed to be able to pass
```__attribute__ ((visibility ("default")))``` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.

MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.

For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.

With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).
```

Example 1:
dll1:
```
EAPI void foo(void);

EAPI void bar()
{
  foo();
}
```
dll2:
```
EAPI void foo()
{
  printf ("foo\n");
}
```

This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
```__atttribute__((visibility("default")))```

However, the following:
Example 2:

dll1:

```
EAPI extern int foo;
EAPI void foobar(void);

EAPI void bar()
{
  foo = 5;
  foobar();
}
```

dll2:

```
EAPI int foo = 0;
EAPI void foobar()
{
  printf ("foo %d\n", foo);
}
```

This will work on mingw but will not work for MSVC. And that's why
EAPI is the only solution that worked for MSVC.

Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>

Reviewers: raster, vtorri, jptiz, lucas, woohyun

Reviewed By: vtorri, jptiz

Subscribers: ProhtMeyhet, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12182
2020-11-12 13:47:38 -03:00
..
ecore ecore - efl thread - dont close invalid < 0 fd's 2020-09-20 00:20:42 +01:00
ecore_audio Get rid of trailing whitespaces (4 / 14) 2020-06-23 10:29:14 +02:00
ecore_avahi lib: add more c_args handling for places we missed before 2020-05-26 10:15:27 +02:00
ecore_buffer refactor build 2020-05-27 11:06:46 +02:00
ecore_cocoa Get rid of trailing whitespaces (4 / 14) 2020-06-23 10:29:14 +02:00
ecore_con Evil : move mkstemp(s) and mkdtemp in eina_file directly 2020-10-08 11:58:11 +01:00
ecore_drm Get rid of trailing whitespaces (4 / 14) 2020-06-23 10:29:14 +02:00
ecore_drm2 ecore drm - increase timeout for flips from 0.05 to 2.0 sec 2020-09-04 13:25:52 +01:00
ecore_evas ecore evas - use correct enums for legacy funcstions to remove warns 2020-08-25 13:21:25 +01:00
ecore_fb Get rid of trailing whitespaces (4 / 14) 2020-06-23 10:29:14 +02:00
ecore_file Ecore_file: on Windows, fix errno value when dst exists. 2020-10-06 15:09:31 +01:00
ecore_imf Fix typos - (Part #2) 2020-07-06 10:52:49 +02:00
ecore_imf_evas refactor build 2020-05-27 11:06:46 +02:00
ecore_input ecore input - make an unsupported joystick a warn not an err... 2020-08-11 13:49:30 +01:00
ecore_input_evas Get rid of trailing whitespaces (4 / 14) 2020-06-23 10:29:14 +02:00
ecore_ipc ecore_ipc: remove duplicated condition 2020-07-31 10:14:00 +02:00
ecore_sdl Get rid of trailing whitespaces (4 / 14) 2020-06-23 10:29:14 +02:00
ecore_wayland Get rid of trailing whitespaces (4 / 14) 2020-06-23 10:29:14 +02:00
ecore_win32 Ecore_Win32: add the API ecore_win32_window_maximized_set() 2020-10-13 15:19:39 +01:00
ecore_wl2 ecore_wl2_display: move wl_display_dispatch_pending before condition check. 2020-08-22 08:25:06 -04:00
ecore_x ecore x - fix typo in internal backdoor api to get vsync debug 2020-09-04 14:42:07 +01:00
ector Get rid of trailing whitespaces (5 / 14) 2020-06-23 10:29:25 +02:00
edje singularize srand in eina_init - only once in one place 2020-10-03 20:46:50 +01:00
eet eet: Fix 'No OPENSSL_Applink' error message. 2020-08-19 15:59:52 +02:00
eeze Get rid of trailing whitespaces (7 / 14) 2020-06-23 10:30:05 +02:00
efl edje: efl: add new EFL_VERSION_1_26 define for new dev cycle 2020-09-22 20:27:18 +02:00
efl_canvas_wl efl_canvas: fix a potentional error of null deref 2020-08-05 10:47:15 +02:00
efl_mono efl_mono: Create insert list/array c# wrapper for eina_value. 2020-02-13 15:26:50 -03:00
efreet efreet - windows - still call stat but skip lstat/readlink 2020-09-29 10:32:02 +01:00
eina Evil : move mkstemp(s) and mkdtemp in eina_file directly 2020-10-08 11:58:11 +01:00
eio docs: Correct the wrong API group name and typo in Evas, Eet, Eina, Eio and Elementary 2020-07-14 10:09:22 +01:00
eldbus Fix typos - (Part #5) 2020-06-25 09:03:07 +02:00
elementary efl.ui.text : Fixing cursor movement using keyboard arrows/mouse click 2020-10-20 19:20:28 +09:00
elput call sd_seat_can_tty to determine if ttys should be used, instead of hard-coding seat0 2020-09-18 11:48:19 +02:00
elua elua: add searchpath impl for 5.1 compat 2020-07-31 19:01:59 +02:00
embryo singularize srand in eina_init - only once in one place 2020-10-03 20:46:50 +01:00
emile refactor build 2020-05-27 11:06:46 +02:00
emotion emotion: remove all left overs from removed backends 2020-06-05 12:47:43 +02:00
eo efl: resolve warnings over misleading code 2020-09-01 14:12:31 +02:00
eolian Fix typos - (Part #5) 2020-06-25 09:03:07 +02:00
eolian_cxx cxx: Fix uses of intrinsic eolian binbuf type 2020-06-09 10:29:32 +02:00
ephysics refactor build 2020-05-27 11:06:46 +02:00
ethumb Ethumb: reorder _init/shutdown functions, ecore and evas init/shutdown are useless, as ecore_evas already manages them 2020-09-25 10:30:04 +01:00
ethumb_client Get rid of trailing whitespaces (11 / 14) 2020-06-23 10:31:05 +02:00
evas Revert "Revert "evas_textblock: rainbow flag emoji treated as two clusters(update unibreak to version 4.2)"" 2020-10-08 12:32:53 +09:00
evil evil: Rename EAPI macro to EVIL_API in Evil library 2020-11-12 13:47:38 -03:00
.gitignore