Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/dll_init.h')
-rw-r--r--winsup/cygwin/dll_init.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/winsup/cygwin/dll_init.h b/winsup/cygwin/dll_init.h
index 6c102c536..8127d0bb4 100644
--- a/winsup/cygwin/dll_init.h
+++ b/winsup/cygwin/dll_init.h
@@ -1,7 +1,7 @@
/* dll_init.h
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007, 2008, 2009, 2010,
- 2011, 2012 Red Hat, Inc.
+ 2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@@ -11,7 +11,9 @@ details. */
struct per_module
{
+#ifndef __x86_64__
char ***envptr;
+#endif
void (**ctors)(void);
void (**dtors)(void);
void *data_start;
@@ -21,7 +23,9 @@ struct per_module
int (*main)(int, char **, char **);
per_module &operator = (per_process *p)
{
+#ifndef __x86_64__
envptr = p->envptr;
+#endif
ctors = p->ctors;
dtors = p->dtors;
data_start = p->data_start;
@@ -129,12 +133,12 @@ struct pefile
{
IMAGE_DOS_HEADER dos_hdr;
- char* rva (long offset) { return (char*) this + offset; }
- PIMAGE_NT_HEADERS32 pe_hdr () { return (PIMAGE_NT_HEADERS32) rva (dos_hdr.e_lfanew); }
- PIMAGE_OPTIONAL_HEADER32 optional_hdr () { return &pe_hdr ()->OptionalHeader; }
+ char* rva (ptrdiff_t offset) { return (char*) this + offset; }
+ PIMAGE_NT_HEADERS pe_hdr () { return (PIMAGE_NT_HEADERS) rva (dos_hdr.e_lfanew); }
+ PIMAGE_OPTIONAL_HEADER optional_hdr () { return &pe_hdr ()->OptionalHeader; }
PIMAGE_DATA_DIRECTORY idata_dir (DWORD which)
{
- PIMAGE_OPTIONAL_HEADER32 oh = optional_hdr ();
+ PIMAGE_OPTIONAL_HEADER oh = optional_hdr ();
return (which < oh->NumberOfRvaAndSizes)? oh->DataDirectory + which : 0;
}
};