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

837 Commits

Author SHA1 Message Date
Delyan Angelov
eef9b5f168
builtin,os: fix compiling V programs with latest clang 16 on windows (clang 16 is stricter than clang 14) (#19095) 2023-08-09 15:04:44 +03:00
shove
320057df1c
os.notify: remove the meaningless [noinit] attribute of the notifier (#19075) 2023-08-07 09:19:54 +03:00
shove
301320f4b0
os.notify: implement the kqueue backend for notify.FdNotifier (#19057) 2023-08-05 07:11:07 +03:00
Delyan Angelov
32114a679a
os,term.termios: add termios.set_state/2, state.disable_echo/0, use them in os.input_password, to fix v -os wasm32_emscripten examples/2048/ 2023-07-31 10:28:45 +03:00
Delyan Angelov
4c9c515f8b
parser: remove hardcoded check for function calls for C.stat, C.sigaction, etc (#18535) 2023-06-24 08:03:12 +03:00
yuyi
caee3935a5
os: fix truncate() on windows (#18262) 2023-05-25 14:37:53 +03:00
yuyi
190f5c69ea
os: fix open_file() on windows (fix #18245) (#18253) 2023-05-25 02:50:52 +02:00
Jacques Supcik
a82fc5bea0
os: make SignalHandler public (#18115) 2023-05-06 14:59:06 +03:00
Felipe Pena
13b4cd9d58
os: fix memleak from getline on Linux (#18022) 2023-04-26 22:02:09 +03:00
Delyan Angelov
c6947fde57
os: implement Process.set_work_folder/0 to set the initial working folder of the new child process (#17946) 2023-04-13 14:48:32 +03:00
Swastik Baranwal
3d99f1f2c2
checker: disallow struct int to ptr outside unsafe (#17923) 2023-04-13 07:38:21 +02:00
Thomas Mangin
580d9cedc7
termios: new termios module (#17792)
* termio: new termio module

move the tcgetattr and tcsetattr functions in a new termio module.
The code needed refactoring as different OS have different fields
size, position and number for the C.termios structure, which
could not be correctly expressed consitently otherwise.

It has the positive side effect to reduce the number of unsafe calls.
New testing code was also added for the readline module as it is
relying of the feature.

* apply 2023 copyright to the new files too
2023-03-30 08:58:52 +03:00
Alexander Medvednikov
6756d28595 all: 2023 copyright 2023-03-28 22:55:57 +02:00
d3c0d3d.exe
54a1b66b94
os: add create_no_window parameter to Process (#17726) 2023-03-21 11:24:40 +02:00
Delyan Angelov
daa9034583
os: return the long path for os.temp_dir() on windows, even for folders like c:\someth~1 (#17623) 2023-03-14 00:51:52 +02:00
Thomas Mangin
0bd094292f
v: add support for _qnx.c.v overriding _default.c.v (#17611) 2023-03-12 19:48:36 +02:00
Ikko Eltociear Ashimine
784592af83
os: fix typo in os.v (#17519) 2023-03-07 08:30:37 +01:00
yuyi
17000ef7b6
checker: check option fn returning error (fix #17423) (#17438) 2023-03-02 15:49:50 +02:00
Haren S
acfd21e4e0
os: add #include <sys/types.h> to debugger_darwin.c.v, to fix bootstrapping on macOS <= 11 (#17446) 2023-03-01 00:06:12 +02:00
l-m
0625caad56
wasm: add a webassembly compiler backend, based on using binaryen (#17368) 2023-02-28 23:58:53 +02:00
paul-elesin
15cb18cbd2
os: make hostname and loginname functions return Result (#17414) 2023-02-27 05:21:23 +03:00
Delyan Angelov
612ac69486
ci: fix bootstrapping on macos/freebsd etc 2023-02-21 12:30:35 +02:00
Felipe Pena
82c4338b76
os: move pub fn debugger_present() bool{ to platform-specific files (better ptrace portability handling) (#17373) 2023-02-21 10:55:03 +02:00
Felipe Pena
cb976c7e17
os: fix the declaration of C.ptrace (the 4th parameter is a pointer, not an integer) (#17366) 2023-02-20 12:29:49 +02:00
Swastik Baranwal
e9a3817aed
checker: disallow enum initalization (#17361) 2023-02-19 22:22:07 +01:00
Ahmad Yasser
cad2cd5583
docs: fix typos using codespell (#17332) 2023-02-16 11:43:39 +02:00
Delyan Angelov
b13f7118ab
os,term: fix C.tcsetattr declaration (add missing int return type) 2023-02-13 15:16:23 +02:00
MatejMagat305
954843c486
os: fix default result of os.temp_dir() for termux (#17237) 2023-02-07 00:07:35 +02:00
Thomas Peißl
3aeb6179b7
os: rework mv so it works with different partitions (add fallback to os.mv_by_cp + tests) (#17065) 2023-01-22 19:02:04 +02:00
Delyan Angelov
f69b994c73
os: properly document os.uname, for both nix and windows 2023-01-22 13:18:28 +02:00
Roy Ivy III
dd55365dee
os: cleanup the output of os.uname() on windows (#17066)
* os: (WinOS) mimic current practices of `busybox` and `coreutils`

* os: trim any possible surounding whitespace
2023-01-22 11:59:42 +02:00
Thomas Peißl
ba1b31700e
os: add hint for mv_by_cp to mv (#17036) 2023-01-19 16:50:57 +02:00
Yochem van Rosmalen
0109fe66a6
os: make os.FileMode public (#16923) 2023-01-09 22:34:36 +02:00
Alexander Medvednikov
868908b80d checker: require unsafe for Struct(voidptr) casts 2023-01-06 09:28:11 +03:00
Delyan Angelov
3625a74ec5
os: add test for os.open_append (#16846)
* os: add test for os.open_append

* fix unclosed file in test_eof (it made os.open_append fail only on windows, since it got the previous file content, because the file was locked, and os.rm could not delete it)
2023-01-03 01:11:35 +02:00
yuyi
b171102b03
os: minor optimization in os.v (#16791) 2022-12-28 10:28:47 +02:00
yuyi
68883fc4d9
os: fix os.file_ext('/tmp/.gitignore') previously returning '.gitignore' => it now returns '' (#16771) 2022-12-26 12:53:38 +02:00
Felipe Pena
6a179a2926
checker: add int signedness mismatch checking for function call arguments (#16750) 2022-12-24 06:28:35 +02:00
Delyan Angelov
e419faf746
all: fix dependant->dependent typos, cleanup comments 2022-12-02 12:51:10 +02:00
yuyi
f16722596c
all: replace generic '<>' with '[]' in error messages and comments (#16571) 2022-12-02 09:22:48 +02:00
yuyi
ef5be22f81
all: replace generic <> with [] - part 2 (#16536) 2022-11-26 18:23:26 +02:00
Delyan Angelov
9bb1867be0
os: refactor err == IError(os.Eof{}) to err is os.Eof 2022-11-16 00:53:45 +02:00
yuyi
017ace6ea7
vfmt: change all '$expr' to '${expr}' (#16428) 2022-11-15 16:53:13 +03:00
shove
26d643fc5d
all: rollback to old interpolation (step 3) (#16380) 2022-11-10 15:05:34 +03:00
Swastik Baranwal
ca484430e0
checker: check int overflow for const vars (#16332) 2022-11-06 08:22:28 +03:00
Delyan Angelov
f427a5241a
os,tools: add os.vtmp_dir()
Use it to consistently place all temporary files created by tests in a overridable folder specific to the user, that is easy to cleanup later.

NOTE: os.temp_dir() on macos returns `/tmp`, and using `/tmp/v` is a problem when multiple unix users are trying to access/create/write to it.
2022-11-03 10:19:51 +02:00
Alexander Medvednikov
c6158e4519 all: remove unnecessary IError() casts 2022-10-28 19:08:30 +03:00
Alexander Medvednikov
a134c09718 os: fix font.v compilation 2022-10-27 11:13:43 +03:00
Delyan Angelov
2083e6b04c
os: cleanup APIs returning !bool to either return ! or bool (#16111) 2022-10-20 13:56:06 +03:00
Delyan Angelov
71bff213ef
builtin: make the C. WIN32 API declarations more precise, to catch errors earlier (#16090) 2022-10-17 20:23:33 +03:00