[waffle] [PATCH 07/33] linux: plug a memory leak

2014-07-07 Thread Emil Velikov
On linux_platform_destroy we close all the handles for the different libgl* providers, yet we do not free the memory for the base struct linux_platform, causing a memory leak. In reality the memory will never be freed ('still reachable' by valgrind) as we do not have a API to call

[waffle] [PATCH 08/33] core: return false on failure in waffle_window_resize

2014-07-07 Thread Emil Velikov
The function return type is bool not *. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/api/waffle_window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/waffle/api/waffle_window.c b/src/waffle/api/waffle_window.c index 207ef33..81f95f8 100644 ---

[waffle] [PATCH 17/33] core: Convert to c11 threads

2014-07-07 Thread Emil Velikov
Will allow us more freedom wrt building/using waffle on multiple OS's (mostly non-posix). Note that pthreads_once has been converted to call_once which can never fail. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/CMakeLists.txt | 1 +

[waffle] [PATCH 24/33] core: use compiler specific (noreturn)

2014-07-07 Thread Emil Velikov
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/core/wcore_tinfo.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/waffle/core/wcore_tinfo.c b/src/waffle/core/wcore_tinfo.c index 7d749b7..9a190f9 100644 --- a/src/waffle/core/wcore_tinfo.c +++

[waffle] [PATCH 22/33] core: wcore_error_unittest include c99_compat.h

2014-07-07 Thread Emil Velikov
... in order for us to use the snprintf when building with msvc. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/core/wcore_error_unittest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/waffle/core/wcore_error_unittest.c

[waffle] [PATCH 10/33] cmake: build with fPIC when possible

2014-07-07 Thread Emil Velikov
Some of our third_party libraries may be build without it thus we'll fail at link tim. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- cmake/Modules/WaffleDefineCompilerFlags.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/Modules/WaffleDefineCompilerFlags.cmake

[waffle] [PATCH 03/33] cgl: avoid leaking the PixelFormat

2014-07-07 Thread Emil Velikov
According to apple developer page, starting with OS X v10.5 the pixelformat is reference counted. The object is created at CGLChoosePixelFormat and should be unrefeferenced via CGLReleasePixelFormat/CGLDestroyPixelFormat. The latter two are identical accoring to the documentation. Signed-off-by:

[waffle] [PATCH 09/33] wflinfo: silence signed/unsigned comparison warning

2014-07-07 Thread Emil Velikov
The variable i is used as and compared vs unsigned int. Change it's type so silcence the compiler warning. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/utils/wflinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/wflinfo.c b/src/utils/wflinfo.c

[waffle] [PATCH 28/33] examples/gl_basic: properly annotate the function pointers

2014-07-07 Thread Emil Velikov
Windows uses a different calling convention than linux for their public API (__stdcall vs __cdelc). Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- examples/gl_basic.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/examples/gl_basic.c

[waffle] [PATCH 30/33] tests/gl_basic_test: properly annotate the function pointers

2014-07-07 Thread Emil Velikov
Windows uses a different calling convention than linux for their public API (__stdcall vs __cdelc). Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- tests/functional/gl_basic_test.c | 30 +++--- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git

[waffle] [PATCH 31/33] utils/wlfinfo: use define to provide buffer lenght

2014-07-07 Thread Emil Velikov
... as char buffer[const int] does not work under msvc. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/utils/wflinfo.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/utils/wflinfo.c b/src/utils/wflinfo.c index a76f9fc..94ecfea 100644 ---

[waffle] [PATCH 21/33] tests/gl_basic_test: don't include posix headers when building for win32

2014-07-07 Thread Emil Velikov
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- tests/functional/gl_basic_test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/functional/gl_basic_test.c b/tests/functional/gl_basic_test.c index 035b221..928008b 100644 --- a/tests/functional/gl_basic_test.c +++

[waffle] [PATCH 27/33] examples/simple-x11-egl: properly annotate the function pointers

2014-07-07 Thread Emil Velikov
Windows uses a different calling convention than linux for their public API (__stdcall vs __cdelc). Properly annotate the pointers until waffle becomes aware how to deal with GL dispatch. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- examples/simple-x11-egl.c | 12 ++-- 1 file

[waffle] [PATCH 29/33] utils/wflinfo: properly annotate the function pointers

2014-07-07 Thread Emil Velikov
Windows uses a different calling convention than linux for their public API (__stdcall vs __cdelc). Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/utils/wflinfo.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/utils/wflinfo.c

[waffle] [PATCH 25/33] examples/gl_basic: use compiler specific (noreturn)

2014-07-07 Thread Emil Velikov
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- examples/gl_basic.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/examples/gl_basic.c b/examples/gl_basic.c index 28af1ca..6a399bd 100644 --- a/examples/gl_basic.c +++ b/examples/gl_basic.c @@ -109,7

[waffle] [PATCH 20/33] third_party/getopt: include BSD licensed getopt implementation

2014-07-07 Thread Emil Velikov
Used by utils/wflinfo and examples/gl_basic. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- CMakeLists.txt| 8 + examples/CMakeLists.txt | 2 +- src/utils/CMakeLists.txt | 2 +- third_party/getopt/CMakeLists.txt | 10 +

[waffle] [PATCH 26/33] utils/wflinfo: use compiler specific (noreturn)

2014-07-07 Thread Emil Velikov
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/utils/wflinfo.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/utils/wflinfo.c b/src/utils/wflinfo.c index 58028f9..54ff7f6 100644 --- a/src/utils/wflinfo.c +++ b/src/utils/wflinfo.c @@ -123,7

Re: [waffle] Some new and old fixes

2014-07-07 Thread Emil Velikov
On 07/07/14 18:28, Emil Velikov wrote: Hi all, After respinning the latest changes (and ripping out WGL as it requires some api/abi changes) here is a lovely list of fixes that gets us closer to building waffle with mingw/msvc. The first four patches are old (three cgl fixes that Chad

Re: [waffle] Some new and old fixes

2014-07-07 Thread Brian Paul
On 07/07/2014 11:34 AM, Emil Velikov wrote: On 07/07/14 18:28, Emil Velikov wrote: Hi all, After respinning the latest changes (and ripping out WGL as it requires some api/abi changes) here is a lovely list of fixes that gets us closer to building waffle with mingw/msvc. The first four

Re: [waffle] [PATCH 31/33] utils/wlfinfo: use define to provide buffer lenght

2014-07-07 Thread Brian Paul
In the subject line: length On 07/07/2014 11:28 AM, Emil Velikov wrote: ... as char buffer[const int] does not work under msvc. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/utils/wflinfo.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git

Re: [waffle] [PATCH 09/33] wflinfo: silence signed/unsigned comparison warning

2014-07-07 Thread Brian Paul
On 07/07/2014 11:28 AM, Emil Velikov wrote: The variable i is used as and compared vs unsigned int. Change it's type so silcence the compiler warning. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/utils/wflinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [waffle] [PATCH 10/33] cmake: build with fPIC when possible

2014-07-07 Thread Brian Paul
On 07/07/2014 11:28 AM, Emil Velikov wrote: Some of our third_party libraries may be build without it thus we'll fail at link tim. time. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- cmake/Modules/WaffleDefineCompilerFlags.cmake | 2 ++ 1 file changed, 2 insertions(+) diff