Commit Graph

12 Commits

Author SHA1 Message Date
Felipe Magno de Almeida 8f9255e2c1 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 17:40:21 -03:00
Xavi Artigas 37e94d635b doxygen docs: Add missing group braces
Without them, these Evil docs had no group and therefore didn't appear anywhere.
2020-04-29 17:33:39 +02:00
Vincent Torri 7db4714db6 replace strndup with eina_strndup, remove strndup definition in evil and elm_test_dnd
Test Plan: compilation

Reviewers: cedric, zmike, raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8814
2019-05-03 13:13:57 +01:00
Vincent Torri c47fdb8c80 evil: remove strrstr and ffs - not used in the EFL on Windows
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-13 11:40:10 -07:00
Vincent Torri 9070e067bc evil: remove useless vc++ code
vc++ is not supported anymore

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-11 14:36:17 -08:00
ChunEon Park 12b4e371ac evil: add missing since 2015-08-22 16:02:35 +09:00
Michelle Legrand a0b6f87c44 evil: add strndup().
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-12 07:43:58 +01:00
Vincent Torri 9631585f24 efl: remove Windows CE support 2014-07-13 15:17:17 +02:00
Jeff Grimshaw d76fbe9067 evil: fix Doxygen markup to prevent warnings.
Summary:
The Doxygen header has an opening @\{ with no matching @\}, which
Doxygen will complain about.  There is no explicit grouping associated
with the @\{, so I just removed it.

Test Plan: make doc 2> doxyerr.log

CC: cedric

Differential Revision: https://phab.enlightenment.org/D611

Signed-off-by: Cedric BAIL <cedric.bail@free.fr>
2014-03-15 20:05:24 +09:00
Christophe Sadoine 2070ca4205 evil: add strsep function.
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-06-25 12:29:37 +09:00
Jonas M. Gastal d487f9d744 efl: Created Evil group and added existing Evil groups to it.
SVN revision: 81292
2012-12-18 18:38:35 +00:00
Vincent Torri cd69ef4c8a merge: add evil files
SVN revision: 76464
2012-09-11 16:13:11 +00:00