Commit Graph

16 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
Vincent Torri eacee53c2e Evil : move mkstemp(s) and mkdtemp in eina_file directly
Summary:
Also replace all mkstemp(s) and mkdtemp with the eina_file functions in
the source

Test Plan: run eina_file test

Reviewers: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12170
2020-10-08 11:58:11 +01:00
Vincent Torri d8cb3e7f71 Evil: move the inclusion of all headers in evil_private.h
Summary: first step for making Evil private. evil_private.h will be included in the EFL source code instead of Evil.h

Test Plan: compilation

Reviewers: raster, cedric, zmike

Reviewed By: raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8893
2019-05-15 12:27:37 +01:00
Vincent Torri ef298c428a evil : remove mkstemp, which is already defined in mingw-w64
Summary: mkstemp is already defined in mingw-w64

Test Plan: compilation

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8454
2019-03-26 10:10:54 -04:00
Prince Kumar Dubey 1235459ed3 efl: unused variable removed, removing local variable assignment which has no use at all.
Reviewers: raster, cedric

Reviewed By: cedric

Subscribers: rajeshps, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-13 12:11:45 -07:00
Ivan Furs f3e9496cd1 evil: Fix edc scripts compilation on windows
Fixes T5410

Summary: should fix the error T5410

Reviewers: vtorri, t.naumenko, cedric, raster, an.kroitor, rimmed, NikaWhite, FurryMyad

Subscribers: artem.popov, cedric, jpeg

Maniphest Tasks: T5410

Differential Revision: https://phab.enlightenment.org/D4830
2017-06-12 11:52:30 +09:00
Vincent Torri 7782e2388c Evil: fix infinite recursive loop in previous addition of setlocale() in Evil
Summary:
setlocale() called itself because it was defined as a #define
so remove this #define from evil_locale.h and move it in another header file
To avoid future problem, move similar defines to this header file
Also clean all the header file mess in Evil

Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3409
2015-12-08 13:56:49 +09:00
Vincent Torri 26ed6638ae evil: fix warnings when mingw-w64 4.* is installed
mingw-w64 4.* adds several macros and functions compared to the 3.* version,
so make sure that Evil does not redeclare them

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-11 14:36:09 -08:00
Vincent Torri 9631585f24 efl: remove Windows CE support 2014-07-13 15:17:17 +02:00
Cedric BAIL 5080dc4dff evil: fix mistaken check of returned value by mkdir.
mkdir succeed with return == 0 !

@fix
2014-07-12 12:23:02 +02:00
Jean-Philippe Andre 5926aadd9e Evil: Add support for mkstemps
This adds filename suffix support for temporary files on Windows.
2014-04-02 12:14:50 +09:00
Vincent Torri 6e043dfb44 evil: remove libgen and the GNU *printf code (both in mingw-w64).
This should reduce the code size of evil and reduce maintainance as
mingw does now take care of it.

Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-10-31 14:33:00 +09:00
Cedric Bail 4605b91804 evil: returned the good value for mkstemp
Added back some needed defines for elementary (was in evil 1.7.7).
2013-06-25 12:16:36 +09:00
Cedric Bail 1c50ffe83f Evil: add mkdtemp 2013-03-31 00:13:06 +09:00
Lucas De Marchi 3e4eb4437e efl: remove check for errno.h
SVN revision: 82581
2013-01-10 20:25:44 +00:00
Vincent Torri cd69ef4c8a merge: add evil files
SVN revision: 76464
2012-09-11 16:13:11 +00:00