changeset 63087:ba5fe07b9394

(RVA_TO_PTR): New macro.
author Eli Zaretskii <eliz@gnu.org>
date Mon, 06 Jun 2005 19:28:27 +0000
parents 96407b684751
children 292c20627319
files src/w32proc.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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