citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit 77dbd7b8d14995fab83f203b59825bbd34e4f557
parent f8d78af1fed1e580b5282fc7dd530e37befe5d93
Author: Kyle Milz <kyle@0x30.net>
Date:   Sat, 21 Jan 2017 22:42:12 -0700

lib: first run at win32 implmenetation

Diffstat:
Mlib_win32.c | 13++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/lib_win32.c b/lib_win32.c @@ -140,14 +140,13 @@ open_fd() } void -get_prog_name(char *buf, size_t buf_size) +citrun_os_info(struct citrun_header *h) { - if (GetModuleFileName(NULL, buf, buf_size) == 0) + pids[0] = getpid(); + + if (GetModuleFileName(NULL, h->progname, sizeof(h->progname)) == 0) Err(1, "GetModuleFileName"); -} -void -get_pids(unsigned int pids[3]) -{ - pids[0] = getpid(); + if (getcwd(h->cwd, sizeof(h->cwd)) == NULL) + strncpy(h->cwd, "", sizeof(h->cwd)); }