]> git.eshelyaron.com Git - emacs.git/commitdiff
(RVA_TO_PTR): New macro.
authorEli Zaretskii <eliz@gnu.org>
Mon, 6 Jun 2005 19:28:27 +0000 (19:28 +0000)
committerEli Zaretskii <eliz@gnu.org>
Mon, 6 Jun 2005 19:28:27 +0000 (19:28 +0000)
src/w32proc.c

index 9abee2bf0c289f9e5561eb35fea97091be2e7dac..48b5e2c14a3739e834dc50f15d51533f9e7212d6 100644 (file)
@@ -57,6 +57,11 @@ extern BOOL WINAPI IsValidLocale(LCID, DWORD);
 #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