From: Bastian Dehn Date: Sat, 8 Feb 2025 08:59:14 +0000 (+0100) Subject: change to c99 std with define posix ext X-Git-Tag: v1.0.33^2~5 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=0b3db45a8567926c28711ea501a19dd72442eebf;p=sane-kds-s2000w-net.git change to c99 std with define posix ext --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 34cc6dd..6dd792b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,16 +7,16 @@ PROJECT("kds-s2000w-net") SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "release") IF(CMAKE_BUILD_TYPE STREQUAL "Release") - SET(CMAKE_C_FLAGS "-std=gnu11 -fPIC -Wall -Werror" CACHE STRING "compiler flags" FORCE) + SET(CMAKE_C_FLAGS "-std=c99 -fPIC -Wall -Werror" CACHE STRING "compiler flags" FORCE) ENDIF() IF(CMAKE_BUILD_TYPE STREQUAL "Debug") - SET(CMAKE_C_FLAGS "-std=gnu11 -fPIC -Wall -g" CACHE STRING "debug compiler flags" FORCE) + SET(CMAKE_C_FLAGS "-std=c99 -fPIC -Wall -g" CACHE STRING "debug compiler flags" FORCE) ENDIF() IF (RUN_TESTS) SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "debug" FORCE) - SET(CMAKE_C_FLAGS "-std=gnu11 -fPIC \ + SET(CMAKE_C_FLAGS "-std=c99 -fPIC \ -fprofile-arcs \ -ftest-coverage \ -Wall \ diff --git a/src/kds_s2000w_client.c b/src/kds_s2000w_client.c index 034ac13..1eb82b9 100644 --- a/src/kds_s2000w_client.c +++ b/src/kds_s2000w_client.c @@ -1,3 +1,5 @@ +#define _POSIX_C_SOURCE 200809L +#define _GNU_SROUCE #include #include #include diff --git a/src/kds_s2000w_config.c b/src/kds_s2000w_config.c index e6ddcb9..7391f3b 100644 --- a/src/kds_s2000w_config.c +++ b/src/kds_s2000w_config.c @@ -1,3 +1,5 @@ +#define _POSIX_C_SOURCE 200809L +#define _GNU_SROUCE #include #include #include diff --git a/src/kds_s2000w_image_converter_netpbm.c b/src/kds_s2000w_image_converter_netpbm.c index e0e44d1..a755fa8 100644 --- a/src/kds_s2000w_image_converter_netpbm.c +++ b/src/kds_s2000w_image_converter_netpbm.c @@ -1,3 +1,5 @@ +#define _POSIX_C_SOURCE 200809L +#define _GNU_SROUCE #include #include #include diff --git a/tests/kds_s2000w_client_mock.c b/tests/kds_s2000w_client_mock.c index f19e335..9846601 100644 --- a/tests/kds_s2000w_client_mock.c +++ b/tests/kds_s2000w_client_mock.c @@ -1,3 +1,5 @@ +#define _POSIX_C_SOURCE 200809L +#define _GNU_SROUCE #include #include #include diff --git a/tests/kds_s2000w_net_get_opt_tests_run.c b/tests/kds_s2000w_net_get_opt_tests_run.c index 2bd71ee..2c90d54 100644 --- a/tests/kds_s2000w_net_get_opt_tests_run.c +++ b/tests/kds_s2000w_net_get_opt_tests_run.c @@ -1,3 +1,5 @@ +#define _POSIX_C_SOURCE 200809L +#define _GNU_SROUCE #include #include #include "kds_s2000w_net_get_opt_tests.h" diff --git a/tests/kds_s2000w_net_tests.c b/tests/kds_s2000w_net_tests.c index 4fb1c88..d63e888 100644 --- a/tests/kds_s2000w_net_tests.c +++ b/tests/kds_s2000w_net_tests.c @@ -1,3 +1,5 @@ +#define _POSIX_C_SOURCE 200809L +#define _GNU_SROUCE #include #include #include diff --git a/tests/kds_s2000w_net_tests_run.c b/tests/kds_s2000w_net_tests_run.c index e838695..0fd09b7 100644 --- a/tests/kds_s2000w_net_tests_run.c +++ b/tests/kds_s2000w_net_tests_run.c @@ -1,3 +1,5 @@ +#define _POSIX_C_SOURCE 200809L +#define _GNU_SROUCE #include #include #include "kds_s2000w_net_tests.h"