summaryrefslogtreecommitdiff
path: root/src/lib (follow)
AgeCommit message (Collapse)Author
2021-03-01ecore_wl2: Remove wayland wobbly windows stuffsChristopher Michael
This cleans up the www mess that never worked properly and is unsupported with no plans to ever be used
2021-02-25eeze_disk: fix potential memory leakChristopher Michael
If allocation for disk fails, then we leak memory from previously called _new_device function. This patch based on D12223 from akanad (Wonki Kim) ref D12223
2021-02-25eeze_disk: Remove extra blank linesChristopher Michael
NB: No functional changes
2021-02-25efl_loop: Fix unchecked return valueChristopher Michael
Small patch to check return value of eina_value_get reported by Coverity Fixes CID1400919
2021-02-25eina_promise: Fix unchecked return valueChristopher Michael
Small patch to check return value of eina_value_get reported by Coverity Fixes CID1400993
2021-02-25elm_glview: Fix unchecked return valueChristopher Michael
Small patch to check return value of evas_gl_make_current reported by Coverity. Fixes CID1401018
2021-02-25eina_value: Fix unchecked return valueChristopher Michael
Small patch to check return value of eina_value_type_setup reported by Coverity Fixes CID1401023
2021-02-25elm_slider: Fix unchecked return valueChristopher Michael
Small patch to check the return value of eina_value_get reported by Coverity Fixes CID1401061
2021-02-25ecore: Update to not use deprecated mallinfoChristopher Michael
mallinfo (the structure) and mallinfo (the function) have both been deprecated in favor of mallinfo2 which has been updated to handle allocations > 4GB. This patch updates ecore usage of deprecated mallinfo to use mallinfo2. If the system does NOT have mallinfo2, then this code will fallback to using mallinfo.
2021-02-25elm - efl ui format - remove leak on format infoCarsten Haitzler (Rasterman)
2021-02-17Revert "ecore: Update to not use deprecated mallinfo"Christopher Michael
Reverting this, for now, because some distro's are still not updated... This should probably use a malloc version check, but I don't have time this week for a proper fix... This reverts commit 17137316eeb728a30c3c14e4b3a2f1cd8765bbfc.
2021-02-17eeze: fix a potention memory leakShinwoo Kim
Summary: if udev device get parents fails, memory leaks. this patch fixes the problem. Reviewers: raster, Hermet, jsuya, herb, ali.alzyod, devilhorns Reviewed By: ali.alzyod, devilhorns Subscribers: ali.alzyod, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12249
2021-02-16ecore: Update to not use deprecated mallinfoChristopher Michael
mallinfo (the structure) and mallinfo (the function) have both been deprecated in favor of mallinfo2 which has been updated to handle allocations > 4GB. This patch updates ecore usage of deprecated mallinfo to use mallinfo2
2021-02-06Added the heif loaderthierry1970
Summary: that supports images : *.heif, *hiec and *.avif I have disabled *.avif images, there is already a loader. Reviewers: stefan_schmidt, raster Subscribers: raster, vtorri, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12135
2021-02-06Efreet: fix file:// scheme on WindowsVincent Torri
Summary: On Windows, file:///c:/path/to/file is correct and not managed. Use a Win API for manage it correctly Test Plan: test case Reviewers: raster, cedric Reviewed By: raster Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12244
2021-02-06Efreet: do not translate standard directories on WindowsVincent Torri
Summary: The directories on hard disk are not translated on Windows Test Plan: test case Reviewers: raster, cedric Reviewed By: raster Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12246
2021-02-04edje_entry: fix a potential error of null derefJaehyun Cho
Summary: This is a patch to fix a potential error of null dereferencing. This patch is based on D12087. Reviewers: Hermet, jsuya Reviewed By: jsuya Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12241
2021-02-04eet, emile: safety++Shinwoo Kim
Summary: (1) EVP_MD_CTX_new could return NULL (2) EVP_DigestUpdate returns 0 for failure. https://www.openssl.org/docs/man1.0.2/man3/EVP_DigestUpdate.html Reviewers: raster, Hermet, cedric, devilhorns Reviewed By: devilhorns Subscribers: SPAM-roll99, devilhorns, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12237
2021-02-03ecore-x - vsync - also log the direct device timestamp if it goes backCarsten Haitzler (Rasterman)
2021-02-03ecore_x - vsync ... this handles time going backwardsCarsten Haitzler (Rasterman)
yes - time went backwards. we get time from the device driver and vsync events... this is so incredibly wrong ... it should not have ever happened... but it did and that caused all sorts of bad things to happen to animators. this guards against that and tries to get the system clock time and if that doesnt work it just takes last time + 0.901. @fix
2021-02-01ecore x - allow vsync animator to delay by some fraction of a frameCarsten Haitzler (Rasterman)
@feat
2021-02-01Efl.Canvas.Vg.Object: Skip render, if size of the drawing area is 0JunsuChoi
Summary: If the size of the boundary of path is 0, there is no area to draw. Therefore, it is the same as hide(). If there is no area to draw, there is no need to create a buffer or perform rendering. Test Plan: N/A Reviewers: Hermet, kimcinoo Reviewed By: Hermet Subscribers: devilhorns, cedric, #reviewers, #committers, herb Tags: #efl Differential Revision: https://phab.enlightenment.org/D12235
2021-01-31ecore_file_monitor: add kevent backend.Alastair Poole
Summary: This is a very simple kevent backend, very similar to the eio_monitor implementation. On BSD systems, some core features within in E and other applications are always using the poll engine, which is not ideal. This is better, and simpler. Reviewers: devilhorns, raster, bu5hm4n, vtorri Reviewed By: vtorri Subscribers: vtorri, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12239
2021-01-29efl_ui_textpath: mathmatical calculationsAli Alzyod
Summary: Reduce number of sqrt calls. Reviewers: cedric, raster, bu5hm4n, vtorri, woohyun, Hermet Subscribers: vtorri, bu5hm4n, raster, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8747 Differential Revision: https://phab.enlightenment.org/D11949
2021-01-29evas_textblock: allow default font size to be set without fontnameali-alzyod
Reviewers: woohyun, bowonryu, id213sin Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12211
2021-01-27ecore-evas: Formatting fixChristopher Michael
NB: No functional changes
2021-01-25eeze walk: fix a memory leakingWonki Kim
Summary: there is a memory leak in a logic for walking along child-parent relation, in case of device_get_sysattr_value failure. this patch fixes the leak. Change-Id: I95e9484b1549d1c794ec529c995af33da9b8a0ee Reviewers: bu5hm4n, zmike Subscribers: raster, SPAM-TeresaButler, vtorri, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12224
2021-01-24ethumb - fix asan complaint on mis-accessing struct after free in clientCarsten Haitzler (Rasterman)
@fix
2021-01-19slider: fix a potentional crashing problemWonki Kim
null pointer dereferencing could happen once eina_value_setup fails. this patch fixes the problem in adavnace Reviewed-by: Christopher Michael <devilhorns@comcast.net> Differential Revision: https://phab.enlightenment.org/D12173
2021-01-11evas - missing EVAS_API - add.Carsten Haitzler (Rasterman)
2021-01-11emotion: emotion EAPI macro to EMOTION_API in Emotion libraryFelipe Magno de Almeida
Summary: Patch from a series of patches to rename EAPI symbols to specific library DSOs. = The Rationale = 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, lucas Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12227
2021-01-03elm - genlist - fix leak if someone steals objects on unrealizeCarsten Haitzler (Rasterman)
elm_genlist_item_all_contents_unset() can steal away the item content. this is how you do a cache of your own objects... BUT this meant genlist couldnt remove its hash entires... as it lost them. this fixes that. leak fixed. (this affected evisum) @fix
2021-01-03ecore - call freeq reduce again on idle enter...Carsten Haitzler (Rasterman)
this led to a nasty leak unless you had ilders runnig every now and again. freeq would just epxand and expand... @fix
2021-01-01ector: Rename EAPI macro to ECTOR_API in Ector libraryFelipe Magno de Almeida
Summary: Patch from a series of patches to rename EAPI symbols to specific library DSOs. = The Rationale = 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/D12226
2020-12-28ecore_con: Rename EAPI macro to ECORE_CON_API in Ecore Con libraryFelipe Magno de Almeida
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-24eeze_syspaty: fix a potention memory leakWonki Kim
Summary: if udev device get sysname fails, memory leaks. this patch fixes the problem. Change-Id: I2d02a6e6eb98e9262255ab3c02cf99f347b8c5f9 Reviewers: bu5hm4n, Hermet, zmike Reviewed By: Hermet Subscribers: vtorri, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12222
2020-12-24elm_gesture_layer: fix config value typeWoochanlee
Summary: The value will read as unsigned char not double. @fix Reviewers: Hermet, raster, zmike Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12195
2020-12-24eo_base_class: Avoid useless memory allocWoochanlee
Summary: The pd->ext will be NULL when the target object on invalidate state or edje object or isolated object etc.. In above case, If data is NULL and ext is not needed, it seems there is no need to create a node. Reviewers: raster, cedric, Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12206
2020-12-24eeze_net: fix a potentional memory leak caseWonki Kim
Summary: if `net` equals zero and `device` has allocated properly at the same time, memory leaks. this patch fixes it. Reviewers: Hermet, bu5hm4n, zmike Reviewed By: Hermet Subscribers: vtorri, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12221
2020-12-18evas - avif - fix for 0.8.2 libavif that broke apiCarsten Haitzler (Rasterman)
also require 0.8.2 ... as well - no point trying to support older versions forever and this is still experimental. fixes T8844 @fix
2020-12-17Evas, Eolian: install missing *_api.h filesVincent Torri
Summary: previous patches forgot to install *_api.h Reviewers: raster, felipealmeida, lucas, jptiz Reviewed By: lucas, jptiz Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12216
2020-12-17edje_data: Add missing descriptor for image.max(min).limitJunsuChoi
Summary: Edje_Part_Description_Image uses EDJE_DATA_DESCRIPTOR_DESCRIPTION_COMMON_SUB, EDJE_DATA_DESCRIPTOR_DESCRIPTION_COMMON_SUB is missing max.limit and min.limit descriptors. Therefore, max:SOURCE and min:SOURCE did not work in EDC. Adds a descriptor to it. https://www.enlightenment.org/_legacy_embed/edcref.html#sec_toplevel_images max [width] [height] or SOURCE The maximum size of the state. A size of -1 means that it will be ignored in one direction. When max is set to SOURCE, edje will enforce the part to be not more than the original image size. The part must be an IMAGE part. Test Plan: {F4230539} edje_cc test.edc && gcc -o test test.c `pkg-config --libs --cflags evas ecore ecore-evas edje` ./test Reviewers: Hermet, Jaehyun_Cho, cedric, raster Reviewed By: Hermet Subscribers: #reviewers, #committers, kimcinoo, herb Tags: #efl Differential Revision: https://phab.enlightenment.org/D12215
2020-12-15evas: Rename EAPI macro to EVAS_API in Evas libraryFelipe Magno de Almeida
Summary: Patch from a series of patches to rename EAPI symbols to specific library DSOs. = The Rationale = This patch is 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 LIBAPI is the only solution that works for MSVC. Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com> Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com> Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev> Reviewers: vtorri, woohyun, jptiz, lucas Reviewed By: vtorri, lucas Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15ecore_audio: Rename EAPI macro to ECORE_AUDIO_API in Ecore Audio libraryFelipe Magno de Almeida
Summary: Patch from a series of patches to rename EAPI symbols to specific library DSOs. = The Rationale = This patch is 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 LIBAPI is the only solution that works for MSVC. Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com> Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com> Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev> Reviewers: vtorri, woohyun, lucas, jptiz Reviewed By: vtorri, lucas Subscribers: vtorri, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12212
2020-12-15evas: Prevent null pointer accessJunsuChoi
Summary: add null check Test Plan: N/A Reviewers: Hermet, cedric, kimcinoo, raster Reviewed By: raster Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12213
2020-12-14evil: Fix fcntl for F_SETLK and F_SETLKW wrong length calculationFelipe Magno de Almeida
Summary: If length and start are both 0, size is wrongfully negative. Besides, using length as a delimitator in a range means that [0, length) is a half-closed interval, so we don't need to subtract by 1. Reviewers: vtorri, woohyun, lucas, jptiz Reviewed By: vtorri, lucas Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12208
2020-12-14eio: Rename EAPI macro to EIO_API in Eio libraryFelipe Magno de Almeida
Summary: Patch from a series of patches to rename EAPI symbols to specific library DSOs. = The Rationale = This patch is 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 LIBAPI is the only solution that works for MSVC. Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com> Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com> Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev> Reviewers: vtorri, woohyun, lucas, jptiz Reviewed By: vtorri, lucas Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12210
2020-12-09Fixing conversion from size_t to high-low dwords for _WIN64.João Antônio Cardoso
Reviewers: vtorri, woohyun, lucas, jptiz Reviewed By: vtorri, jptiz Subscribers: joaoantoniocardoso, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12207
2020-12-09evil: Define environ macro when using VS based on UCRT definitionJoão Antônio Cardoso
Summary: Microsoft Visual Studio defines _environ, but not environ. Create a macro #define environ _environ like other analogous solutions Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com> Reviewers: vtorri, woohyun, joaoantoniocardoso, lucas, jptiz Reviewed By: jptiz Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12209
2020-12-09eo: Rename EAPI macro to EO_API in Eo libraryFelipe Magno de Almeida
Summary: Patch from a series of patches to rename EAPI symbols to specific library DSOs. = The Rationale = This patch is 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 LIBAPI is the only solution that works for MSVC. Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com> Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com> Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev> Reviewers: jptiz, lucas, vtorri, woohyun Reviewed By: jptiz, lucas, vtorri Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12203