Commit Graph

698 Commits

Author SHA1 Message Date
Carsten Haitzler d1f1af054f emile/ecore-con - remove gnutls support since openssl3 is out
openssl3 should now solve licensing issues with openssl. there is no
good reason to keep gnutls support anymore especially since there just
isn't anyoen who wants to maintain that extra ifdef'd code (and that
code has some gotchas that don't match the full features of openssl
too). so this removed "code cruft" to maintain, complexity and
maintenance work as well as build complexity.
2022-08-12 09:33:17 +01:00
Carsten Haitzler 0e22417f45 eet emile - cipher - add braces for if defines to be clear on order of op 2022-08-01 17:35:52 +01:00
orbea bdd5b244e6 Support LibreSSL 3.5.x
LibreSSL 3.5.x now works with the standard OpenSSL code paths.
2022-07-04 09:08:39 -07:00
Woochanlee 74832777f4 efl_net_dialer_http: Do curl shutdown in destructor
Summary:
curl_global_init() in efl_net_dialer_http constructor.
curl_global_cleanup() need to call when it destructor.

Without this, module and libcurl internal data are leaking.

Reviewers: Hermet, raster

Reviewed By: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12259
2021-04-28 10:45:26 +01:00
Hermet Park b9b2b72205 ecore_con: add null check for safety. 2021-03-16 10:28:27 +09:00
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
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
Carsten Haitzler f76d925318 ecore con url - curl is actually optional and only needs to init on use
ecore_con_utl_init is kind of pointless when we can init at the first
use of a url and just have it fail. the problem is anyone initting
ecore_con's url stuff will then pull in curl at that point and not
laer "on first use" which is kind of nw how the dlopen fun was
intended, so push it off until then.
2020-09-19 18:29:55 +01:00
Carsten Haitzler 5da1229484 ecore con - curl - fix error map to map right enum
this would print the wrong error to eina log - this fixes this

@fix
2020-08-25 13:21:25 +01:00
Marcel Hollerbach a931e41823 efl: make all _class_get() functions const
please note, not the return type, but the function.
When appending __attribute__((const)) to a function, the compiler is
told that its enough to call this function once in a function.

This is quite often happening when we are efl_data_scope_get and
efl_super in a function that is different from a implemented function.

The compiler now starts to remove the calls that aggressivly that we
need to ensure that these calls are not removed, which means, the static
function calls, and the eo init are now checking the return value of
these functions, to ensure that they are called.

Please note that you now have to be carefull when your app calls
eo_shutdown, if it does so, you *must* call it at the end of a function,
or never call class_get after that anymore.

Overall this improves elm test runs 0.1s which is fair i guess, the main
thing that is faster is textrendering, where is also the point where
this is the most beneficial.

Please note, this replaces 42 occurences of double _class_get() ... THAT
is a sign!

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Daniel Kolesa <daniel@octaforge.org>
Differential Revision: https://phab.enlightenment.org/D12057
2020-07-20 11:27:53 +02:00
Elyes HAOUAS 1fd0435f21 Get rid of trailing whitespaces (4 / 14)
Remove trailing whitespaces
Differential Revision: https://phab.enlightenment.org/D12002
2020-06-23 10:29:14 +02:00
Marcel Hollerbach 8e3606698e refactor build
libraries are split into deps, external deps, and pub deps.
Evas engines are refactored to use the predefined engine deps.

this is preparation work for efl-one.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11806
2020-05-27 11:06:46 +02:00
Vincent Torri d08d26f19f ecore_con: Fix unused argument warning
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11849
2020-05-19 13:58:54 +02:00
Carsten Haitzler 63b5d81983 Revert "Fix EAPI definition by defining EFL_BUILD for each built DLL"
This reverts commit 3ade45cbc8.
2020-05-18 11:13:59 +01:00
Vincent Torri 3ade45cbc8 Fix EAPI definition by defining EFL_BUILD for each built DLL
Summary: EAPI must be defined to dllexport when building DLL, and to dllimport when using these DLL. To achieve this, define EFL_BUILD for each library and module, and set DLL_EXPORT unconditionally. Static library are and will be not supported

Test Plan: compilation

