build UPDATE use c99 standard instead of gnu99

GNU extensions are not mandatory for a long time now.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 12d49d7..2c96c62 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -76,7 +76,7 @@
 set(LIBYANG_DEP_SOVERSION 2.28.0)
 set(LIBYANG_DEP_SOVERSION_MAJOR 2)
 
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fvisibility=hidden -std=gnu99")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fvisibility=hidden -std=c99")
 
 #
 # options
diff --git a/src/io.c b/src/io.c
index d0c4c5c..b2cf495 100644
--- a/src/io.c
+++ b/src/io.c
@@ -14,6 +14,7 @@
  */
 
 #define _GNU_SOURCE /* asprintf, signals */
+
 #include <assert.h>
 #include <errno.h>
 #include <inttypes.h>
diff --git a/src/log.c b/src/log.c
index b161d50..c87b4fb 100644
--- a/src/log.c
+++ b/src/log.c
@@ -13,6 +13,8 @@
  *     https://opensource.org/licenses/BSD-3-Clause
  */
 
+#define _GNU_SOURCE /* pthread_rwlock_t */
+
 #include <stdarg.h>
 #include <stdio.h>
 
diff --git a/src/messages_client.c b/src/messages_client.c
index f655b5b..04c0b3c 100644
--- a/src/messages_client.c
+++ b/src/messages_client.c
@@ -13,6 +13,8 @@
  *     https://opensource.org/licenses/BSD-3-Clause
  */
 
+#define _GNU_SOURCE /* pthread_rwlock_t, strdup */
+
 #include <assert.h>
 #include <ctype.h>
 #include <stdarg.h>
diff --git a/src/messages_server.c b/src/messages_server.c
index 3dbff7b..078d041 100644
--- a/src/messages_server.c
+++ b/src/messages_server.c
@@ -13,6 +13,8 @@
  *     https://opensource.org/licenses/BSD-3-Clause
  */
 
+#define _GNU_SOURCE /* pthread_rwlock_t, strdup */
+
 #include <ctype.h>
 #include <inttypes.h>
 #include <stdarg.h>
diff --git a/src/session_client_tls.c b/src/session_client_tls.c
index 73f8cee..f95fd46 100644
--- a/src/session_client_tls.c
+++ b/src/session_client_tls.c
@@ -16,6 +16,8 @@
  *     https://opensource.org/licenses/BSD-3-Clause
  */
 
+#define _GNU_SOURCE /* pthread_rwlock_t, strdup */
+
 #include <assert.h>
 #include <errno.h>
 #include <string.h>
diff --git a/tests/client/test_client.c b/tests/client/test_client.c
index dcfd8c7..722d0bf 100644
--- a/tests/client/test_client.c
+++ b/tests/client/test_client.c
@@ -1,3 +1,19 @@
+/**
+ * @file test_client.c
+ * @author David Sedlák <xsedla1d@stud.fit.vutbr.cz>
+ * @brief client test
+ *
+ * Copyright (c) 2018 CESNET, z.s.p.o.
+ *
+ * This source code is licensed under BSD 3-Clause License (the "License").
+ * You may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://opensource.org/licenses/BSD-3-Clause
+ */
+
+#define _GNU_SOURCE
+
 #include <errno.h>
 #include <setjmp.h>
 #include <stdio.h>
diff --git a/tests/client/test_client_messages.c b/tests/client/test_client_messages.c
index 51a244f..989c325 100644
--- a/tests/client/test_client_messages.c
+++ b/tests/client/test_client_messages.c
@@ -1,3 +1,19 @@
+/**
+ * @file test_client_messages.c
+ * @author David Sedlák <xsedla1d@stud.fit.vutbr.cz>
+ * @brief client messages test
+ *
+ * Copyright (c) 2018 CESNET, z.s.p.o.
+ *
+ * This source code is licensed under BSD 3-Clause License (the "License").
+ * You may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://opensource.org/licenses/BSD-3-Clause
+ */
+
+#define _GNU_SOURCE
+
 #include <errno.h>
 #include <setjmp.h>
 #include <stdio.h>
diff --git a/tests/client/test_client_ssh.c b/tests/client/test_client_ssh.c
index 7021926..8d50145 100644
--- a/tests/client/test_client_ssh.c
+++ b/tests/client/test_client_ssh.c
@@ -1,3 +1,19 @@
+/**
+ * @file test_client_ssh.c
+ * @author David Sedlák <xsedla1d@stud.fit.vutbr.cz>
+ * @brief client SSH test
+ *
+ * Copyright (c) 2018 CESNET, z.s.p.o.
+ *
+ * This source code is licensed under BSD 3-Clause License (the "License").
+ * You may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://opensource.org/licenses/BSD-3-Clause
+ */
+
+#define _GNU_SOURCE
+
 #include <errno.h>
 #include <setjmp.h>
 #include <stdio.h>
