* Merge in cygwin-64bit-branch.
This commit is contained in:
@@ -13,9 +13,9 @@ details. */
|
||||
|
||||
#define __INSIDE_CYGWIN__
|
||||
|
||||
#define NO_COPY_RO __attribute__((nocommon)) __attribute__((section(".rdata_cygwin_nocopy")))
|
||||
#define NO_COPY __attribute__((nocommon)) __attribute__((section(".data_cygwin_nocopy")))
|
||||
#define NO_COPY_INIT __attribute__((section(".data_cygwin_nocopy")))
|
||||
#define _RDATA __attribute__ ((section(".rdata")))
|
||||
|
||||
#define EXPORT_ALIAS(sym,symalias) extern "C" __typeof (sym) symalias __attribute__ ((alias(#sym)));
|
||||
|
||||
@@ -33,11 +33,11 @@ details. */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
__uid32_t getuid32 ();
|
||||
__uid32_t geteuid32 ();
|
||||
int seteuid32 (__uid32_t);
|
||||
__gid32_t getegid32 (void);
|
||||
struct passwd *getpwuid32 (__uid32_t);
|
||||
uid_t getuid32 ();
|
||||
uid_t geteuid32 ();
|
||||
int seteuid32 (uid_t);
|
||||
gid_t getegid32 (void);
|
||||
struct passwd *getpwuid32 (uid_t);
|
||||
struct passwd *getpwnam (const char *);
|
||||
struct __sFILE64 *fopen64 (const char *, const char *);
|
||||
struct hostent *cygwin_gethostbyname (const char *name);
|
||||
@@ -78,15 +78,12 @@ int fcntl64 (int fd, int cmd, ...);
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include "wincap.h"
|
||||
#include "regparm.h"
|
||||
|
||||
#define __reg1 __stdcall __attribute__ ((regparm (1)))
|
||||
#define __reg2 __stdcall __attribute__ ((regparm (2)))
|
||||
#define __reg3 __stdcall __attribute__ ((regparm (3)))
|
||||
|
||||
extern const char case_folded_lower[];
|
||||
#define cyg_tolower(c) (case_folded_lower[(unsigned char)(c)])
|
||||
extern const char case_folded_upper[];
|
||||
#define cyg_toupper(c) (case_folded_upper[(unsigned char)(c)])
|
||||
extern const unsigned char case_folded_lower[];
|
||||
#define cyg_tolower(c) ((char) case_folded_lower[(unsigned char)(c)])
|
||||
extern const unsigned char case_folded_upper[];
|
||||
#define cyg_toupper(c) ((char) case_folded_upper[(unsigned char)(c)])
|
||||
|
||||
#ifndef MALLOC_DEBUG
|
||||
#define cfree newlib_cfree_dont_use
|
||||
@@ -155,18 +152,21 @@ extern int cygserver_running;
|
||||
|
||||
class per_process;
|
||||
/* cygwin .dll initialization */
|
||||
void dll_crt0 (per_process *) __asm__ ("_dll_crt0__FP11per_process");
|
||||
void dll_crt0 (per_process *) __asm__ (_SYMSTR (dll_crt0__FP11per_process));
|
||||
extern "C" void __stdcall _dll_crt0 ();
|
||||
void dll_crt0_1 (void *);
|
||||
void dll_dllcrt0_1 (void *);
|
||||
|
||||
/* dynamically loaded dll initialization */
|
||||
extern "C" int dll_dllcrt0 (HMODULE, per_process *);
|
||||
extern "C" PVOID dll_dllcrt0 (HMODULE, per_process *);
|
||||
|
||||
extern "C" void _pei386_runtime_relocator (per_process *);
|
||||
|
||||
#ifndef __x86_64__
|
||||
/* dynamically loaded dll initialization for non-cygwin apps */
|
||||
extern "C" int dll_noncygwin_dllcrt0 (HMODULE, per_process *);
|
||||
#endif /* !__x86_64__ */
|
||||
|
||||
void __reg1 do_exit (int) __attribute__ ((noreturn));
|
||||
|
||||
/* libstdc++ malloc operator wrapper support. */
|
||||
@@ -175,14 +175,16 @@ extern struct per_process_cxx_malloc default_cygwin_cxx_malloc;
|
||||
/* UID/GID */
|
||||
void uinfo_init ();
|
||||
|
||||
#define ILLEGAL_UID16 ((__uid16_t)-1)
|
||||
#define ILLEGAL_UID ((__uid32_t)-1)
|
||||
#define ILLEGAL_GID16 ((__gid16_t)-1)
|
||||
#define ILLEGAL_GID ((__gid32_t)-1)
|
||||
#define ILLEGAL_SEEK ((_off64_t)-1)
|
||||
#define ILLEGAL_UID ((uid_t)-1)
|
||||
#define ILLEGAL_GID ((gid_t)-1)
|
||||
#define ILLEGAL_SEEK ((off_t)-1)
|
||||
|
||||
#define uid16touid32(u16) ((u16)==ILLEGAL_UID16?ILLEGAL_UID:(__uid32_t)(u16))
|
||||
#define gid16togid32(g16) ((g16)==ILLEGAL_GID16?ILLEGAL_GID:(__gid32_t)(g16))
|
||||
#ifndef __x86_64__
|
||||
#define ILLEGAL_UID16 ((__uid16_t)-1)
|
||||
#define ILLEGAL_GID16 ((__gid16_t)-1)
|
||||
#define uid16touid32(u16) ((u16)==ILLEGAL_UID16?ILLEGAL_UID:(uid_t)(u16))
|
||||
#define gid16togid32(g16) ((g16)==ILLEGAL_GID16?ILLEGAL_GID:(gid_t)(g16))
|
||||
#endif
|
||||
|
||||
/* Convert LARGE_INTEGER into long long */
|
||||
#define get_ll(pl) (((long long) (pl).HighPart << 32) | (pl).LowPart)
|
||||
@@ -199,16 +201,14 @@ extern "C" int try_to_debug (bool waitloop = 1);
|
||||
void ld_preload ();
|
||||
const char *find_first_notloaded_dll (class path_conv &);
|
||||
|
||||
extern bool cygwin_finished_initializing;
|
||||
|
||||
/**************************** Miscellaneous ******************************/
|
||||
|
||||
void __stdcall set_std_handle (int);
|
||||
int __stdcall stat_dev (DWORD, int, unsigned long, struct __stat64 *);
|
||||
int __stdcall stat_dev (DWORD, int, unsigned long, struct stat *);
|
||||
|
||||
__ino64_t __reg2 hash_path_name (__ino64_t hash, PUNICODE_STRING name);
|
||||
__ino64_t __reg2 hash_path_name (__ino64_t hash, PCWSTR name);
|
||||
__ino64_t __reg2 hash_path_name (__ino64_t hash, const char *name);
|
||||
ino_t __reg2 hash_path_name (ino_t hash, PUNICODE_STRING name);
|
||||
ino_t __reg2 hash_path_name (ino_t hash, PCWSTR name);
|
||||
ino_t __reg2 hash_path_name (ino_t hash, const char *name);
|
||||
void __reg2 nofinalslash (const char *src, char *dst);
|
||||
|
||||
void __reg3 *hook_or_detect_cygwin (const char *, const void *, WORD&, HANDLE h = NULL);
|
||||
@@ -225,8 +225,6 @@ void __stdcall timeval_to_filetime (const struct timeval *, FILETIME *);
|
||||
void __stdcall set_console_title (char *);
|
||||
void init_console_handler (bool);
|
||||
|
||||
void init_global_security ();
|
||||
|
||||
void __reg2 __set_winsock_errno (const char *fn, int ln);
|
||||
#define set_winsock_errno() __set_winsock_errno (__FUNCTION__, __LINE__)
|
||||
|
||||
@@ -239,7 +237,7 @@ int __small_sprintf (char *dst, const char *fmt, ...);
|
||||
int __small_vsprintf (char *dst, const char *fmt, va_list ap);
|
||||
int __small_swprintf (PWCHAR dst, const WCHAR *fmt, ...);
|
||||
int __small_vswprintf (PWCHAR dst, const WCHAR *fmt, va_list ap);
|
||||
void multiple_cygwin_problem (const char *, unsigned, unsigned);
|
||||
void multiple_cygwin_problem (const char *, uintptr_t, uintptr_t);
|
||||
|
||||
extern "C" void vklog (int priority, const char *message, va_list ap);
|
||||
extern "C" void klog (int priority, const char *message, ...);
|
||||
@@ -249,9 +247,9 @@ int __reg3 symlink_worker (const char *, const char *, bool, bool);
|
||||
|
||||
class path_conv;
|
||||
|
||||
int __reg2 stat_worker (path_conv &pc, struct __stat64 *buf);
|
||||
int __reg2 stat_worker (path_conv &pc, struct stat *buf);
|
||||
|
||||
__ino64_t __reg2 readdir_get_ino (const char *path, bool dot_dot);
|
||||
ino_t __reg2 readdir_get_ino (const char *path, bool dot_dot);
|
||||
|
||||
/* mmap functions. */
|
||||
enum mmap_region_status
|
||||
@@ -293,13 +291,16 @@ int cygwin_gethostname (char *__name, size_t __len);
|
||||
#define NO_X ~(S_IXUSR | S_IXGRP | S_IXOTH)
|
||||
|
||||
|
||||
#ifdef __x86_64__
|
||||
extern "C" char __data_start__, __data_end__, __bss_start__, __bss_end__;
|
||||
#else
|
||||
extern "C" char _data_start__, _data_end__, _bss_start__, _bss_end__;
|
||||
#endif
|
||||
extern "C" void (*__CTOR_LIST__) (void);
|
||||
extern "C" void (*__DTOR_LIST__) (void);
|
||||
|
||||
|
||||
|
||||
#ifndef NO_GLOBALS_H
|
||||
#define _RDATA /* See globals.h */
|
||||
#include "globals.h"
|
||||
|
||||
extern inline void clear_procimptoken ()
|
||||
|
Reference in New Issue
Block a user