Skip to content

Commit ba9f358

Browse files
committed
build UPDATE use c99 standard instead of gnu99
GNU extensions are not mandatory for a long time now.
1 parent 73699b6 commit ba9f358

18 files changed

+90
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ set(LIBYANG_DEP_VERSION 2.1.19)
7676
set(LIBYANG_DEP_SOVERSION 2.28.0)
7777
set(LIBYANG_DEP_SOVERSION_MAJOR 2)
7878

79-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fvisibility=hidden -std=gnu99")
79+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fvisibility=hidden -std=c99")
8080

8181
#
8282
# options

src/io.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*/
1515

1616
#define _GNU_SOURCE /* asprintf, signals */
17+
1718
#include <assert.h>
1819
#include <errno.h>
1920
#include <inttypes.h>

src/log.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* https://opensource.org/licenses/BSD-3-Clause
1414
*/
1515

16+
#define _GNU_SOURCE /* pthread_rwlock_t */
17+
1618
#include <stdarg.h>
1719
#include <stdio.h>
1820

src/messages_client.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* https://opensource.org/licenses/BSD-3-Clause
1414
*/
1515

16+
#define _GNU_SOURCE /* pthread_rwlock_t, strdup */
17+
1618
#include <assert.h>
1719
#include <ctype.h>
1820
#include <stdarg.h>

src/messages_server.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* https://opensource.org/licenses/BSD-3-Clause
1414
*/
1515

16+
#define _GNU_SOURCE /* pthread_rwlock_t, strdup */
17+
1618
#include <ctype.h>
1719
#include <inttypes.h>
1820
#include <stdarg.h>

src/session_client_tls.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
* https://opensource.org/licenses/BSD-3-Clause
1717
*/
1818

19+
#define _GNU_SOURCE /* pthread_rwlock_t, strdup */
20+
1921
#include <assert.h>
2022
#include <errno.h>
2123
#include <string.h>

tests/client/test_client.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/**
2+
* @file test_client.c
3+
* @author David Sedlák <[email protected]>
4+
* @brief client test
5+
*
6+
* Copyright (c) 2018 CESNET, z.s.p.o.
7+
*
8+
* This source code is licensed under BSD 3-Clause License (the "License").
9+
* You may not use this file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* https://opensource.org/licenses/BSD-3-Clause
13+
*/
14+
15+
#define _GNU_SOURCE
16+
117
#include <errno.h>
218
#include <setjmp.h>
319
#include <stdio.h>

tests/client/test_client_messages.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/**
2+
* @file test_client_messages.c
3+
* @author David Sedlák <[email protected]>
4+
* @brief client messages test
5+
*
6+
* Copyright (c) 2018 CESNET, z.s.p.o.
7+
*
8+
* This source code is licensed under BSD 3-Clause License (the "License").
9+
* You may not use this file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* https://opensource.org/licenses/BSD-3-Clause
13+
*/
14+
15+
#define _GNU_SOURCE
16+
117
#include <errno.h>
218
#include <setjmp.h>
319
#include <stdio.h>

tests/client/test_client_ssh.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/**
2+
* @file test_client_ssh.c
3+
* @author David Sedlák <[email protected]>
4+
* @brief client SSH test
5+
*
6+
* Copyright (c) 2018 CESNET, z.s.p.o.
7+
*
8+
* This source code is licensed under BSD 3-Clause License (the "License").
9+
* You may not use this file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* https://opensource.org/licenses/BSD-3-Clause
13+
*/
14+
15+
#define _GNU_SOURCE
16+
117
#include <errno.h>
218
#include <setjmp.h>
319
#include <stdio.h>

tests/client/test_client_tls.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/**
2+
* @file test_client_tls.c
3+
* @author David Sedlák <[email protected]>
4+
* @brief client TLS test
5+
*
6+
* Copyright (c) 2018 CESNET, z.s.p.o.
7+
*
8+
* This source code is licensed under BSD 3-Clause License (the "License").
9+
* You may not use this file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* https://opensource.org/licenses/BSD-3-Clause
13+
*/
14+
15+
#define _GNU_SOURCE
16+
117
#include <errno.h>
218
#include <setjmp.h>
319
#include <stdio.h>

0 commit comments

Comments
 (0)