Commit Graph

8 Commits

Author SHA1 Message Date
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
Vincent Torri 0ff7469d91 Evil: add evil_utf8_to_utf16() API ; use evil_utf16_to_utf8() in Ecore_Win32
Summary: use existing utf-16 to utf-8 conversion function in Ecore_Win32. Add API to convert utf-8 to utf-16 in Evil for copy'n paste on Windows

Test Plan: compilation

Reviewers: raster, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11406
2020-02-25 09:23:48 -05:00
Vincent Torri 6559f64d28 evil: remove tmp and home dir get
Summary: eina implement them for all OSes

Test Plan: compilation

Reviewers: raster, cedric, zmike

Reviewed By: raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8621
2019-04-16 17:59:28 +01:00
Vincent Torri 5870a732c6 Evil: fix usage of Evil in a program compiled with vc++ this should be enough to fix T5206
Summary: Fix EFL errors when compiling a program with vc++

Test Plan: compilation

Reviewers: zmike, devilhorns, an.kroitor

Reviewed By: zmike

Subscribers: cedric, an.kroitor, zmike, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6478
2018-06-29 09:56:15 -04:00
Vincent Torri 771bb6e6a7 Evil: use static buffer to store error messages
Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5394
2017-12-11 16:04:02 +09:00
Vincent Torri ae3b5a8f9b evil: deprecate evil_tmpdir_get() and evil_homedir_get().
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-01 11:46:33 +02:00
Vincent Torri 9631585f24 efl: remove Windows CE support 2014-07-13 15:17:17 +02:00
Vincent Torri cd69ef4c8a merge: add evil files
SVN revision: 76464
2012-09-11 16:13:11 +00:00