Reviewers: zmike, raster, jptiz

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11834
2020-05-18 09:51:48 +01:00
Carsten Haitzler fe56edae3f systemd - make libsystemd use/supprot entirely runtime "dlopened"
so i've moved all systemd and elogind support to be runtime only with
dlopen (eina_module) of libsystemd.so.0 (or libelogind.so.0 for elput)
and finding of symbols manually at runtime (if the right code paths or
env vars are set), thus remvoing the need to decide at compile time if
efl needs systemd support or not as it no longer needs systemd
headers/libs at compile time and just at runtime. this simplifies
building a bit and makes efl more adaptive to the final target system
at runtime.
2020-05-18 09:36:55 +01:00
Vincent Torri d135957ffa Use __func__ C99 identifier instead of __FUNCTION__ compiler extension
Summary: see http://www.open-std.org/JTC1/SC22/wg14/www/docs/n1124.pdf section 6.4.2.2 page 52

Test Plan: compilation

Reviewers: raster, devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11785
2020-05-07 09:27:07 -04:00
Xavi Artigas e7f4bc4c2a doxygen docs: Fix all invalid @param names
There were quite a few of these...
2020-04-20 12:24:41 +02:00
Daniel Kolesa 7791d9fac6 remove unused imports in eo/eot files 2020-04-19 01:44:50 +02:00
Carsten Haitzler 7ef5b60411 fix buid on bsd 2020-04-12 19:20:13 +01:00
Carsten Haitzler 963c1b9adf ecore con - clean up file lock andunlock on failed bind
didnt do this if bind failed... so do it now.
2020-04-12 18:30:36 +01:00
Xavi Artigas ddbe32f2eb doxygen: fix missing end group tag 2020-02-28 11:44:19 +01:00
Wonki Kim 9442598768 ecore_con: fix to check a return value of functions
this path fixes to check a return value of functions.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11371
2020-02-19 15:20:34 +01:00
Wonki Kim c00c85c166 efl_con: add a default condition to switch statement
this patch modifies conditions
to extract range conditions out of switch statement

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11370
2020-02-19 15:20:31 +01:00
Carsten Haitzler 6a0de945e0 ecore con - also be paranoid with same nul byte checks in path str
this won't affect the target system which doesn't do abstract sockets
anyway, and it's just unlink "" ... but check if first byte is nul for
an asbtract socket and dont do lock files or unlinking in this case
2020-02-15 11:58:12 +00:00
Carsten Haitzler 0802f4dc95 ecore_con - on bsd if we get flock unlink old socket by force
trying to address other parts of the bsd socket hanging on bind() etc.
... unlink socket if we get the file lock as we should now have an
exclusive lock on the socket anyway - clear out the old one by force
once we have the lock.
2020-02-15 11:31:43 +00:00
Cedric BAIL 81cbe8bdc8 ecore_con: remove use of list<> from Efl.Net.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11044
2020-01-30 17:06:17 +01:00
Carsten Haitzler 9e378b52e5 ecore_con - try an extended bsd workaround by keeping lock open
so keep lock file open for whole duration the socket is bound because
bsd seesm to not do this right... :( (2 things can call bind() on the
same socket with 1 of them block forever).
2020-01-27 20:03:13 +00:00
Carsten Haitzler 28aa1a65b6 ecore_con - freebsd bind blocking workaround
this is to try do a workaround a hard to reproduce blocking bind on
some freebsd systems (i can't repro it on my fbsd vm), so try use file
locks as an extra barrier and hope they do the right thing without
other mysterious problems.

@fix
2020-01-18 00:14:58 +00:00
Wonki Kim a8d7816782 docs: fix to make docs contain proper images
Summary:
links to images that this patch is modifying would be included in doxy docs
without pre or post process something in meson definition, if we applied this patch.

Reviewers: segfaultxavi, bu5hm4n

Reviewed By: segfaultxavi

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10821
2019-12-10 12:53:39 +01:00
Stefan Schmidt d0f69cf2e2 exotic: remove left-overs from Exotic support
This seems to have been gone a long time ago and only references left
that have not been disturbing the build. Time to clean up!

Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10793
2019-12-04 12:21:28 -08:00
Stefan Schmidt f3d9b8ee70 esacpe: remove library from tree
This has not been used for a while and is not even buildable after our
switch to meson. It was a niche to start with given that it needed the
PS3 OS to run on. I asked for any remaining users at EDD and on the list
but heard nothing. Time to remove.

Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10778
2019-12-04 12:21:24 -08:00
Lauro Moura f203c164d8 eo files: Avoid container<ptr(value_type)> usage.
Summary:
Value types are already assumed to be stored by pointer (e.g.
`int val = *(node->data);`)

This commit just changes the current usage of the `ptr` modifier in the
ptr, not affecting the parser.

Reviewers: q66, segfaultxavi, bu5hm4n, felipealmeida

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers, brunobelo

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10769
2019-11-29 17:22:07 -03:00
Cedric BAIL 18de24baeb ecore_con: use only Eina_Magic infrastructure for set and check in Ecore_Con_Url.
Summary:
We can not have half our code rely on Ecore magic check and the other half
use Eina_Magic or this will lead to inconsistency with Eina_Magic definition.

Reviewers: zmike, segfaultxavi, bu5hm4n, raster

Reviewed By: raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10383
2019-10-14 09:38:23 -04:00
Cedric BAIL 8b5ffea131 ecore_con: use only Eina_Magic infrastructure for set and check in Ecore_Con.
Summary:
We can not have half our code rely on Ecore magic check and the other half
use Eina_Magic or this will lead to inconsistency with Eina_Magic definition.
Depends on D10363

Reviewers: zmike, bu5hm4n, segfaultxavi, stefan_schmidt

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10364
2019-10-11 09:25:04 -04:00
Cedric BAIL 1f1f0f75c0 ecore_con: destructor are always called when finalize return NULL.
Summary:
This prevent crash and double free during an invalid Ecore_Con_Eet failure
to initialize.

Reviewers: zmike, bu5hm4n, segfaultxavi, stefan_schmidt

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10362
2019-10-11 09:25:04 -04:00
Daniel Kolesa 553ce69bad efl: remove remaining instances of .eo global variables 2019-09-24 18:27:37 +02:00
Daniel Kolesa 4ce7444dd1 efl: use new eolian error functionality instead of globals
Also enable referencing errors in docs.
2019-09-24 16:29:55 +02:00
Xavi Artigas 96d8b9bc3e docs: nicer formatting of the NULL keyword, everywhere 2019-09-10 16:05:44 +02:00
Daniel Kolesa 4f4b58bf4c efl: change all occurences of @owned to @move 2019-09-06 17:01:05 +02:00
Xavi Artigas dc05cbbee8 docs: Fix typos and wrap EO files to 120 chars
As per our style guide:
https://www.enlightenment.org/contrib/docs/eo-guide.md
2019-09-02 16:24:26 +02:00
Daniel Kolesa 9c018613ee eolian: drop @cref
In the end this was just a failed experiment that didn't turn
out to be practical. For now, revert back to ptr(const(T)) until
a proper replacement for pointer syntax is added.
2019-08-29 13:58:16 +02:00
subhransu mohanty 862a460e7f ecore_con/memleak: due to checking refcount using postfix decrement operator
Reviewers: Hermet, raster, cedric

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9716
2019-08-23 11:09:42 +09:00
Daniel Kolesa 8a8a833837 eolian: rename @class on methods to @static
Ref https://phab.enlightenment.org/T8118
Ref https://phab.enlightenment.org/T7675
2019-08-16 16:27:00 +02:00
Vincent Torri a6ade14c5e Evil: remove pwd code in Evil and fix compilation failures after the removal
Summary: remove pwd code in Evil

Test Plan: compilation

Reviewers: zmike, cedric, raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9420
2019-07-28 09:27:27 +01:00
Daniel Kolesa 13ddc5dbc1 eolian: rename @warn_unused and its associated API
@warn_unused in syntax is now called @no_unused - this is because
"warning about unused" is a C thing (or rather, an extension to C)
and various languages might want to use stricter behavior for this.

Its associated API does the reverse now - it lets you query whether
being unused is allowed at all. This is to match future behavior
of Eolian (once it supports versioning) that will likely reverse it.

@feature
2019-05-26 17:41:22 +02:00
Daniel Kolesa d0fed247bb eolian: remove param @nonull
This has been deprecated for a while and is not strictly necessary
- as a part of an effort to stabilize Eolian, remove this. Eolian
will eventually gain support for versioning and use a reversed
behavior (i.e. no NULL by default), but the API it wlll use for
that will be very different. Features can always be added, it's
much harder to drop them.

@feature
2019-05-26 17:25:15 +02:00
Vincent Torri 8db978aa4c include evil_private.h in last files, and disable symbolic links on Windows in a couple of files
Test Plan: compilation

Reviewers: zmike, raster, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8933
2019-05-22 07:59:05 -04:00
Daniel Kolesa 5ea0195661 eolian: remove @nullable keyword
This was an experiment that never properly took off and was never
used by any generator. Its use was highly variable, so it could
not be relied upon. We will still want to reverse the current
behavior eventually (no null by default), but that will be
done with eo file versioning in the future.

@feature
2019-05-21 16:04:35 +02:00
Vincent Torri 092114ecc8 bin/eet and ecore_con: remove Evil.h when not necessary and include evil_private.h when necessary
Test Plan: compilation

Reviewers: raster, zmike, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8911
2019-05-17 13:51:50 -04:00