From e0b93a37e27d64cd620f75c69d0c4b77435c825b Mon Sep 17 00:00:00 2001 From: krangelov Date: Mon, 15 Nov 2021 13:39:47 +0100 Subject: [PATCH] fix the compilation on Windows again --- src/runtime/c/pgf/db.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/runtime/c/pgf/db.cxx b/src/runtime/c/pgf/db.cxx index f1235a55f..64e5bab77 100644 --- a/src/runtime/c/pgf/db.cxx +++ b/src/runtime/c/pgf/db.cxx @@ -22,9 +22,6 @@ size_t getpagesize() } #define ftruncate _chsize - -typedef DWORD pid_t; - #define getpid GetCurrentProcessId static @@ -291,7 +288,11 @@ typedef struct mchunk mbin; static char slovo[5] = {'S','L','O','V','O'}; typedef struct { +#ifndef _WIN32 pid_t pid; +#else + DWORD pid; +#endif object next; } process_entry; @@ -609,7 +610,7 @@ void PgfDB::register_process(bool *is_first) PGF_INTERNAL void PgfDB::unregister_process() { - pid_t pid = getpid(); + auto pid = getpid(); process_entry *pentry = &ms->p; object *plast = NULL;