diff --git a/tests/client/test_client_tls.c b/tests/client/test_client_tls.c
index 0f2b2e7..a3fd4b7 100644
--- a/tests/client/test_client_tls.c
+++ b/tests/client/test_client_tls.c
@@ -1,3 +1,19 @@
+/**
+ * @file test_client_tls.c
+ * @author David Sedlák <xsedla1d@stud.fit.vutbr.cz>
+ * @brief client TLS test
+ *
+ * Copyright (c) 2018 CESNET, z.s.p.o.
+ *
+ * This source code is licensed under BSD 3-Clause License (the "License").
+ * You may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://opensource.org/licenses/BSD-3-Clause
+ */
+
+#define _GNU_SOURCE
+
 #include <errno.h>
 #include <setjmp.h>
 #include <stdio.h>
diff --git a/tests/test_client_thread.c b/tests/test_client_thread.c
index 7df7819..9d0eda0 100644
--- a/tests/test_client_thread.c
+++ b/tests/test_client_thread.c
@@ -12,6 +12,8 @@
  *     https://opensource.org/licenses/BSD-3-Clause
  */
 
+#define _GNU_SOURCE
+
 #include <pthread.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/tests/test_fd_comm.c b/tests/test_fd_comm.c
index 8e6c2d5..2d08ab5 100644
--- a/tests/test_fd_comm.c
+++ b/tests/test_fd_comm.c
@@ -12,6 +12,8 @@
  *     https://opensource.org/licenses/BSD-3-Clause
  */
 
+#define _GNU_SOURCE
+
 #include <errno.h>
 #include <fcntl.h>
 #include <pthread.h>
diff --git a/tests/test_init_destroy_client.c b/tests/test_init_destroy_client.c
index 6b354a8..a9ee0db 100644
--- a/tests/test_init_destroy_client.c
+++ b/tests/test_init_destroy_client.c
@@ -12,6 +12,8 @@
  *     https://opensource.org/licenses/BSD-3-Clause
  */
 
+#define _GNU_SOURCE
+
 #include <errno.h>
 #include <fcntl.h>
 #include <pthread.h>
diff --git a/tests/test_init_destroy_server.c b/tests/test_init_destroy_server.c
index 64432a7..082710c 100644
--- a/tests/test_init_destroy_server.c
+++ b/tests/test_init_destroy_server.c
@@ -12,6 +12,8 @@
  *     https://opensource.org/licenses/BSD-3-Clause
  */
 
+#define _GNU_SOURCE
+
 #include <errno.h>
 #include <fcntl.h>
 #include <pthread.h>
diff --git a/tests/test_io.c b/tests/test_io.c
index f5448d3..a8de474 100644
--- a/tests/test_io.c
+++ b/tests/test_io.c
@@ -12,6 +12,8 @@
  *     https://opensource.org/licenses/BSD-3-Clause
  */
 
+#define _GNU_SOURCE
+
 #include <errno.h>
 #include <fcntl.h>
 #include <pthread.h>
diff --git a/tests/test_pam.c b/tests/test_pam.c
index 4db07d7..8fce478 100644
--- a/tests/test_pam.c
+++ b/tests/test_pam.c
@@ -13,6 +13,8 @@
  *     https://opensource.org/licenses/BSD-3-Clause
  */
 
+#define _GNU_SOURCE
+
 #include <pthread.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/tests/test_server_thread.c b/tests/test_server_thread.c
index 8f5b30b..c1f2b57 100644
--- a/tests/test_server_thread.c
+++ b/tests/test_server_thread.c
@@ -12,6 +12,8 @@
  *     https://opensource.org/licenses/BSD-3-Clause
  */
 
+#define _GNU_SOURCE
+
 #include <pthread.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/tests/test_thread_messages.c b/tests/test_thread_messages.c
index b894dcc..89eaa02 100644
--- a/tests/test_thread_messages.c
+++ b/tests/test_thread_messages.c
@@ -13,6 +13,8 @@
  *     https://opensource.org/licenses/BSD-3-Clause
  */
 
+#define _GNU_SOURCE
+
 #include <pthread.h>
 #include <stdio.h>
 #include <stdlib.h>