Index: work/nt_fork/forknt.c =================================================================== --- work/nt_fork/forknt.c (revision 32926) +++ work/nt_fork/forknt.c (revision 32927) @@ -2,6 +2,10 @@ (C)Copyright 2009 Simon Urbanek + Minor modifictions for use in pcb-rnd: + (C)Copyright 2020 Tibor 'Igor2' Palinkas + Contact: http://repo.hu/projects/pcb-rnd/contact.html + This code is partially based on the book "Windows NT/2000 Native API Reference" by Gary Nebbett (Sams Publishing, 2000, ISBN 1-57870-199-6) @@ -18,8 +22,6 @@ /* winternl.h is not part of MinGW so we have to declare whatever is needed */ -#pragma mark ntdll API types - typedef LONG NTSTATUS; typedef struct _SYSTEM_HANDLE_INFORMATION { @@ -96,8 +98,6 @@ typedef enum _SYSTEM_INFORMATION_CLASS { SystemHandleInformation = 0x10 } SYSTEM_INFORMATION_CLASS; -#pragma mark ntdll API - function entry points - typedef NTSTATUS (NTAPI *ZwWriteVirtualMemory_t)(IN HANDLE ProcessHandle, IN PVOID BaseAddress, IN PVOID Buffer, @@ -160,8 +160,6 @@ #define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS)0xC0000004L) #define STATUS_SUCCESS ((NTSTATUS)0x00000000L) -#pragma mark -- helper functions -- - #ifdef INHERIT_ALL /* set all handles belonging to this process as inheritable */ static void set_inherit_all() @@ -217,8 +215,6 @@ return (!ZwCreateProcess) ? -1 : 0; } -#pragma mark -- fork() -- - int fork(void) { if (setjmp(jenv) != 0) return 0; /* return as a child */ @@ -269,12 +265,3 @@ return (int)cid.UniqueProcess; } - -/* Dear Emacs, please be nice and use - Local Variables: - mode:c - tab-width: 4 - c-basic-offset:4 - End: -*/ -