Fix compiler errors with strict C23 standards

Fix missing/misplaced '#include "config.h"' statements. Fixes missing
  function prototypes, unknown type definitions, etc. Allows configuration
  of GCC with CFLAGS="-std=c23" instead of using default -std=gnu23.

Don't know about CLANG, MSVC, MinGW, etc, but using
gwb@stitch:~> gcc --version
gcc (SUSE Linux) 15.1.1 20250714
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Hamlib can compile in strict C23 mode, or previous standard levels.
pull/1811/head
George Baltz N3GB 2025-07-22 11:07:33 -04:00
rodzic 8469ee1737
commit 47dae3879d
11 zmienionych plików z 11 dodań i 1 usunięć

Wyświetl plik

@ -20,6 +20,7 @@
// along with fldigi. If not, see <http://www.gnu.org/licenses/>.
// ---------------------------------------------------------------------
#include "config.h"
#include <errno.h>
#include <time.h>
#include <sys/time.h>

Wyświetl plik

@ -19,6 +19,7 @@
*
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Wyświetl plik

@ -20,6 +20,7 @@
*
*/
#include "config.h"
// cppcheck-suppress *
#include <stdint.h>
// cppcheck-suppress *

Wyświetl plik

@ -20,6 +20,7 @@
*
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h> /* String function definitions */

Wyświetl plik

@ -19,6 +19,7 @@
*
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h> /* String function definitions */

Wyświetl plik

@ -19,6 +19,7 @@
*
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h> /* String function definitions */

Wyświetl plik

@ -19,6 +19,7 @@
*
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h> /* String function definitions */

Wyświetl plik

@ -20,6 +20,7 @@
*
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h> /* String function definitions */

Wyświetl plik

@ -28,6 +28,7 @@
* BUT NOT LIMITED TO, LOSS OF DATA OR DATA BEING RENDERED INACCURATE.
*/
#include "config.h"
#include <stdio.h>
#include <string.h>

Wyświetl plik

@ -35,10 +35,10 @@
* \note parameters are same as man page for each
*
*/
#include "hamlib/config.h"
#include <unistd.h>
#include <errno.h>
#include <pthread.h>
#include "hamlib/config.h"
#include "sleep.h"
#ifdef __cplusplus

Wyświetl plik

@ -1,3 +1,4 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>