efl/src/lib
Felipe Magno de Almeida 86493e160a ecore_con: Rename EAPI macro to ECORE_CON_API in Ecore Con 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: vtorri, woohyun, jptiz, lucas

Reviewed By: vtorri

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12225
2020-12-28 13:58:06 -03:00
..
ecore evil: Define environ macro when using VS based on UCRT definition 2020-12-09 16:53:30 -03:00
ecore_audio ecore_audio: Rename EAPI macro to ECORE_AUDIO_API in Ecore Audio library 2020-12-15 11:36:42 -03: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 ecore_con: Rename EAPI macro to ECORE_CON_API in Ecore Con library 2020-12-28 13:58:06 -03: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 - dont free previous resource db 2020-11-22 21:14:56 +00:00
ector Get rid of trailing whitespaces (5 / 14) 2020-06-23 10:29:25 +02:00
edje edje_data: Add missing descriptor for image.max(min).limit 2020-12-17 12:50:48 +09:00
eet eet: Fix 'No OPENSSL_Applink' error message. 2020-08-19 15:59:52 +02:00
eeze eeze_syspaty: fix a potention memory leak 2020-12-24 11:48:53 +09: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 eina: Rename EAPI macro to EINA_API in Eina library 2020-11-25 09:42:47 -03:00
eio eio: Rename EAPI macro to EIO_API in Eio library 2020-12-14 11:45:35 -03:00
eldbus eldbus: Add Eldbus.h include entry point header to eldbus_instrospection.h 2020-12-06 12:39:32 -03:00
elementary elm_gesture_layer: fix config value type 2020-12-24 11:48:08 +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 eo_base_class: Avoid useless memory alloc 2020-12-24 11:47:04 +09:00
eolian Evas, Eolian: install missing *_api.h files 2020-12-17 15:28:26 +00: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 evas - avif - fix for 0.8.2 libavif that broke api 2020-12-18 11:28:10 +00:00
evil evil: Fix fcntl for F_SETLK and F_SETLKW wrong length calculation 2020-12-14 11:50:48 -03:00
.gitignore