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:
parent
2be0777c98
commit
7fd9827318
@ -16,6 +16,11 @@ CommonCHeaders = '
|
|||||||
#include <locale.h> // tolower
|
#include <locale.h> // tolower
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <execinfo.h> // for backtrace and backtrace_symbols_fd
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define EMPTY_STRUCT_DECLARATION
|
#define EMPTY_STRUCT_DECLARATION
|
||||||
#define OPTION_CAST(x) (x)
|
#define OPTION_CAST(x) (x)
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
module builtin
|
module builtin
|
||||||
|
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
pub fn (d double) str() string {
|
pub fn (d double) str() string {
|
||||||
buf := malloc(sizeof(double) * 5 + 1)// TODO
|
buf := malloc(sizeof(double) * 5 + 1)// TODO
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
module rand
|
module rand
|
||||||
|
|
||||||
|
#include <Security/SecRandom.h>
|
||||||
|
|
||||||
#flag darwin -framework Security
|
#flag darwin -framework Security
|
||||||
|
|
||||||
pub fn read(bytes_needed int) ?[]byte {
|
pub fn read(bytes_needed int) ?[]byte {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
module net
|
module net
|
||||||
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netinet/in.h>
|
#include <unistd.h>
|
||||||
#include <netdb.h>
|
#include <netinet/in.h>
|
||||||
|
#include <netdb.h>
|
||||||
|
@ -9,7 +9,6 @@ module os
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
$if mac {
|
$if mac {
|
||||||
#include <execinfo.h> // for backtrace and backtrace_symbols_fd
|
|
||||||
#include <libproc.h> // proc_pidpath
|
#include <libproc.h> // proc_pidpath
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <unistd.h> // sleep
|
||||||
|
|
||||||
$if !windows {
|
$if !windows {
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user