mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cc.v: build with "implicit-function-declaration" and fix declarations
required for the webassembly backend 2
This commit is contained in:
parent
1b3a21f197
commit
d98c20466e
@ -39,6 +39,9 @@ fn (v mut V) cc() {
|
||||
else {
|
||||
a << '-g'
|
||||
}
|
||||
if v.os != .msvc {
|
||||
a << '-Werror=implicit-function-declaration'
|
||||
}
|
||||
|
||||
for f in v.generate_hotcode_reloading_compiler_flags() {
|
||||
a << f
|
||||
|
@ -11,6 +11,11 @@ CommonCHeaders = '
|
||||
#include <inttypes.h> // int64_t etc
|
||||
#include <string.h> // memcpy
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <ctype.h>
|
||||
#include <locale.h> // tolower
|
||||
#endif
|
||||
|
||||
#define EMPTY_STRUCT_DECLARATION
|
||||
#define OPTION_CAST(x) (x)
|
||||
|
||||
|
@ -8,7 +8,10 @@ module os
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
|
||||
//#include <execinfo.h> // for backtrace_symbols_fd
|
||||
$if mac {
|
||||
#include <execinfo.h> // for backtrace and backtrace_symbols_fd
|
||||
#include <libproc.h> // proc_pidpath
|
||||
}
|
||||
|
||||
/*
|
||||
struct dirent {
|
||||
|
@ -12,6 +12,12 @@ const (
|
||||
)
|
||||
|
||||
#include <time.h>
|
||||
|
||||
$if !windows {
|
||||
#include <sys/time.h>
|
||||
#include <sys/wait.h>
|
||||
}
|
||||
|
||||
struct Time {
|
||||
pub:
|
||||
year int
|
||||
|
Loading…
Reference in New Issue
Block a user