Linux build fixes.

This commit is contained in:
LoRd_MuldeR 2022-11-22 23:59:52 +01:00
parent 6739fcbf01
commit 1d914cc031
5 changed files with 11 additions and 4 deletions

View File

@ -13,7 +13,7 @@ endif
EXE_SUFFIX := .exe EXE_SUFFIX := .exe
endif endif
CFLAGS = -O3 -DNDEBUG -I../libhashset/include $(XCFLAGS) CFLAGS = -std=c99 -O3 -DNDEBUG -D_DEFAULT_SOURCE -Wpedantic -I../libhashset/include $(XCFLAGS)
SRC_PATH := src SRC_PATH := src
BIN_PATH := bin BIN_PATH := bin

View File

@ -8,6 +8,7 @@
#include <stdio.h> #include <stdio.h>
#include <time.h> #include <time.h>
#include <string.h> #include <string.h>
#include <errno.h>
#ifndef _WIN32 #ifndef _WIN32
# include <unistd.h> # include <unistd.h>

View File

@ -6,7 +6,7 @@ else ifneq ($(firstword $(filter i686-%,$(DUMPMACHINE))),)
XCFLAGS = -march=pentiumpro -mtune=intel XCFLAGS = -march=pentiumpro -mtune=intel
endif endif
CFLAGS = -O3 -DNDEBUG -Iinclude $(XCFLAGS) CFLAGS = -std=c99 -O3 -DNDEBUG -Wpedantic -Iinclude $(XCFLAGS)
SRC_PATH := src SRC_PATH := src
OBJ_PATH := obj OBJ_PATH := obj

View File

@ -3,8 +3,8 @@
/* This work has been released under the CC0 1.0 Universal license! */ /* This work has been released under the CC0 1.0 Universal license! */
/******************************************************************************/ /******************************************************************************/
#ifndef _INC_HASH_SET_H #ifndef _HASHSET_INCLUDED
#define _INC_HASH_SET_H #define _HASHSET_INCLUDED
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h> #include <stdint.h>
@ -13,6 +13,11 @@
extern "C" { extern "C" {
#endif #endif
#if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(_ERRNO_T_DEFINED)
typedef int errno_t;
#define _ERRNO_T_DEFINED 1
#endif
#define HASHSET_OPT_FAILFAST UINT16_C(0x1) #define HASHSET_OPT_FAILFAST UINT16_C(0x1)
struct _hash_set; struct _hash_set;

View File

@ -8,6 +8,7 @@
/* CRT */ /* CRT */
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <limits.h>
#include <float.h> #include <float.h>
typedef int bool_t; typedef int bool_t;