# HG changeset patch # User Eli Zaretskii # Date 1118086107 0 # Node ID ba5fe07b939454129699d1658c5de7b95763c556 # Parent 96407b6847514a3e966cbb2fc4d60d32470ddd50 (RVA_TO_PTR): New macro. diff -r 96407b684751 -r ba5fe07b9394 src/w32proc.c --- a/src/w32proc.c Mon Jun 06 19:28:02 2005 +0000 +++ b/src/w32proc.c Mon Jun 06 19:28:27 2005 +0000 @@ -57,6 +57,11 @@ #include "syssignal.h" #include "w32term.h" +#define RVA_TO_PTR(var,section,filedata) \ + ((void *)((section)->PointerToRawData \ + + ((DWORD)(var) - (section)->VirtualAddress) \ + + (filedata).file_base)) + /* Control whether spawnve quotes arguments as necessary to ensure correct parsing by child process. Because not all uses of spawnve are careful about constructing argv arrays, we make this behaviour