From: Frank Lichtenheld Date: Wed, 10 Jul 2024 18:03:06 +0200 Message-Id: <20240710160306.190351-1-frank@...2641...> In-Reply-To: References: MIME-Version: 1.0 Subject: [Openvpn-devel] [PATCH v2] configure: Switch to C11 by default List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: openvpn-devel@lists.sourceforge.net Cc: Arne Schwabe Mostly so we can use anonymous structs without jumping through hoops or relying on unofficial support. Change-Id: I72934e747d1ad68a7e3675afbeb1b63df7941186 Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/673 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Arne Schwabe diff --git a/CMakeLists.txt b/CMakeLists.txt index 096837d..ad620fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -119,7 +119,7 @@ set(OPENVPN_VERSION_PATCH ${PRODUCT_VERSION_PATCH}) set(OPENVPN_VERSION_RESOURCE ${PRODUCT_VERSION_RESOURCE}) -set(CMAKE_C_STANDARD 99) +set(CMAKE_C_STANDARD 11) # Set the various defines for config.h.cmake.in if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") diff --git a/configure.ac b/configure.ac index 1f03f90..dcc46e2 100644 --- a/configure.ac +++ b/configure.ac @@ -421,10 +421,10 @@ AC_CHECK_PROGS([RST2HTML], [rst2html rst2html.py]) AM_CONDITIONAL([HAVE_PYDOCUTILS], [test "${RST2MAN}" -a "${RST2HTML}"]) -# Set -std=c99 unless user already specified a -std= +# Set -std=c11 unless user already specified a -std= case "${CFLAGS}" in *-std=*) ;; - *) CFLAGS="${CFLAGS} -std=c99" ;; + *) CFLAGS="${CFLAGS} -std=c11" ;; esac #