| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Coverity reports that 'fd' returned from 'open' here returns a
negative number. Passing a negative number to the 'write' function is
not allowed, so we should change the 'fail_if' checks here to make
sure 'fd' is not negative.
Fixes CID1400940
@fix
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: jptiz, lucas, woohyun, vtorri, raster
Reviewed By: jptiz, lucas, vtorri
Subscribers: ProhtMeyhet, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12188
|
|
|
|
|
|
| |
simplify down to having a single srand() in eina_init and use urandom
if it works and is there - if not, time(NULL) will do. it's the best
we can...
|
|
|
|
|
|
|
| |
Fix CID 1432267
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12125
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Although the [remove manpage](https://linux.die.net/man/3/remove) states that `remove(...)` deletes
either a file or a directory, this is not true in Windows as it can be seen in
[MSDN docs for
remove](https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/remove-wremove?view=vs-2019):
> **(Function description)**
>
> Delete a file.
>
> **Return Value**
>
> Each of these functions returns 0 if the file is successfully deleted.
> Otherwise, **it returns -1 and sets errno either to EACCES to indicate that the
> path** specifies a read-only file, //**specifies a directory**//, or the file
> is open, or to ENOENT to indicate that the filename or path was not found.
This implementation detail caused the Eina test to fail and not removing the
temporary directory.
This patch changes the use of `remove` to the directory-specific `rmdir`, which
is guaranteed to remove the directory. Additionally, it also deletes the
Eina_TmpStr that holds the temporary directory path.
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12115
|
|
|
|
|
|
| |
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Differential Revision: https://phab.enlightenment.org/D12023
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At least on Windows (didn't have the time to test on Linux yet),
running tests, even if they passed, there would be an Eina error on logs
pointing that a temporary file wasn't closed:
```
ERR:eina_file ../src/lib/eina/eina_file_common.c:1137 eina_file_shutdown() File [C:/Users/joao_/AppData/Local/Temp/aaaa_file_test_EBpVea] still open 1 times !
```
In the end, it was the `eina_file_test_unlink` that would create a temporary
file but never close it, being caught only by `eina_shutdown()`.
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Differential Revision: https://phab.enlightenment.org/D12062
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
```
> c:\
> cd /windows
```
Are valid paths. Paths starting with '\' or '/' should be considered
absolute paths.
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Reviewed-by: João Paulo Taylor Ienczak Zanette <joao.tiz@expertisesolutions.com.br>
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12022
|
|
|
|
|
|
|
|
|
|
|
|
| |
On windows, we try to open the "cmd.exe" file, but without the full path
the test fails unless it runs from the system directory.
We now use the full path to test the eina_file_open function.
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Reviewed-by: João Paulo Taylor Ienczak Zanette <joao.tiz@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D12021
|
|
|
|
|
|
|
|
|
| |
errno only holds a valid value if the function returns an error.
ref: windows-native-port
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11971
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: cedric, woohyun, bowonryu
Reviewed By: cedric
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8757
Differential Revision: https://phab.enlightenment.org/D11990
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: when eina_strbuf_replace is used by read_only buffer, this will cause segfault (access invalid memory)
Reviewers: cedric
Reviewed By: cedric
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8757
Differential Revision: https://phab.enlightenment.org/D11989
|
|
|
|
|
|
|
|
| |
On Windows and solaris the string associated to ENOMEM is "Not enough space"
Reviewed-by: João Paulo Taylor Ienczak Zanette <joao.tiz@expertisesolutions.com.br>
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11983
|
|
|
|
|
|
|
|
|
|
| |
It has been checked in all other places, but has been forgotten in these
two.
CID: 1401081
Reviewed-by: Christopher Michael <devilhorns@comcast.net>
Differential Revision: https://phab.enlightenment.org/D11960
|
|
|
|
|
|
|
|
|
|
| |
Somethign fishy is going on if we can not delete the files and folders
we created.
CID: 1400986
Reviewed-by: Christopher Michael <devilhorns@comcast.net>
Differential Revision: https://phab.enlightenment.org/D11955
|
|
|
|
|
|
|
|
|
| |
These could fail as well. Check in testsuite.
CID: 1400961
Reviewed-by: Christopher Michael <devilhorns@comcast.net>
Differential Revision: https://phab.enlightenment.org/D11959
|
|
|
|
|
|
| |
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D11885
|
|
|
|
|
|
| |
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D11884
|
|
|
|
|
|
|
|
| |
On Windows 64bits, long is a 4 bytes type. Declare i as being a uintptr_t instead of unsigned long
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D11837
|
|
|
|
|
|
|
|
|
|
| |
Summary: Depends on D11788
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11789
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Fix the unbelievable High prioritized CID 1420314
|
| |
|
|
|
|
|
|
|
|
| |
A little abstraction to have abstract data content bound to a type.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11018
|
|
|
|
|
|
|
|
| |
this brings a functional-map function to the iterator implementations.
https://en.wikipedia.org/wiki/Map_(higher-order_function)
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D11062
|
|
|
|
|
|
|
|
| |
we should expect errors in these conditions, this also safes a lot of
space in logs.
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11296
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The eina_value_list_vinsert at src/lib/eina_inline_value.x was not checking if the desired position was valid:
When inserting in an empty list in any out of bounds position it actually createded a list with the head being the desired value.
When inserting in a non-empty list in an out of bounds position caused a c error.
Now both cases return EINA_FALSE
Ref T8611
Test Plan:
Meson configured with -Dbindings=mono,cxx -Dmono-beta=true, and tests runned
with ninja test all.
Reviewers: felipealmeida, zmike
Reviewed By: zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8611
Differential Revision: https://phab.enlightenment.org/D11301
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add an operator related to the 3D transform in eina_matrix.
enum eina_matrix_axis
EINA_MATRIX_AXIS_X
EINA_MATRIX_AXIS_Y
EINA_MATRIX_AXIS_Z
eina_matrix4_translate
eina_matrix4_scale
eina_matrix4_rotate
eina_matrix4_transpose
Test Plan: src/tests/eina/eina_test_matrix.c
Reviewers: Hermet, bu5hm4n, kimcinoo, segfaultxavi
Reviewed By: segfaultxavi
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11159
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Introduce new data type (Eina.Range) which represent range (part of series)
**eina_range_max_get**
**eina_range_intersect**
**eina_range_union**
**eina_range_contains**
**eina_range_equal**
Reviewers: cedric, woohyun, bu5hm4n, segfaultxavi, zmike
Reviewed By: woohyun
Subscribers: vtorri, cedric, #committers, #reviewers
Tags: #efl
Maniphest Tasks: T8570
Differential Revision: https://phab.enlightenment.org/D11133
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a accessor is not really helpfull if it operates like the carray
accessor before this commit. What it was doing is to fill the content of
the "current line" into the data pointer. In a carray the
"current line" is the content of its carray-member.
However, accessors like for inarray array list or inlist do work
completly differently. They are returning the pointer to the "current
line" not the value of the current line.
The only case where this worked is efl_ui_format.c which was only tested
with this accessor, and this accessor also only worked with this
accessor.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10908
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
cos function is much much more accurate than cosf.
this patch replaces cosf by cos to gain more accuracy.
Reviewers: cedric, jsuya, vtorri
Subscribers: vtorri, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10695
|
|
|
|
|
|
|
|
|
|
| |
The local cos and sin functions differ from
the math header cos and sin functions by result values
The 4th decimal place is different.
Computing large numbers can cause errors.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10467
|
|
|
|
|
|
|
|
|
|
| |
this value is set in the corresponding #ifdef block above, so use the same
guard here to make code more readable
CID 1400948
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10321
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: CID 1401043
Reviewers: segfaultxavi
Reviewed By: segfaultxavi
Subscribers: segfaultxavi, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10404
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
CIDs 1401081, 1401044, 1400983, 1400960, 1400927, 1400799, 1396946, 1396944,
1383851, 1383847, 1382211, 1379921, 1379921
Reviewers: cedric
Reviewed By: cedric
Subscribers: #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10452
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: CIDs 1404754, 1401022, 1400965
Reviewers: devilhorns
Reviewed By: devilhorns
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10405
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: CID 1400858
Reviewers: lauromoura
Reviewed By: lauromoura
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10396
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
this is a very important coverity issue.
CID 1400838
Depends on D10205
Reviewers: cedric
Reviewed By: cedric
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10206
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: CID 1400792
Reviewers: brunobelo
Reviewed By: brunobelo
Subscribers: brunobelo, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10204
|
|
|
|
|
|
|
| |
pointer in a mempool.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9941
|
|
|
|
|
| |
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9940
|
|
|
|
| |
Differential Revision: https://phab.enlightenment.org/D9781
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: updated test suite for testing the api.
Reviewers: zmike, Hermet, cedric, segfaultxavi
Reviewed By: zmike, segfaultxavi
Subscribers: segfaultxavi, ProhtMeyhet, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9734
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
This adds a new API which can be used to get access to a carray via the eina_accessor API.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: compilation
Reviewers: zmike, raster, cedric
Reviewed By: zmike
Subscribers: #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9154
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: we need to include evil_private.h so that some symbols are declared
Test Plan: compilation
Reviewers: raster, zmike, cedric
Subscribers: #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9129
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Depends on D8800
Reviewers: zmike
Reviewed By: zmike
Subscribers: zmike, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T7832
Differential Revision: https://phab.enlightenment.org/D9016
|
|
|
|
|
|
|
|
|
|
| |
unit tests automatically abort with info after 60s, and tests should be run with
an appropriate timeout to avoid conflict with the test runner's default 30s timeout
set explicit timeout in eio test for now because there's still frequent bugs here
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8894
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This reverts commit 954a534bc0e7f30e66cc7dfd15ac79544e92671f.
It appears that the concerns from this commit are invalid. The case of
~asdf/ does not have any fallback case, if there is no getpwent on this
system, then there will be simply an error, same for the case of a
missing user. In such a case nothing will be written in the buffer /
returned by eina_vpath. The windows build problem can be
fixed by a simple #ifdef'ing the test code.
Reviewers: raster, zmike, cedric, vtorri
Reviewed By: vtorri
Subscribers: vtorri, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8671
|