From: miha-q <> Date: Thu, 21 Mar 2024 12:52:07 +0000 (-0400) Subject: Thu Mar 21 08:52:07 AM EDT 2024 X-Git-Url: http://www.foleosoft.com/?a=commitdiff_plain;h=d641b5d4c5ef5aedd483a1b1c14c2c946f9d2850;p=QAnsel.git Thu Mar 21 08:52:07 AM EDT 2024 --- diff --git a/build.sh b/build.sh index 756b980..c69bd93 100644 --- a/build.sh +++ b/build.sh @@ -51,9 +51,9 @@ fi if [ "$1" = "simple" ] then - cflags="" + cflags="-D_GNU_SOURCE -std=c99" else - cflags="-I/usr/include/SDL2 -D__PTHREAD__ -D__SDL2__ -D__OPENCL__ -I/usr/include/SDL2 -D_REENTRANT" + cflags="-std=c99 -I/usr/include/SDL2 -D__PTHREAD__ -D__SDL2__ -D__OPENCL__ -I/usr/include/SDL2 -D_REENTRANT" fi cd src/ diff --git a/src/complex.h b/src/complex.h index dd51cea..5fb1025 100644 --- a/src/complex.h +++ b/src/complex.h @@ -27,6 +27,10 @@ static size_t cpx_mtx_cache_len = 0; #include "kernel_gpu.c" #endif +#ifndef M_PI +#define M_PI (3.14159265358979323846) +#endif + typedef struct { float real, imaginary; diff --git a/src/main.h b/src/main.h index 99fd8ce..3b3c9ea 100644 --- a/src/main.h +++ b/src/main.h @@ -6,6 +6,6 @@ #include "openqasm.h" void display_help(); -void main(int argc, char** argv); +int main(int argc, char** argv); #endif