1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

all: add missing includes

This commit is contained in:
Alexander Medvednikov 2019-08-24 02:48:40 +03:00
parent 2be0777c98
commit 7fd9827318
6 changed files with 15 additions and 6 deletions

View File

@ -16,6 +16,11 @@ CommonCHeaders = '
#include <locale.h> // tolower
#endif
#ifdef __APPLE__
#include <execinfo.h> // for backtrace and backtrace_symbols_fd
#endif
#define EMPTY_STRUCT_DECLARATION
#define OPTION_CAST(x) (x)

View File

@ -5,6 +5,7 @@
module builtin
#include <float.h>
#include <math.h>
pub fn (d double) str() string {
buf := malloc(sizeof(double) * 5 + 1)// TODO

View File

@ -4,6 +4,8 @@
module rand
#include <Security/SecRandom.h>
#flag darwin -framework Security
pub fn read(bytes_needed int) ?[]byte {

View File

@ -1,5 +1,6 @@
module net
#include <sys/socket.h>
#include <unistd.h>
#include <netinet/in.h>
#include <netdb.h>

View File

@ -9,7 +9,6 @@ module os
#include <errno.h>
$if mac {
#include <execinfo.h> // for backtrace and backtrace_symbols_fd
#include <libproc.h> // proc_pidpath
}

View File

@ -12,6 +12,7 @@ const (
)
#include <time.h>
#include <unistd.h> // sleep
$if !windows {
#include <sys/time.h>