Cygwin: remove regparm.h

This file defines the macros __reg1, __reg2, and __reg3, which are
defined to be empty on 64-bit Cygwin.  Remove all occurrences of these
macros.
This commit is contained in:
Ken Brown 2022-05-23 15:52:52 -04:00
parent 2d9b48760c
commit 2126f966ae
78 changed files with 472 additions and 494 deletions

View File

@ -78,8 +78,8 @@ public:
~child_info (); ~child_info ();
void refresh_cygheap () { cygheap_max = ::cygheap_max; } void refresh_cygheap () { cygheap_max = ::cygheap_max; }
void ready (bool); void ready (bool);
bool __reg3 sync (int, HANDLE&, DWORD); bool sync (int, HANDLE&, DWORD);
DWORD __reg2 proc_retry (HANDLE); DWORD proc_retry (HANDLE);
bool isstraced () const {return !!(flag & _CI_STRACED);} bool isstraced () const {return !!(flag & _CI_STRACED);}
bool iscygwin () const {return !!(flag & _CI_ISCYGWIN);} bool iscygwin () const {return !!(flag & _CI_ISCYGWIN);}
bool saw_ctrl_c () const {return !!(flag & _CI_SAW_CTRL_C);} bool saw_ctrl_c () const {return !!(flag & _CI_SAW_CTRL_C);}
@ -117,7 +117,7 @@ public:
// user stack // user stack
char filler[4]; char filler[4];
child_info_fork (); child_info_fork ();
void __reg1 handle_fork (); void handle_fork ();
bool abort (const char *fmt = NULL, ...); bool abort (const char *fmt = NULL, ...);
void alloc_stack (); void alloc_stack ();
}; };
@ -158,7 +158,7 @@ public:
void reattach_children (); void reattach_children ();
void *operator new (size_t, void *p) __attribute__ ((nothrow)) {return p;} void *operator new (size_t, void *p) __attribute__ ((nothrow)) {return p;}
void set (child_info_types ci, bool b) { new (this) child_info_spawn (ci, b);} void set (child_info_types ci, bool b) { new (this) child_info_spawn (ci, b);}
void __reg1 handle_spawn (); void handle_spawn ();
void set_sem (HANDLE _sem) void set_sem (HANDLE _sem)
{ {
/* Don't leak semaphore handle into exec'ed process. */ /* Don't leak semaphore handle into exec'ed process. */
@ -193,7 +193,7 @@ public:
bool get_parent_handle (); bool get_parent_handle ();
bool has_execed_cygwin () const { return iscygwin () && has_execed (); } bool has_execed_cygwin () const { return iscygwin () && has_execed (); }
operator HANDLE& () {return hExeced;} operator HANDLE& () {return hExeced;}
int __reg3 worker (const char *, const char *const *, const char *const [], int worker (const char *, const char *const *, const char *const [],
int, int = -1, int = -1); int, int = -1, int = -1);
}; };

View File

@ -9,7 +9,6 @@ details. */
#ifndef _CYGERRNO_H #ifndef _CYGERRNO_H
#define _CYGERRNO_H #define _CYGERRNO_H
#include <errno.h> #include <errno.h>
#include "regparm.h"
struct errmap_t struct errmap_t
{ {
@ -18,10 +17,10 @@ struct errmap_t
int e; /* errno version of error */ int e; /* errno version of error */
}; };
void __reg3 seterrno_from_win_error (const char *file, int line, DWORD code); void seterrno_from_win_error (const char *file, int line, DWORD code);
void __reg3 seterrno_from_nt_status (const char *file, int line, NTSTATUS status); void seterrno_from_nt_status (const char *file, int line, NTSTATUS status);
int __reg2 geterrno_from_win_error (DWORD code = GetLastError (), int deferrno = 13 /*EACCESS*/); int geterrno_from_win_error (DWORD code = GetLastError (), int deferrno = 13 /*EACCESS*/);
int __reg2 geterrno_from_nt_status (NTSTATUS status, int deferrno = 13 /*EACCESS*/); int geterrno_from_nt_status (NTSTATUS status, int deferrno = 13 /*EACCESS*/);
inline void __attribute__ ((always_inline)) inline void __attribute__ ((always_inline))
seterrno (const char *file, int line) seterrno (const char *file, int line)
@ -42,7 +41,7 @@ __set_errno (const char *fn, int ln, int val)
#define set_errno(val) __set_errno (__PRETTY_FUNCTION__, __LINE__, (val)) #define set_errno(val) __set_errno (__PRETTY_FUNCTION__, __LINE__, (val))
int find_winsock_errno (DWORD why); int find_winsock_errno (DWORD why);
void __reg2 __set_winsock_errno (const char *fn, int ln); void __set_winsock_errno (const char *fn, int ln);
#define set_winsock_errno() __set_winsock_errno (__FUNCTION__, __LINE__) #define set_winsock_errno() __set_winsock_errno (__FUNCTION__, __LINE__)
#define get_errno() (errno) #define get_errno() (errno)

View File

@ -68,7 +68,7 @@ static NO_COPY uint32_t nthreads;
#define MVMAP_OPTIONS (FILE_MAP_WRITE) #define MVMAP_OPTIONS (FILE_MAP_WRITE)
extern "C" { extern "C" {
static void __reg1 _cfree (void *); static void _cfree (void *);
static void *__stdcall _csbrk (int); static void *__stdcall _csbrk (int);
} }
@ -331,10 +331,10 @@ _csbrk (int sbs)
/* Copyright (C) 1997, 2000 DJ Delorie */ /* Copyright (C) 1997, 2000 DJ Delorie */
static void *__reg1 _cmalloc (unsigned size); static void *_cmalloc (unsigned size);
static void *__reg2 _crealloc (void *ptr, unsigned size); static void *_crealloc (void *ptr, unsigned size);
static void *__reg1 static void *
_cmalloc (unsigned size) _cmalloc (unsigned size)
{ {
_cmalloc_entry *rvc; _cmalloc_entry *rvc;
@ -371,7 +371,7 @@ _cmalloc (unsigned size)
return rvc->data; return rvc->data;
} }
static void __reg1 static void
_cfree (void *ptr) _cfree (void *ptr)
{ {
cygheap_protect.acquire (); cygheap_protect.acquire ();
@ -382,7 +382,7 @@ _cfree (void *ptr)
cygheap_protect.release (); cygheap_protect.release ();
} }
static void *__reg2 static void *
_crealloc (void *ptr, unsigned size) _crealloc (void *ptr, unsigned size)
{ {
void *newptr; void *newptr;
@ -461,26 +461,26 @@ crealloc (void *s, size_t n, const char *fn)
return creturn (t, c, n, fn); return creturn (t, c, n, fn);
} }
extern "C" void *__reg2 extern "C" void *
crealloc (void *s, size_t n) crealloc (void *s, size_t n)
{ {
return crealloc (s, n, NULL); return crealloc (s, n, NULL);
} }
extern "C" void *__reg2 extern "C" void *
crealloc_abort (void *s, size_t n) crealloc_abort (void *s, size_t n)
{ {
return crealloc (s, n, "crealloc"); return crealloc (s, n, "crealloc");
} }
extern "C" void __reg1 extern "C" void
cfree (void *s) cfree (void *s)
{ {
assert (!inheap (s)); assert (!inheap (s));
_cfree (tocygheap (s)); _cfree (tocygheap (s));
} }
extern "C" void __reg2 extern "C" void
cfree_and_set (char *&s, char *what) cfree_and_set (char *&s, char *what)
{ {
if (s && s != almost_null) if (s && s != almost_null)
@ -499,19 +499,19 @@ ccalloc (cygheap_types x, size_t n, size_t size, const char *fn)
return creturn (x, c, n, fn); return creturn (x, c, n, fn);
} }
extern "C" void *__reg3 extern "C" void *
ccalloc (cygheap_types x, size_t n, size_t size) ccalloc (cygheap_types x, size_t n, size_t size)
{ {
return ccalloc (x, n, size, NULL); return ccalloc (x, n, size, NULL);
} }
extern "C" void *__reg3 extern "C" void *
ccalloc_abort (cygheap_types x, size_t n, size_t size) ccalloc_abort (cygheap_types x, size_t n, size_t size)
{ {
return ccalloc (x, n, size, "ccalloc"); return ccalloc (x, n, size, "ccalloc");
} }
extern "C" PWCHAR __reg1 extern "C" PWCHAR
cwcsdup (PCWSTR s) cwcsdup (PCWSTR s)
{ {
PWCHAR p = (PWCHAR) cmalloc (HEAP_STR, (wcslen (s) + 1) * sizeof (WCHAR)); PWCHAR p = (PWCHAR) cmalloc (HEAP_STR, (wcslen (s) + 1) * sizeof (WCHAR));
@ -521,7 +521,7 @@ cwcsdup (PCWSTR s)
return p; return p;
} }
extern "C" PWCHAR __reg1 extern "C" PWCHAR
cwcsdup1 (PCWSTR s) cwcsdup1 (PCWSTR s)
{ {
PWCHAR p = (PWCHAR) cmalloc (HEAP_1_STR, (wcslen (s) + 1) * sizeof (WCHAR)); PWCHAR p = (PWCHAR) cmalloc (HEAP_1_STR, (wcslen (s) + 1) * sizeof (WCHAR));
@ -531,7 +531,7 @@ cwcsdup1 (PCWSTR s)
return p; return p;
} }
extern "C" char *__reg1 extern "C" char *
cstrdup (const char *s) cstrdup (const char *s)
{ {
char *p = (char *) cmalloc (HEAP_STR, strlen (s) + 1); char *p = (char *) cmalloc (HEAP_STR, strlen (s) + 1);
@ -541,7 +541,7 @@ cstrdup (const char *s)
return p; return p;
} }
extern "C" char *__reg1 extern "C" char *
cstrdup1 (const char *s) cstrdup1 (const char *s)
{ {
char *p = (char *) cmalloc (HEAP_1_STR, strlen (s) + 1); char *p = (char *) cmalloc (HEAP_1_STR, strlen (s) + 1);
@ -660,7 +660,7 @@ init_cygheap::add_tls (_cygtls *t)
++nthreads; ++nthreads;
} }
HANDLE __reg3 HANDLE
init_cygheap::remove_tls (_cygtls *t) init_cygheap::remove_tls (_cygtls *t)
{ {
HANDLE mutex = NULL; HANDLE mutex = NULL;
@ -684,7 +684,7 @@ init_cygheap::remove_tls (_cygtls *t)
return mutex; return mutex;
} }
threadlist_t __reg2 * threadlist_t *
init_cygheap::find_tls (_cygtls *tls) init_cygheap::find_tls (_cygtls *tls)
{ {
tls_sentry here (INFINITE); tls_sentry here (INFINITE);
@ -709,7 +709,7 @@ init_cygheap::find_tls (_cygtls *tls)
return t; return t;
} }
threadlist_t __reg3 * threadlist_t *
init_cygheap::find_tls (int sig, bool& issig_wait) init_cygheap::find_tls (int sig, bool& issig_wait)
{ {
debug_printf ("sig %d\n", sig); debug_printf ("sig %d\n", sig);

View File

@ -191,7 +191,7 @@ public:
return effec_cygsid.string (buf); return effec_cygsid.string (buf);
} }
const char __reg3 *test_uid (char *&, const char *, size_t); const char *test_uid (char *&, const char *, size_t);
}; };
/* cwd cache stuff. */ /* cwd cache stuff. */
@ -350,8 +350,8 @@ struct user_heap_info
void *top; void *top;
void *max; void *max;
SIZE_T chunk; SIZE_T chunk;
void __reg2 *sbrk (ptrdiff_t); void *sbrk (ptrdiff_t);
void __reg1 init (); void init ();
}; };
class cygheap_domain_info class cygheap_domain_info
@ -585,11 +585,11 @@ struct init_cygheap: public mini_cygheap
hook_chain hooks; hook_chain hooks;
void close_ctty (); void close_ctty ();
void init_installation_root (); void init_installation_root ();
void __reg1 init_tls_list ();; void init_tls_list ();;
void __reg2 add_tls (_cygtls *); void add_tls (_cygtls *);
HANDLE __reg3 remove_tls (_cygtls *); HANDLE remove_tls (_cygtls *);
threadlist_t __reg2 *find_tls (_cygtls *); threadlist_t *find_tls (_cygtls *);
threadlist_t __reg3 *find_tls (int, bool&); threadlist_t *find_tls (int, bool&);
sigset_t compute_sigblkmask (); sigset_t compute_sigblkmask ();
void unlock_tls (threadlist_t *t) { if (t) ReleaseMutex (t->mutex); } void unlock_tls (threadlist_t *t) { if (t) ReleaseMutex (t->mutex); }
}; };

View File

@ -38,18 +38,18 @@ enum cygheap_types
}; };
extern "C" { extern "C" {
void __reg1 cfree (void *); void cfree (void *);
void *__reg2 cmalloc (cygheap_types, size_t); void *cmalloc (cygheap_types, size_t);
void *__reg2 crealloc (void *, size_t); void *crealloc (void *, size_t);
void *__reg3 ccalloc (cygheap_types, size_t, size_t); void *ccalloc (cygheap_types, size_t, size_t);
void *__reg2 cmalloc_abort (cygheap_types, size_t); void *cmalloc_abort (cygheap_types, size_t);
void *__reg2 crealloc_abort (void *, size_t); void *crealloc_abort (void *, size_t);
void *__reg3 ccalloc_abort (cygheap_types, size_t, size_t); void *ccalloc_abort (cygheap_types, size_t, size_t);
PWCHAR __reg1 cwcsdup (PCWSTR); PWCHAR cwcsdup (PCWSTR);
PWCHAR __reg1 cwcsdup1 (PCWSTR); PWCHAR cwcsdup1 (PCWSTR);
char *__reg1 cstrdup (const char *); char *cstrdup (const char *);
char *__reg1 cstrdup1 (const char *); char *cstrdup1 (const char *);
void __reg2 cfree_and_set (char *&, char * = NULL); void cfree_and_set (char *&, char * = NULL);
} }
#endif /*_CYGHEAP_MALLOC_H*/ #endif /*_CYGHEAP_MALLOC_H*/

View File

@ -9,17 +9,16 @@ details. */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "regparm.h"
void __reg1 dlfree (void *p); void dlfree (void *p);
void __reg1 *dlmalloc (size_t size); void *dlmalloc (size_t size);
void __reg2 *dlrealloc (void *p, size_t size); void *dlrealloc (void *p, size_t size);
void __reg2 *dlcalloc (size_t nmemb, size_t size); void *dlcalloc (size_t nmemb, size_t size);
void __reg2 *dlmemalign (size_t alignment, size_t bytes); void *dlmemalign (size_t alignment, size_t bytes);
void __reg1 *dlvalloc (size_t bytes); void *dlvalloc (size_t bytes);
size_t __reg1 dlmalloc_usable_size (void *p); size_t dlmalloc_usable_size (void *p);
int __reg1 dlmalloc_trim (size_t); int dlmalloc_trim (size_t);
int __reg2 dlmallopt (int p, int v); int dlmallopt (int p, int v);
void dlmalloc_stats (); void dlmalloc_stats ();
#ifdef __x86_64__ #ifdef __x86_64__

View File

@ -28,7 +28,7 @@ class cygthread
bool is_freerange; bool is_freerange;
static bool exiting; static bool exiting;
HANDLE notify_detached; HANDLE notify_detached;
void __reg1 create (); void create ();
static void CALLBACK async_create (ULONG_PTR); static void CALLBACK async_create (ULONG_PTR);
public: public:
bool terminate_thread (); bool terminate_thread ();
@ -36,7 +36,7 @@ class cygthread
static DWORD WINAPI simplestub (VOID *); static DWORD WINAPI simplestub (VOID *);
static DWORD main_thread_id; static DWORD main_thread_id;
static const char *name (DWORD = 0); static const char *name (DWORD = 0);
void __reg2 callfunc (bool) __attribute__ ((noinline, )); void callfunc (bool) __attribute__ ((noinline, ));
void auto_release () {func = NULL;} void auto_release () {func = NULL;}
void release (bool); void release (bool);
cygthread (LPTHREAD_START_ROUTINE start, unsigned n, LPVOID param, const char *name, HANDLE notify = NULL) cygthread (LPTHREAD_START_ROUTINE start, unsigned n, LPVOID param, const char *name, HANDLE notify = NULL)

View File

@ -203,27 +203,27 @@ public: /* Do NOT remove this public: line, it's a marker for gentls_offsets. */
static void call (DWORD (*) (void *, void *), void *); static void call (DWORD (*) (void *, void *), void *);
void remove (DWORD); void remove (DWORD);
void push (__tlsstack_t addr) {*stackptr++ = (__tlsstack_t) addr;} void push (__tlsstack_t addr) {*stackptr++ = (__tlsstack_t) addr;}
__tlsstack_t __reg1 pop (); __tlsstack_t pop ();
__tlsstack_t retaddr () {return stackptr[-1];} __tlsstack_t retaddr () {return stackptr[-1];}
bool isinitialized () const bool isinitialized () const
{ {
return initialized == CYGTLS_INITIALIZED; return initialized == CYGTLS_INITIALIZED;
} }
bool __reg3 interrupt_now (CONTEXT *, siginfo_t&, void *, struct sigaction&); bool interrupt_now (CONTEXT *, siginfo_t&, void *, struct sigaction&);
void __reg3 interrupt_setup (siginfo_t&, void *, struct sigaction&); void interrupt_setup (siginfo_t&, void *, struct sigaction&);
bool inside_kernel (CONTEXT *); bool inside_kernel (CONTEXT *);
void __reg2 signal_debugger (siginfo_t&); void signal_debugger (siginfo_t&);
#ifdef CYGTLS_HANDLE #ifdef CYGTLS_HANDLE
operator HANDLE () const {return tid ? tid->win32_obj_id : NULL;} operator HANDLE () const {return tid ? tid->win32_obj_id : NULL;}
#endif #endif
int __reg1 call_signal_handler (); int call_signal_handler ();
void __reg1 remove_wq (DWORD); void remove_wq (DWORD);
void __reg1 fixup_after_fork (); void fixup_after_fork ();
void __reg1 lock (); void lock ();
void __reg1 unlock (); void unlock ();
bool __reg1 locked (); bool locked ();
HANDLE get_signal_arrived (bool wait_for_lock = true) HANDLE get_signal_arrived (bool wait_for_lock = true)
{ {
if (!signal_arrived) if (!signal_arrived)
@ -263,7 +263,7 @@ public: /* Do NOT remove this public: line, it's a marker for gentls_offsets. */
void handle_SIGCONT (); void handle_SIGCONT ();
static void cleanup_early(struct _reent *); static void cleanup_early(struct _reent *);
private: private:
void __reg3 call2 (DWORD (*) (void *, void *), void *, void *); void call2 (DWORD (*) (void *, void *), void *, void *);
void remove_pending_sigs (); void remove_pending_sigs ();
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -27,7 +27,7 @@ extern LARGE_INTEGER cw_nowait_storage;
const unsigned cw_std_mask = cw_cancel | cw_cancel_self | cw_sig; const unsigned cw_std_mask = cw_cancel | cw_cancel_self | cw_sig;
DWORD __reg3 cygwait (HANDLE, PLARGE_INTEGER timeout, DWORD cygwait (HANDLE, PLARGE_INTEGER timeout,
unsigned = cw_std_mask); unsigned = cw_std_mask);
extern inline DWORD __attribute__ ((always_inline)) extern inline DWORD __attribute__ ((always_inline))

View File

@ -1137,7 +1137,7 @@ __main (void)
sig_dispatch_pending (true); sig_dispatch_pending (true);
} }
void __reg1 void
do_exit (int status) do_exit (int status)
{ {
syscall_printf ("do_exit (%d), exit_state %d", status, exit_state); syscall_printf ("do_exit (%d), exit_state %d", status, exit_state);
@ -1332,7 +1332,7 @@ are unable to find another cygwin DLL.",
} }
#ifdef DEBUGGING #ifdef DEBUGGING
void __reg1 void
cygbench (const char *s) cygbench (const char *s)
{ {
if (GetEnvironmentVariableA ("CYGWIN_BENCH", NULL, 0)) if (GetEnvironmentVariableA ("CYGWIN_BENCH", NULL, 0))

View File

@ -99,7 +99,7 @@ newh ()
return NULL; return NULL;
} }
void __reg3 void
modify_handle (const char *func, int ln, HANDLE h, const char *name, bool inh) modify_handle (const char *func, int ln, HANDLE h, const char *name, bool inh)
{ {
lock_debug here; lock_debug here;
@ -115,7 +115,7 @@ modify_handle (const char *func, int ln, HANDLE h, const char *name, bool inh)
} }
/* Add a handle to the linked list of known handles. */ /* Add a handle to the linked list of known handles. */
void __reg3 void
add_handle (const char *func, int ln, HANDLE h, const char *name, bool inh) add_handle (const char *func, int ln, HANDLE h, const char *name, bool inh)
{ {
handle_list *hl; handle_list *hl;
@ -209,7 +209,7 @@ mark_closed (const char *func, int ln, HANDLE h, const char *name, bool force)
/* Close a known handle. Complain if !force and closing a known handle or /* Close a known handle. Complain if !force and closing a known handle or
if the name of the handle being closed does not match the registered name. */ if the name of the handle being closed does not match the registered name. */
bool __reg3 bool
close_handle (const char *func, int ln, HANDLE h, const char *name, bool force) close_handle (const char *func, int ln, HANDLE h, const char *name, bool force)
{ {
bool ret; bool ret;

View File

@ -53,12 +53,12 @@ details. */
# define VerifyHandle(h) verify_handle (__PRETTY_FUNCTION__, __LINE__, (h)) # define VerifyHandle(h) verify_handle (__PRETTY_FUNCTION__, __LINE__, (h))
void debug_init (); void debug_init ();
void __reg3 add_handle (const char *, int, HANDLE, const char *, bool = false); void add_handle (const char *, int, HANDLE, const char *, bool = false);
void __reg3 verify_handle (const char *, int, HANDLE); void verify_handle (const char *, int, HANDLE);
bool __reg3 close_handle (const char *, int, HANDLE, const char *, bool); bool close_handle (const char *, int, HANDLE, const char *, bool);
extern "C" void console_printf (const char *fmt,...); extern "C" void console_printf (const char *fmt,...);
void __reg1 cygbench (const char *s); void cygbench (const char *s);
void __reg3 modify_handle (const char *, int, HANDLE, const char *, bool); void modify_handle (const char *, int, HANDLE, const char *, bool);
void setclexec (HANDLE, HANDLE, bool); void setclexec (HANDLE, HANDLE, bool);
void debug_fixup_after_fork_exec (); void debug_fixup_after_fork_exec ();

View File

@ -44,7 +44,7 @@ public:
void vfork_parent_restore (); void vfork_parent_restore ();
void vfork_child_fixup (); void vfork_child_fixup ();
fhandler_base *dup_worker (fhandler_base *oldfh, int flags); fhandler_base *dup_worker (fhandler_base *oldfh, int flags);
int extend (size_t, size_t) __reg3; int extend (size_t, size_t);
void fixup_after_fork (HANDLE); void fixup_after_fork (HANDLE);
void fixup_close (size_t, fhandler_base *); void fixup_close (size_t, fhandler_base *);
@ -57,7 +57,7 @@ public:
} }
int find_unused_handle (size_t start); int find_unused_handle (size_t start);
int find_unused_handle () { return find_unused_handle (first_fd_for_open);} int find_unused_handle () { return find_unused_handle (first_fd_for_open);}
void __reg2 release (int fd); void release (int fd);
void init_std_file_from_handle (int fd, HANDLE handle); void init_std_file_from_handle (int fd, HANDLE handle);
int dup3 (int oldfd, int newfd, int flags); int dup3 (int oldfd, int newfd, int flags);
void fixup_after_exec (); void fixup_after_exec ();

View File

@ -411,7 +411,7 @@ win_env::add_cache (const char *in_posix, const char *in_native)
to the beginning of the environment variable name. *in_posix is any to the beginning of the environment variable name. *in_posix is any
known posix value for the environment variable. Returns a pointer to known posix value for the environment variable. Returns a pointer to
the appropriate conversion structure. */ the appropriate conversion structure. */
win_env * __reg3 win_env *
getwinenv (const char *env, const char *in_posix, win_env *temp) getwinenv (const char *env, const char *in_posix, win_env *temp)
{ {
if (!match_first_char (env, WC)) if (!match_first_char (env, WC))
@ -863,7 +863,7 @@ environ_init (char **envp, int envc)
int sawTERM = 0; int sawTERM = 0;
char ** __reg2 char **
win32env_to_cygenv (PWCHAR rawenv, bool posify) win32env_to_cygenv (PWCHAR rawenv, bool posify)
{ {
tmp_pathbuf tp; tmp_pathbuf tp;
@ -921,7 +921,7 @@ env_sort (const void *a, const void *b)
return strcmp (*p, *q); return strcmp (*p, *q);
} }
char * __reg3 char *
getwinenveq (const char *name, size_t namelen, int x) getwinenveq (const char *name, size_t namelen, int x)
{ {
WCHAR name0[namelen - 1]; WCHAR name0[namelen - 1];
@ -956,7 +956,7 @@ struct spenv
bool add_if_exists; /* if true, retrieve value from cache */ bool add_if_exists; /* if true, retrieve value from cache */
const char * (cygheap_user::*from_cygheap) (const char *, size_t); const char * (cygheap_user::*from_cygheap) (const char *, size_t);
char __reg3 *retrieve (bool, const char * const = NULL); char *retrieve (bool, const char * const = NULL);
}; };
#define env_dontadd almost_null #define env_dontadd almost_null
@ -1056,7 +1056,7 @@ env_compare (const void *key, const void *memb)
child_info_spawn::worker. If so, we're also fetching the Windows default child_info_spawn::worker. If so, we're also fetching the Windows default
environment for the new user, and merge it into the environment we propage environment for the new user, and merge it into the environment we propage
to the child. */ to the child. */
char ** __reg3 char **
build_env (const char * const *envp, PWCHAR &envblock, int &envc, build_env (const char * const *envp, PWCHAR &envblock, int &envc,
bool no_envblock, HANDLE new_token) bool no_envblock, HANDLE new_token)
{ {

View File

@ -7,7 +7,7 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */ details. */
/* Initialize the environment */ /* Initialize the environment */
void __reg2 environ_init (char **, int); void environ_init (char **, int);
/* The structure below is used to control conversion to/from posix-style /* The structure below is used to control conversion to/from posix-style
file specs. Currently, only PATH and HOME are converted, but PATH file specs. Currently, only PATH and HOME are converted, but PATH
@ -22,7 +22,7 @@ struct win_env
ssize_t (*toposix) (const void *, void *, size_t); ssize_t (*toposix) (const void *, void *, size_t);
ssize_t (*towin32) (const void *, void *, size_t); ssize_t (*towin32) (const void *, void *, size_t);
bool immediate; bool immediate;
void __reg3 add_cache (const char *in_posix, const char *in_native = NULL); void add_cache (const char *in_posix, const char *in_native = NULL);
const char * get_native () const {return native ? native + namelen : NULL;} const char * get_native () const {return native ? native + namelen : NULL;}
const char * get_posix () const {return posix ? posix : NULL;} const char * get_posix () const {return posix ? posix : NULL;}
struct win_env& operator = (struct win_env& x); struct win_env& operator = (struct win_env& x);
@ -30,8 +30,8 @@ struct win_env
~win_env (); ~win_env ();
}; };
win_env * __reg3 getwinenv (const char *name, const char *posix = NULL, win_env * = NULL); win_env *getwinenv (const char *name, const char *posix = NULL, win_env * = NULL);
char * __reg3 getwinenveq (const char *name, size_t len, int); char *getwinenveq (const char *name, size_t len, int);
#ifdef __x86_64__ #ifdef __x86_64__
#define update_envptrs() #define update_envptrs()
@ -42,9 +42,9 @@ void __stdcall update_envptrs ();
extern "C" char **__cygwin_environ, ***main_environ; extern "C" char **__cygwin_environ, ***main_environ;
extern "C" char __stdcall **cur_environ (); extern "C" char __stdcall **cur_environ ();
#endif #endif
char ** __reg3 build_env (const char * const *envp, PWCHAR &envblock, char **build_env (const char * const *envp, PWCHAR &envblock,
int &envc, bool need_envblock, HANDLE new_token); int &envc, bool need_envblock, HANDLE new_token);
char ** __reg2 win32env_to_cygenv (PWCHAR rawenv, bool posify); char **win32env_to_cygenv (PWCHAR rawenv, bool posify);
#define ENV_CVT -1 #define ENV_CVT -1

View File

@ -314,7 +314,7 @@ const char *_sys_errlist[] =
int NO_COPY_INIT _sys_nerr = sizeof (_sys_errlist) / sizeof (_sys_errlist[0]); int NO_COPY_INIT _sys_nerr = sizeof (_sys_errlist) / sizeof (_sys_errlist[0]);
}; };
int __reg2 int
geterrno_from_win_error (DWORD code, int deferrno) geterrno_from_win_error (DWORD code, int deferrno)
{ {
for (int i = 0; errmap[i].w != 0; ++i) for (int i = 0; errmap[i].w != 0; ++i)
@ -331,14 +331,14 @@ geterrno_from_win_error (DWORD code, int deferrno)
/* seterrno_from_win_error: Given a Windows error code, set errno /* seterrno_from_win_error: Given a Windows error code, set errno
as appropriate. */ as appropriate. */
void __reg3 void
seterrno_from_win_error (const char *file, int line, DWORD code) seterrno_from_win_error (const char *file, int line, DWORD code)
{ {
syscall_printf ("%s:%d windows error %u", file, line, code); syscall_printf ("%s:%d windows error %u", file, line, code);
errno = _impure_ptr->_errno = geterrno_from_win_error (code, EACCES); errno = _impure_ptr->_errno = geterrno_from_win_error (code, EACCES);
} }
int __reg2 int
geterrno_from_nt_status (NTSTATUS status, int deferrno) geterrno_from_nt_status (NTSTATUS status, int deferrno)
{ {
return geterrno_from_win_error (RtlNtStatusToDosError (status)); return geterrno_from_win_error (RtlNtStatusToDosError (status));
@ -346,7 +346,7 @@ geterrno_from_nt_status (NTSTATUS status, int deferrno)
/* seterrno_from_nt_status: Given a NT status code, set errno /* seterrno_from_nt_status: Given a NT status code, set errno
as appropriate. */ as appropriate. */
void __reg3 void
seterrno_from_nt_status (const char *file, int line, NTSTATUS status) seterrno_from_nt_status (const char *file, int line, NTSTATUS status)
{ {
DWORD code = RtlNtStatusToDosError (status); DWORD code = RtlNtStatusToDosError (status);

View File

@ -840,7 +840,7 @@ _cygtls::interrupt_now (CONTEXT *cx, siginfo_t& si, void *handler,
return interrupted; return interrupted;
} }
void __reg3 void
_cygtls::interrupt_setup (siginfo_t& si, void *handler, struct sigaction& siga) _cygtls::interrupt_setup (siginfo_t& si, void *handler, struct sigaction& siga)
{ {
push ((__tlsstack_t) sigdelayed); push ((__tlsstack_t) sigdelayed);
@ -1323,7 +1323,7 @@ _cygtls::handle_SIGCONT ()
sig_clear (SIGTTOU); sig_clear (SIGTTOU);
} }
int __reg1 int
sigpacket::process () sigpacket::process ()
{ {
int rc = 1; int rc = 1;

View File

@ -189,7 +189,7 @@ fhandler_base::set_flags (int flags, int supplied_bin)
/* Cover function to ReadFile to achieve (as much as possible) Posix style /* Cover function to ReadFile to achieve (as much as possible) Posix style
semantics and use of errno. */ semantics and use of errno. */
void __reg3 void
fhandler_base::raw_read (void *ptr, size_t& len) fhandler_base::raw_read (void *ptr, size_t& len)
{ {
NTSTATUS status; NTSTATUS status;
@ -256,7 +256,7 @@ retry:
/* Cover function to WriteFile to provide Posix interface and semantics /* Cover function to WriteFile to provide Posix interface and semantics
(as much as possible). */ (as much as possible). */
ssize_t __reg3 ssize_t
fhandler_base::raw_write (const void *ptr, size_t len) fhandler_base::raw_write (const void *ptr, size_t len)
{ {
NTSTATUS status; NTSTATUS status;
@ -812,7 +812,7 @@ fhandler_base::open_setup (int)
an \n. If last char is an \r, look ahead one more char, if \n then an \n. If last char is an \r, look ahead one more char, if \n then
modify \r, if not, remember char. modify \r, if not, remember char.
*/ */
void __reg3 void
fhandler_base::read (void *in_ptr, size_t& len) fhandler_base::read (void *in_ptr, size_t& len)
{ {
char *ptr = (char *) in_ptr; char *ptr = (char *) in_ptr;
@ -1145,14 +1145,14 @@ fhandler_base::lseek (off_t offset, int whence)
return res; return res;
} }
ssize_t __reg3 ssize_t
fhandler_base::pread (void *, size_t, off_t, void *) fhandler_base::pread (void *, size_t, off_t, void *)
{ {
set_errno (ESPIPE); set_errno (ESPIPE);
return -1; return -1;
} }
ssize_t __reg3 ssize_t
fhandler_base::pwrite (void *, size_t, off_t, void *) fhandler_base::pwrite (void *, size_t, off_t, void *)
{ {
set_errno (ESPIPE); set_errno (ESPIPE);
@ -1250,7 +1250,7 @@ fhandler_base::ioctl (unsigned int cmd, void *buf)
return res; return res;
} }
int __reg2 int
fhandler_base::fstat (struct stat *buf) fhandler_base::fstat (struct stat *buf)
{ {
if (is_fs_special ()) if (is_fs_special ())
@ -1288,7 +1288,7 @@ fhandler_base::fstat (struct stat *buf)
return 0; return 0;
} }
int __reg2 int
fhandler_base::fstatvfs (struct statvfs *sfs) fhandler_base::fstatvfs (struct statvfs *sfs)
{ {
/* If we hit this base implementation, it's some device in /dev. /* If we hit this base implementation, it's some device in /dev.

View File

@ -376,39 +376,39 @@ class fhandler_base
int open_fs (int, mode_t = 0); int open_fs (int, mode_t = 0);
# define archetype_usecount(n) _archetype_usecount (__PRETTY_FUNCTION__, __LINE__, (n)) # define archetype_usecount(n) _archetype_usecount (__PRETTY_FUNCTION__, __LINE__, (n))
int close_fs () { return fhandler_base::close (); } int close_fs () { return fhandler_base::close (); }
virtual int __reg2 fstat (struct stat *buf); virtual int fstat (struct stat *buf);
void __reg2 stat_fixup (struct stat *buf); void stat_fixup (struct stat *buf);
int __reg2 fstat_fs (struct stat *buf); int fstat_fs (struct stat *buf);
private: private:
int __reg2 fstat_helper (struct stat *buf); int fstat_helper (struct stat *buf);
int __reg2 fstat_by_nfs_ea (struct stat *buf); int fstat_by_nfs_ea (struct stat *buf);
int __reg2 fstat_by_handle (struct stat *buf); int fstat_by_handle (struct stat *buf);
int __reg2 fstat_by_name (struct stat *buf); int fstat_by_name (struct stat *buf);
public: public:
virtual int __reg2 fstatvfs (struct statvfs *buf); virtual int fstatvfs (struct statvfs *buf);
int __reg2 fstatvfs_by_handle (HANDLE h, struct statvfs *buf); int fstatvfs_by_handle (HANDLE h, struct statvfs *buf);
int __reg2 utimens_fs (const struct timespec *); int utimens_fs (const struct timespec *);
virtual int __reg1 fchmod (mode_t mode); virtual int fchmod (mode_t mode);
virtual int __reg2 fchown (uid_t uid, gid_t gid); virtual int fchown (uid_t uid, gid_t gid);
virtual int __reg3 facl (int, int, struct acl *); virtual int facl (int, int, struct acl *);
virtual struct __acl_t * __reg2 acl_get (uint32_t); virtual struct __acl_t *acl_get (uint32_t);
virtual int __reg3 acl_set (struct __acl_t *, uint32_t); virtual int acl_set (struct __acl_t *, uint32_t);
virtual ssize_t __reg3 fgetxattr (const char *, void *, size_t); virtual ssize_t fgetxattr (const char *, void *, size_t);
virtual int __reg3 fsetxattr (const char *, const void *, size_t, int); virtual int fsetxattr (const char *, const void *, size_t, int);
virtual int __reg3 fadvise (off_t, off_t, int); virtual int fadvise (off_t, off_t, int);
virtual int __reg3 ftruncate (off_t, bool); virtual int ftruncate (off_t, bool);
virtual int __reg2 link (const char *); virtual int link (const char *);
virtual int __reg2 utimens (const struct timespec *); virtual int utimens (const struct timespec *);
virtual int __reg1 fsync (); virtual int fsync ();
virtual int ioctl (unsigned int cmd, void *); virtual int ioctl (unsigned int cmd, void *);
virtual int fcntl (int cmd, intptr_t); virtual int fcntl (int cmd, intptr_t);
virtual char const *ttyname () { return get_name (); } virtual char const *ttyname () { return get_name (); }
virtual void __reg3 read (void *ptr, size_t& len); virtual void read (void *ptr, size_t& len);
virtual ssize_t __stdcall write (const void *ptr, size_t len); virtual ssize_t __stdcall write (const void *ptr, size_t len);
virtual ssize_t __stdcall readv (const struct iovec *, int iovcnt, ssize_t tot = -1); virtual ssize_t __stdcall readv (const struct iovec *, int iovcnt, ssize_t tot = -1);
virtual ssize_t __stdcall writev (const struct iovec *, int iovcnt, ssize_t tot = -1); virtual ssize_t __stdcall writev (const struct iovec *, int iovcnt, ssize_t tot = -1);
virtual ssize_t __reg3 pread (void *, size_t, off_t, void *aio = NULL); virtual ssize_t pread (void *, size_t, off_t, void *aio = NULL);
virtual ssize_t __reg3 pwrite (void *, size_t, off_t, void *aio = NULL); virtual ssize_t pwrite (void *, size_t, off_t, void *aio = NULL);
virtual off_t lseek (off_t offset, int whence); virtual off_t lseek (off_t offset, int whence);
virtual int lock (int, struct flock *); virtual int lock (int, struct flock *);
virtual int mand_lock (int, struct flock *); virtual int mand_lock (int, struct flock *);
@ -453,8 +453,8 @@ public:
virtual class fhandler_mqueue *is_mqueue () { return NULL; } virtual class fhandler_mqueue *is_mqueue () { return NULL; }
virtual int is_windows () {return 0; } virtual int is_windows () {return 0; }
virtual void __reg3 raw_read (void *ptr, size_t& ulen); virtual void raw_read (void *ptr, size_t& ulen);
virtual ssize_t __reg3 raw_write (const void *ptr, size_t ulen); virtual ssize_t raw_write (const void *ptr, size_t ulen);
/* Virtual accessor functions to hide the fact /* Virtual accessor functions to hide the fact
that some fd's have two handles. */ that some fd's have two handles. */
@ -482,16 +482,16 @@ public:
virtual void set_eof () {} virtual void set_eof () {}
virtual int mkdir (mode_t mode); virtual int mkdir (mode_t mode);
virtual int rmdir (); virtual int rmdir ();
virtual __reg2 DIR *opendir (int fd); virtual DIR *opendir (int fd);
virtual __reg3 int readdir (DIR *, dirent *); virtual int readdir (DIR *, dirent *);
virtual long telldir (DIR *); virtual long telldir (DIR *);
virtual void seekdir (DIR *, long); virtual void seekdir (DIR *, long);
virtual void rewinddir (DIR *); virtual void rewinddir (DIR *);
virtual int closedir (DIR *); virtual int closedir (DIR *);
bool is_fs_special () {return pc.is_fs_special ();} bool is_fs_special () {return pc.is_fs_special ();}
bool issymlink () {return pc.issymlink ();} bool issymlink () {return pc.issymlink ();}
bool __reg2 device_access_denied (int); bool device_access_denied (int);
int __reg3 fhaccess (int flags, bool); int fhaccess (int flags, bool);
fhandler_base (void *) {} fhandler_base (void *) {}
@ -592,7 +592,7 @@ class fhandler_socket: public fhandler_base
virtual ssize_t recvfrom (void *ptr, size_t len, int flags, virtual ssize_t recvfrom (void *ptr, size_t len, int flags,
struct sockaddr *from, int *fromlen) = 0; struct sockaddr *from, int *fromlen) = 0;
virtual ssize_t recvmsg (struct msghdr *msg, int flags) = 0; virtual ssize_t recvmsg (struct msghdr *msg, int flags) = 0;
virtual void __reg3 read (void *ptr, size_t& len) = 0; virtual void read (void *ptr, size_t& len) = 0;
virtual ssize_t __stdcall readv (const struct iovec *, int iovcnt, virtual ssize_t __stdcall readv (const struct iovec *, int iovcnt,
ssize_t tot = -1) = 0; ssize_t tot = -1) = 0;
@ -610,12 +610,12 @@ class fhandler_socket: public fhandler_base
virtual int fcntl (int cmd, intptr_t); virtual int fcntl (int cmd, intptr_t);
int open (int flags, mode_t mode = 0); int open (int flags, mode_t mode = 0);
int __reg2 fstat (struct stat *buf); int fstat (struct stat *buf);
int __reg2 fstatvfs (struct statvfs *buf); int fstatvfs (struct statvfs *buf);
int __reg1 fchmod (mode_t newmode); int fchmod (mode_t newmode);
int __reg2 fchown (uid_t newuid, gid_t newgid); int fchown (uid_t newuid, gid_t newgid);
int __reg3 facl (int, int, struct acl *); int facl (int, int, struct acl *);
int __reg2 link (const char *); int link (const char *);
off_t lseek (off_t, int) off_t lseek (off_t, int)
{ {
set_errno (ESPIPE); set_errno (ESPIPE);
@ -711,7 +711,7 @@ class fhandler_socket_wsock: public fhandler_socket
ssize_t recvfrom (void *ptr, size_t len, int flags, ssize_t recvfrom (void *ptr, size_t len, int flags,
struct sockaddr *from, int *fromlen); struct sockaddr *from, int *fromlen);
ssize_t recvmsg (struct msghdr *msg, int flags); ssize_t recvmsg (struct msghdr *msg, int flags);
void __reg3 read (void *ptr, size_t& len); void read (void *ptr, size_t& len);
ssize_t __stdcall readv (const struct iovec *, int iovcnt, ssize_t tot = -1); ssize_t __stdcall readv (const struct iovec *, int iovcnt, ssize_t tot = -1);
ssize_t __stdcall write (const void *ptr, size_t len); ssize_t __stdcall write (const void *ptr, size_t len);
ssize_t __stdcall writev (const struct iovec *, int iovcnt, ssize_t tot = -1); ssize_t __stdcall writev (const struct iovec *, int iovcnt, ssize_t tot = -1);
@ -856,12 +856,12 @@ class fhandler_socket_local: public fhandler_socket_wsock
int open (int flags, mode_t mode = 0); int open (int flags, mode_t mode = 0);
int close (); int close ();
int fcntl (int cmd, intptr_t); int fcntl (int cmd, intptr_t);
int __reg2 fstat (struct stat *buf); int fstat (struct stat *buf);
int __reg2 fstatvfs (struct statvfs *buf); int fstatvfs (struct statvfs *buf);
int __reg1 fchmod (mode_t newmode); int fchmod (mode_t newmode);
int __reg2 fchown (uid_t newuid, gid_t newgid); int fchown (uid_t newuid, gid_t newgid);
int __reg3 facl (int, int, struct acl *); int facl (int, int, struct acl *);
int __reg2 link (const char *); int link (const char *);
/* from here on: CLONING */ /* from here on: CLONING */
fhandler_socket_local (void *) {} fhandler_socket_local (void *) {}
@ -1120,7 +1120,7 @@ class fhandler_socket_unix : public fhandler_socket
ssize_t recvmsg (struct msghdr *msg, int flags); ssize_t recvmsg (struct msghdr *msg, int flags);
ssize_t recvfrom (void *ptr, size_t len, int flags, ssize_t recvfrom (void *ptr, size_t len, int flags,
struct sockaddr *from, int *fromlen); struct sockaddr *from, int *fromlen);
void __reg3 read (void *ptr, size_t& len); void read (void *ptr, size_t& len);
ssize_t __stdcall readv (const struct iovec *const iov, int iovcnt, ssize_t __stdcall readv (const struct iovec *const iov, int iovcnt,
ssize_t tot = -1); ssize_t tot = -1);
@ -1138,12 +1138,12 @@ class fhandler_socket_unix : public fhandler_socket
virtual int ioctl (unsigned int cmd, void *); virtual int ioctl (unsigned int cmd, void *);
virtual int fcntl (int cmd, intptr_t); virtual int fcntl (int cmd, intptr_t);
int __reg2 fstat (struct stat *buf); int fstat (struct stat *buf);
int __reg2 fstatvfs (struct statvfs *buf); int fstatvfs (struct statvfs *buf);
int __reg1 fchmod (mode_t newmode); int fchmod (mode_t newmode);
int __reg2 fchown (uid_t newuid, gid_t newgid); int fchown (uid_t newuid, gid_t newgid);
int __reg3 facl (int, int, struct acl *); int facl (int, int, struct acl *);
int __reg2 link (const char *); int link (const char *);
/* select.cc */ /* select.cc */
select_record *select_read (select_stuff *); select_record *select_read (select_stuff *);
@ -1182,7 +1182,7 @@ class fhandler_pipe_fifo: public fhandler_base
fhandler_pipe_fifo (); fhandler_pipe_fifo ();
virtual bool reader_closed () { return false; }; virtual bool reader_closed () { return false; };
ssize_t __reg3 raw_write (const void *ptr, size_t len); ssize_t raw_write (const void *ptr, size_t len);
}; };
class fhandler_pipe: public fhandler_pipe_fifo class fhandler_pipe: public fhandler_pipe_fifo
@ -1220,13 +1220,13 @@ public:
int dup (fhandler_base *child, int); int dup (fhandler_base *child, int);
void set_close_on_exec (bool val); void set_close_on_exec (bool val);
int close (); int close ();
void __reg3 raw_read (void *ptr, size_t& len); void raw_read (void *ptr, size_t& len);
int ioctl (unsigned int cmd, void *); int ioctl (unsigned int cmd, void *);
int fcntl (int cmd, intptr_t); int fcntl (int cmd, intptr_t);
int __reg2 fstat (struct stat *buf); int fstat (struct stat *buf);
int __reg2 fstatvfs (struct statvfs *buf); int fstatvfs (struct statvfs *buf);
int __reg3 fadvise (off_t, off_t, int); int fadvise (off_t, off_t, int);
int __reg3 ftruncate (off_t, bool); int ftruncate (off_t, bool);
int init (HANDLE, DWORD, mode_t, int64_t); int init (HANDLE, DWORD, mode_t, int64_t);
static int create (fhandler_pipe *[2], unsigned, int); static int create (fhandler_pipe *[2], unsigned, int);
static DWORD create (LPSECURITY_ATTRIBUTES, HANDLE *, HANDLE *, DWORD, static DWORD create (LPSECURITY_ATTRIBUTES, HANDLE *, HANDLE *, DWORD,
@ -1408,7 +1408,7 @@ class fhandler_fifo: public fhandler_pipe_fifo
/* Dynamically growing array in shared memory. */ /* Dynamically growing array in shared memory. */
fifo_client_handler *shared_fc_handler; fifo_client_handler *shared_fc_handler;
bool __reg2 wait (HANDLE); bool wait (HANDLE);
HANDLE create_pipe_instance (); HANDLE create_pipe_instance ();
NTSTATUS open_pipe (HANDLE&); NTSTATUS open_pipe (HANDLE&);
NTSTATUS wait_open_pipe (HANDLE&); NTSTATUS wait_open_pipe (HANDLE&);
@ -1505,11 +1505,11 @@ public:
int dup (fhandler_base *child, int); int dup (fhandler_base *child, int);
bool isfifo () const { return true; } bool isfifo () const { return true; }
void set_close_on_exec (bool val); void set_close_on_exec (bool val);
void __reg3 raw_read (void *ptr, size_t& ulen); void raw_read (void *ptr, size_t& ulen);
void fixup_after_fork (HANDLE); void fixup_after_fork (HANDLE);
void fixup_after_exec (); void fixup_after_exec ();
int __reg2 fstat (struct stat *buf); int fstat (struct stat *buf);
int __reg2 fstatvfs (struct statvfs *buf); int fstatvfs (struct statvfs *buf);
select_record *select_read (select_stuff *); select_record *select_read (select_stuff *);
select_record *select_write (select_stuff *); select_record *select_write (select_stuff *);
select_record *select_except (select_stuff *); select_record *select_except (select_stuff *);
@ -1558,7 +1558,7 @@ class fhandler_dev_raw: public fhandler_base
int open (int flags, mode_t mode = 0); int open (int flags, mode_t mode = 0);
int __reg2 fstat (struct stat *buf); int fstat (struct stat *buf);
int dup (fhandler_base *child, int); int dup (fhandler_base *child, int);
int ioctl (unsigned int cmd, void *buf); int ioctl (unsigned int cmd, void *buf);
@ -1620,8 +1620,8 @@ class fhandler_dev_floppy: public fhandler_dev_raw
int open (int flags, mode_t mode = 0); int open (int flags, mode_t mode = 0);
int close (); int close ();
int dup (fhandler_base *child, int); int dup (fhandler_base *child, int);
void __reg3 raw_read (void *ptr, size_t& ulen); void raw_read (void *ptr, size_t& ulen);
ssize_t __reg3 raw_write (const void *ptr, size_t ulen); ssize_t raw_write (const void *ptr, size_t ulen);
off_t lseek (off_t offset, int whence); off_t lseek (off_t offset, int whence);
int ioctl (unsigned int cmd, void *buf); int ioctl (unsigned int cmd, void *buf);
@ -1661,12 +1661,12 @@ class fhandler_dev_tape: public fhandler_dev_raw
int open (int flags, mode_t mode = 0); int open (int flags, mode_t mode = 0);
virtual int close (); virtual int close ();
void __reg3 raw_read (void *ptr, size_t& ulen); void raw_read (void *ptr, size_t& ulen);
ssize_t __reg3 raw_write (const void *ptr, size_t ulen); ssize_t raw_write (const void *ptr, size_t ulen);
virtual off_t lseek (off_t offset, int whence); virtual off_t lseek (off_t offset, int whence);
virtual int __reg2 fstat (struct stat *buf); virtual int fstat (struct stat *buf);
virtual int dup (fhandler_base *child, int); virtual int dup (fhandler_base *child, int);
virtual void fixup_after_fork (HANDLE parent); virtual void fixup_after_fork (HANDLE parent);
@ -1697,7 +1697,7 @@ class fhandler_disk_file: public fhandler_base
{ {
HANDLE prw_handle; HANDLE prw_handle;
bool prw_handle_isasync; bool prw_handle_isasync;
int __reg3 readdir_helper (DIR *, dirent *, DWORD, DWORD, PUNICODE_STRING fname); int readdir_helper (DIR *, dirent *, DWORD, DWORD, PUNICODE_STRING fname);
int prw_open (bool, void *); int prw_open (bool, void *);
uint64_t fs_ioc_getflags (); uint64_t fs_ioc_getflags ();
@ -1713,19 +1713,19 @@ class fhandler_disk_file: public fhandler_base
int dup (fhandler_base *child, int); int dup (fhandler_base *child, int);
void fixup_after_fork (HANDLE parent); void fixup_after_fork (HANDLE parent);
int mand_lock (int, struct flock *); int mand_lock (int, struct flock *);
int __reg2 fstat (struct stat *buf); int fstat (struct stat *buf);
int __reg1 fchmod (mode_t mode); int fchmod (mode_t mode);
int __reg2 fchown (uid_t uid, gid_t gid); int fchown (uid_t uid, gid_t gid);
int __reg3 facl (int, int, struct acl *); int facl (int, int, struct acl *);
struct __acl_t * __reg2 acl_get (uint32_t); struct __acl_t *acl_get (uint32_t);
int __reg3 acl_set (struct __acl_t *, uint32_t); int acl_set (struct __acl_t *, uint32_t);
ssize_t __reg3 fgetxattr (const char *, void *, size_t); ssize_t fgetxattr (const char *, void *, size_t);
int __reg3 fsetxattr (const char *, const void *, size_t, int); int fsetxattr (const char *, const void *, size_t, int);
int __reg3 fadvise (off_t, off_t, int); int fadvise (off_t, off_t, int);
int __reg3 ftruncate (off_t, bool); int ftruncate (off_t, bool);
int __reg2 link (const char *); int link (const char *);
int __reg2 utimens (const struct timespec *); int utimens (const struct timespec *);
int __reg2 fstatvfs (struct statvfs *buf); int fstatvfs (struct statvfs *buf);
int ioctl (unsigned int cmd, void *buf); int ioctl (unsigned int cmd, void *buf);
HANDLE mmap (caddr_t *addr, size_t len, int prot, int flags, off_t off); HANDLE mmap (caddr_t *addr, size_t len, int prot, int flags, off_t off);
@ -1735,15 +1735,15 @@ class fhandler_disk_file: public fhandler_base
off_t offset, SIZE_T size, void *address); off_t offset, SIZE_T size, void *address);
int mkdir (mode_t mode); int mkdir (mode_t mode);
int rmdir (); int rmdir ();
DIR __reg2 *opendir (int fd); DIR *opendir (int fd);
int __reg3 readdir (DIR *, dirent *); int readdir (DIR *, dirent *);
long telldir (DIR *); long telldir (DIR *);
void seekdir (DIR *, long); void seekdir (DIR *, long);
void rewinddir (DIR *); void rewinddir (DIR *);
int closedir (DIR *); int closedir (DIR *);
ssize_t __reg3 pread (void *, size_t, off_t, void *aio = NULL); ssize_t pread (void *, size_t, off_t, void *aio = NULL);
ssize_t __reg3 pwrite (void *, size_t, off_t, void *aio = NULL); ssize_t pwrite (void *, size_t, off_t, void *aio = NULL);
fhandler_disk_file (void *) {} fhandler_disk_file (void *) {}
dev_t get_dev () { return pc.fs_serial_number (); } dev_t get_dev () { return pc.fs_serial_number (); }
@ -1773,11 +1773,11 @@ public:
fhandler_dev (); fhandler_dev ();
int open (int flags, mode_t mode); int open (int flags, mode_t mode);
int close (); int close ();
int __reg2 fstat (struct stat *buf); int fstat (struct stat *buf);
int __reg2 fstatvfs (struct statvfs *buf); int fstatvfs (struct statvfs *buf);
int rmdir (); int rmdir ();
DIR __reg2 *opendir (int fd); DIR *opendir (int fd);
int __reg3 readdir (DIR *, dirent *); int readdir (DIR *, dirent *);
void rewinddir (DIR *); void rewinddir (DIR *);
fhandler_dev (void *) {} fhandler_dev (void *) {}
@ -1805,12 +1805,12 @@ class fhandler_cygdrive: public fhandler_disk_file
public: public:
fhandler_cygdrive (); fhandler_cygdrive ();
int open (int flags, mode_t mode); int open (int flags, mode_t mode);
DIR __reg2 *opendir (int fd); DIR *opendir (int fd);
int __reg3 readdir (DIR *, dirent *); int readdir (DIR *, dirent *);
void rewinddir (DIR *); void rewinddir (DIR *);
int closedir (DIR *); int closedir (DIR *);
int __reg2 fstat (struct stat *buf); int fstat (struct stat *buf);
int __reg2 fstatvfs (struct statvfs *buf); int fstatvfs (struct statvfs *buf);
fhandler_cygdrive (void *) {} fhandler_cygdrive (void *) {}
dev_t get_dev () { return get_device (); } dev_t get_dev () { return get_device (); }
@ -1846,8 +1846,8 @@ class fhandler_serial: public fhandler_base
int open (int flags, mode_t mode); int open (int flags, mode_t mode);
int init (HANDLE h, DWORD a, mode_t flags); int init (HANDLE h, DWORD a, mode_t flags);
void __reg3 raw_read (void *ptr, size_t& ulen); void raw_read (void *ptr, size_t& ulen);
ssize_t __reg3 raw_write (const void *ptr, size_t ulen); ssize_t raw_write (const void *ptr, size_t ulen);
int tcsendbreak (int); int tcsendbreak (int);
int tcdrain (); int tcdrain ();
int tcflow (int); int tcflow (int);
@ -2101,10 +2101,10 @@ class dev_console
int set_cl_x (cltype); int set_cl_x (cltype);
int set_cl_y (cltype); int set_cl_y (cltype);
bool fillin (HANDLE); bool fillin (HANDLE);
bool __reg3 scroll_window (HANDLE, int, int, int, int); bool scroll_window (HANDLE, int, int, int, int);
void __reg3 scroll_buffer (HANDLE, int, int, int, int, int, int); void scroll_buffer (HANDLE, int, int, int, int, int, int);
void __reg3 clear_screen (HANDLE, int, int, int, int); void clear_screen (HANDLE, int, int, int, int);
void __reg3 save_restore (HANDLE, char); void save_restore (HANDLE, char);
friend class fhandler_console; friend class fhandler_console;
}; };
@ -2155,10 +2155,10 @@ private:
void scroll_buffer (int, int, int, int, int, int); void scroll_buffer (int, int, int, int, int, int);
void scroll_buffer_screen (int, int, int, int, int, int); void scroll_buffer_screen (int, int, int, int, int, int);
void __reg3 clear_screen (cltype, cltype, cltype, cltype); void clear_screen (cltype, cltype, cltype, cltype);
void __reg3 cursor_set (bool, int, int); void cursor_set (bool, int, int);
void __reg3 cursor_get (int *, int *); void cursor_get (int *, int *);
void __reg3 cursor_rel (int, int); void cursor_rel (int, int);
inline void write_replacement_char (); inline void write_replacement_char ();
inline bool write_console (PWCHAR, DWORD, DWORD&); inline bool write_console (PWCHAR, DWORD, DWORD&);
const unsigned char *write_normal (unsigned const char*, unsigned const char *); const unsigned char *write_normal (unsigned const char*, unsigned const char *);
@ -2201,7 +2201,7 @@ private:
void post_open_setup (int fd); void post_open_setup (int fd);
int dup (fhandler_base *, int); int dup (fhandler_base *, int);
void __reg3 read (void *ptr, size_t& len); void read (void *ptr, size_t& len);
ssize_t __stdcall write (const void *ptr, size_t len); ssize_t __stdcall write (const void *ptr, size_t len);
void doecho (const void *str, DWORD len); void doecho (const void *str, DWORD len);
int close (); int close ();
@ -2387,7 +2387,7 @@ class fhandler_pty_slave: public fhandler_pty_common
int open (int flags, mode_t mode = 0); int open (int flags, mode_t mode = 0);
bool open_setup (int flags); bool open_setup (int flags);
ssize_t __stdcall write (const void *ptr, size_t len); ssize_t __stdcall write (const void *ptr, size_t len);
void __reg3 read (void *ptr, size_t& len); void read (void *ptr, size_t& len);
int init (HANDLE, DWORD, mode_t); int init (HANDLE, DWORD, mode_t);
int tcsetattr (int a, const struct termios *t); int tcsetattr (int a, const struct termios *t);
@ -2405,10 +2405,10 @@ class fhandler_pty_slave: public fhandler_pty_common
select_record *select_except (select_stuff *); select_record *select_except (select_stuff *);
bg_check_types bg_check (int sig, bool dontsignal = false); bg_check_types bg_check (int sig, bool dontsignal = false);
virtual char const *ttyname () { return pc.dev.name (); } virtual char const *ttyname () { return pc.dev.name (); }
int __reg2 fstat (struct stat *buf); int fstat (struct stat *buf);
int __reg3 facl (int, int, struct acl *); int facl (int, int, struct acl *);
int __reg1 fchmod (mode_t mode); int fchmod (mode_t mode);
int __reg2 fchown (uid_t uid, gid_t gid); int fchown (uid_t uid, gid_t gid);
fhandler_pty_slave (void *) {} fhandler_pty_slave (void *) {}
@ -2502,7 +2502,7 @@ public:
int open (int flags, mode_t mode = 0); int open (int flags, mode_t mode = 0);
bool open_setup (int flags); bool open_setup (int flags);
ssize_t __stdcall write (const void *ptr, size_t len); ssize_t __stdcall write (const void *ptr, size_t len);
void __reg3 read (void *ptr, size_t& len); void read (void *ptr, size_t& len);
int close (); int close ();
void cleanup (); void cleanup ();
@ -2579,7 +2579,7 @@ class fhandler_dev_zero: public fhandler_base
public: public:
fhandler_dev_zero (); fhandler_dev_zero ();
ssize_t __stdcall write (const void *ptr, size_t len); ssize_t __stdcall write (const void *ptr, size_t len);
void __reg3 read (void *ptr, size_t& len); void read (void *ptr, size_t& len);
off_t lseek (off_t, int) { return 0; } off_t lseek (off_t, int) { return 0; }
virtual HANDLE mmap (caddr_t *addr, size_t len, int prot, virtual HANDLE mmap (caddr_t *addr, size_t len, int prot,
@ -2618,7 +2618,7 @@ class fhandler_dev_random: public fhandler_base
public: public:
ssize_t __stdcall write (const void *ptr, size_t len); ssize_t __stdcall write (const void *ptr, size_t len);
void __reg3 read (void *ptr, size_t& len); void read (void *ptr, size_t& len);
off_t lseek (off_t, int) { return 0; } off_t lseek (off_t, int) { return 0; }
fhandler_dev_random () : fhandler_base () {} fhandler_dev_random () : fhandler_base () {}
@ -2651,9 +2651,9 @@ class fhandler_dev_clipboard: public fhandler_base
public: public:
fhandler_dev_clipboard (); fhandler_dev_clipboard ();
int is_windows () { return 1; } int is_windows () { return 1; }
int __reg2 fstat (struct stat *buf); int fstat (struct stat *buf);
ssize_t __stdcall write (const void *ptr, size_t len); ssize_t __stdcall write (const void *ptr, size_t len);
void __reg3 read (void *ptr, size_t& len); void read (void *ptr, size_t& len);
off_t lseek (off_t offset, int whence); off_t lseek (off_t offset, int whence);
int close (); int close ();
@ -2689,7 +2689,7 @@ class fhandler_windows: public fhandler_base
HWND get_hwnd () { return hWnd_; } HWND get_hwnd () { return hWnd_; }
int open (int flags, mode_t mode = 0); int open (int flags, mode_t mode = 0);
ssize_t __stdcall write (const void *ptr, size_t len); ssize_t __stdcall write (const void *ptr, size_t len);
void __reg3 read (void *ptr, size_t& len); void read (void *ptr, size_t& len);
int ioctl (unsigned int cmd, void *); int ioctl (unsigned int cmd, void *);
off_t lseek (off_t, int) { return 0; } off_t lseek (off_t, int) { return 0; }
int close () { return 0; } int close () { return 0; }
@ -2735,7 +2735,7 @@ class fhandler_dev_dsp: public fhandler_base
int open (int, mode_t mode = 0); int open (int, mode_t mode = 0);
ssize_t __stdcall write (const void *, size_t); ssize_t __stdcall write (const void *, size_t);
void __reg3 read (void *, size_t&); void read (void *, size_t&);
int ioctl (unsigned int, void *); int ioctl (unsigned int, void *);
int close (); int close ();
void fixup_after_fork (HANDLE); void fixup_after_fork (HANDLE);
@ -2743,13 +2743,13 @@ class fhandler_dev_dsp: public fhandler_base
private: private:
ssize_t __stdcall _write (const void *, size_t); ssize_t __stdcall _write (const void *, size_t);
void __reg3 _read (void *, size_t&); void _read (void *, size_t&);
int _ioctl (unsigned int, void *); int _ioctl (unsigned int, void *);
void _fixup_after_fork (HANDLE); void _fixup_after_fork (HANDLE);
void _fixup_after_exec (); void _fixup_after_exec ();
void __reg1 close_audio_in (); void close_audio_in ();
void __reg2 close_audio_out (bool = false); void close_audio_out (bool = false);
bool use_archetype () const {return true;} bool use_archetype () const {return true;}
fhandler_dev_dsp (void *) {} fhandler_dev_dsp (void *) {}
@ -2784,21 +2784,21 @@ class fhandler_virtual : public fhandler_base
virtual ~fhandler_virtual(); virtual ~fhandler_virtual();
virtual virtual_ftype_t exists(); virtual virtual_ftype_t exists();
DIR __reg2 *opendir (int fd); DIR *opendir (int fd);
long telldir (DIR *); long telldir (DIR *);
void seekdir (DIR *, long); void seekdir (DIR *, long);
void rewinddir (DIR *); void rewinddir (DIR *);
int closedir (DIR *); int closedir (DIR *);
ssize_t __stdcall write (const void *ptr, size_t len); ssize_t __stdcall write (const void *ptr, size_t len);
void __reg3 read (void *ptr, size_t& len); void read (void *ptr, size_t& len);
off_t lseek (off_t, int); off_t lseek (off_t, int);
int dup (fhandler_base *child, int); int dup (fhandler_base *child, int);
int open (int flags, mode_t mode = 0); int open (int flags, mode_t mode = 0);
int close (); int close ();
int __reg2 fstatvfs (struct statvfs *buf); int fstatvfs (struct statvfs *buf);
int __reg1 fchmod (mode_t mode); int fchmod (mode_t mode);
int __reg2 fchown (uid_t uid, gid_t gid); int fchown (uid_t uid, gid_t gid);
int __reg3 facl (int, int, struct acl *); int facl (int, int, struct acl *);
virtual bool fill_filebuf (); virtual bool fill_filebuf ();
char *get_filebuf () { return filebuf; } char *get_filebuf () { return filebuf; }
void fixup_after_exec (); void fixup_after_exec ();
@ -2826,13 +2826,13 @@ class fhandler_proc: public fhandler_virtual
public: public:
fhandler_proc (); fhandler_proc ();
virtual_ftype_t exists(); virtual_ftype_t exists();
DIR __reg2 *opendir (int fd); DIR *opendir (int fd);
int closedir (DIR *); int closedir (DIR *);
int __reg3 readdir (DIR *, dirent *); int readdir (DIR *, dirent *);
static fh_devices get_proc_fhandler (const char *path); static fh_devices get_proc_fhandler (const char *path);
int open (int flags, mode_t mode = 0); int open (int flags, mode_t mode = 0);
int __reg2 fstat (struct stat *buf); int fstat (struct stat *buf);
bool fill_filebuf (); bool fill_filebuf ();
fhandler_proc (void *) {} fhandler_proc (void *) {}
@ -2857,18 +2857,18 @@ class fhandler_procsys: public fhandler_virtual
{ {
public: public:
fhandler_procsys (); fhandler_procsys ();
virtual_ftype_t __reg2 exists(struct stat *buf); virtual_ftype_t exists(struct stat *buf);
virtual_ftype_t exists(); virtual_ftype_t exists();
DIR __reg2 *opendir (int fd); DIR *opendir (int fd);
int __reg3 readdir (DIR *, dirent *); int readdir (DIR *, dirent *);
long telldir (DIR *); long telldir (DIR *);
void seekdir (DIR *, long); void seekdir (DIR *, long);
int closedir (DIR *); int closedir (DIR *);
int open (int flags, mode_t mode = 0); int open (int flags, mode_t mode = 0);
int close (); int close ();
void __reg3 read (void *ptr, size_t& len); void read (void *ptr, size_t& len);
ssize_t __stdcall write (const void *ptr, size_t len); ssize_t __stdcall write (const void *ptr, size_t len);
int __reg2 fstat (struct stat *buf); int fstat (struct stat *buf);
bool fill_filebuf (); bool fill_filebuf ();
fhandler_procsys (void *) {} fhandler_procsys (void *) {}
@ -2895,9 +2895,9 @@ class fhandler_procsysvipc: public fhandler_proc
public: public:
fhandler_procsysvipc (); fhandler_procsysvipc ();
virtual_ftype_t exists(); virtual_ftype_t exists();
int __reg3 readdir (DIR *, dirent *); int readdir (DIR *, dirent *);
int open (int flags, mode_t mode = 0); int open (int flags, mode_t mode = 0);
int __reg2 fstat (struct stat *buf); int fstat (struct stat *buf);
bool fill_filebuf (); bool fill_filebuf ();
fhandler_procsysvipc (void *) {} fhandler_procsysvipc (void *) {}
@ -2923,13 +2923,13 @@ class fhandler_netdrive: public fhandler_virtual
public: public:
fhandler_netdrive (); fhandler_netdrive ();
virtual_ftype_t exists(); virtual_ftype_t exists();
int __reg3 readdir (DIR *, dirent *); int readdir (DIR *, dirent *);
void seekdir (DIR *, long); void seekdir (DIR *, long);
void rewinddir (DIR *); void rewinddir (DIR *);
int closedir (DIR *); int closedir (DIR *);
int open (int flags, mode_t mode = 0); int open (int flags, mode_t mode = 0);
int close (); int close ();
int __reg2 fstat (struct stat *buf); int fstat (struct stat *buf);
fhandler_netdrive (void *) {} fhandler_netdrive (void *) {}
@ -2959,15 +2959,15 @@ class fhandler_registry: public fhandler_proc
fhandler_registry (); fhandler_registry ();
void set_name (path_conv &pc); void set_name (path_conv &pc);
virtual_ftype_t exists(); virtual_ftype_t exists();
DIR __reg2 *opendir (int fd); DIR *opendir (int fd);
int __reg3 readdir (DIR *, dirent *); int readdir (DIR *, dirent *);
long telldir (DIR *); long telldir (DIR *);
void seekdir (DIR *, long); void seekdir (DIR *, long);
void rewinddir (DIR *); void rewinddir (DIR *);
int closedir (DIR *); int closedir (DIR *);
int open (int flags, mode_t mode = 0); int open (int flags, mode_t mode = 0);
int __reg2 fstat (struct stat *buf); int fstat (struct stat *buf);
bool fill_filebuf (); bool fill_filebuf ();
int close (); int close ();
int dup (fhandler_base *child, int); int dup (fhandler_base *child, int);
@ -2999,11 +2999,11 @@ class fhandler_process: public fhandler_proc
public: public:
fhandler_process (); fhandler_process ();
virtual_ftype_t exists(); virtual_ftype_t exists();
DIR __reg2 *opendir (int fd); DIR *opendir (int fd);
int closedir (DIR *); int closedir (DIR *);
int __reg3 readdir (DIR *, dirent *); int readdir (DIR *, dirent *);
int open (int flags, mode_t mode = 0); int open (int flags, mode_t mode = 0);
int __reg2 fstat (struct stat *buf); int fstat (struct stat *buf);
bool fill_filebuf (); bool fill_filebuf ();
fhandler_process (void *) {} fhandler_process (void *) {}
@ -3033,8 +3033,8 @@ class fhandler_process_fd : public fhandler_process
fhandler_process_fd (void *) {} fhandler_process_fd (void *) {}
virtual fhandler_base *fd_reopen (int, mode_t); virtual fhandler_base *fd_reopen (int, mode_t);
int __reg2 fstat (struct stat *buf); int fstat (struct stat *buf);
virtual int __reg2 link (const char *); virtual int link (const char *);
void copy_from (fhandler_base *x) void copy_from (fhandler_base *x)
{ {
@ -3059,9 +3059,9 @@ class fhandler_procnet: public fhandler_proc
fhandler_procnet (); fhandler_procnet ();
fhandler_procnet (void *) {} fhandler_procnet (void *) {}
virtual_ftype_t exists(); virtual_ftype_t exists();
int __reg3 readdir (DIR *, dirent *); int readdir (DIR *, dirent *);
int open (int flags, mode_t mode = 0); int open (int flags, mode_t mode = 0);
int __reg2 fstat (struct stat *buf); int fstat (struct stat *buf);
bool fill_filebuf (); bool fill_filebuf ();
void copy_from (fhandler_base *x) void copy_from (fhandler_base *x)
@ -3086,7 +3086,7 @@ class fhandler_dev_fd: public fhandler_virtual
fhandler_dev_fd (); fhandler_dev_fd ();
virtual_ftype_t exists(); virtual_ftype_t exists();
int __reg2 fstat (struct stat *buf); int fstat (struct stat *buf);
bool fill_filebuf (); bool fill_filebuf ();
fhandler_dev_fd (void *) {} fhandler_dev_fd (void *) {}
@ -3120,8 +3120,8 @@ class fhandler_signalfd : public fhandler_base
char *get_proc_fd_name (char *buf); char *get_proc_fd_name (char *buf);
int signalfd (const sigset_t *mask, int flags); int signalfd (const sigset_t *mask, int flags);
int __reg2 fstat (struct stat *buf); int fstat (struct stat *buf);
void __reg3 read (void *ptr, size_t& len); void read (void *ptr, size_t& len);
ssize_t __stdcall write (const void *, size_t); ssize_t __stdcall write (const void *, size_t);
int poll (); int poll ();
@ -3165,8 +3165,8 @@ class fhandler_timerfd : public fhandler_base
struct itimerspec *ovalue); struct itimerspec *ovalue);
int gettime (struct itimerspec *ovalue); int gettime (struct itimerspec *ovalue);
int __reg2 fstat (struct stat *buf); int fstat (struct stat *buf);
void __reg3 read (void *ptr, size_t& len); void read (void *ptr, size_t& len);
ssize_t __stdcall write (const void *, size_t); ssize_t __stdcall write (const void *, size_t);
int dup (fhandler_base *child, int); int dup (fhandler_base *child, int);
int ioctl (unsigned int, void *); int ioctl (unsigned int, void *);
@ -3247,19 +3247,19 @@ public:
#define NO_IMPL { set_errno (EPERM); return -1; } #define NO_IMPL { set_errno (EPERM); return -1; }
ssize_t __reg3 fgetxattr (const char *, void *, size_t) NO_IMPL; ssize_t fgetxattr (const char *, void *, size_t) NO_IMPL;
int __reg3 fsetxattr (const char *, const void *, size_t, int) NO_IMPL; int fsetxattr (const char *, const void *, size_t, int) NO_IMPL;
int __reg3 fadvise (off_t, off_t, int) NO_IMPL; int fadvise (off_t, off_t, int) NO_IMPL;
int __reg3 ftruncate (off_t, bool) NO_IMPL; int ftruncate (off_t, bool) NO_IMPL;
int __reg2 link (const char *) NO_IMPL; int link (const char *) NO_IMPL;
int mkdir (mode_t) NO_IMPL; int mkdir (mode_t) NO_IMPL;
ssize_t __reg3 pread (void *, size_t, off_t, void *aio = NULL) NO_IMPL; ssize_t pread (void *, size_t, off_t, void *aio = NULL) NO_IMPL;
ssize_t __reg3 pwrite (void *, size_t, off_t, void *aio = NULL) NO_IMPL; ssize_t pwrite (void *, size_t, off_t, void *aio = NULL) NO_IMPL;
int lock (int, struct flock *) NO_IMPL; int lock (int, struct flock *) NO_IMPL;
int mand_lock (int, struct flock *) NO_IMPL; int mand_lock (int, struct flock *) NO_IMPL;
void __reg3 read (void *, size_t&); void read (void *, size_t&);
off_t lseek (off_t, int); off_t lseek (off_t, int);
int __reg2 fstat (struct stat *); int fstat (struct stat *);
int dup (fhandler_base *, int); int dup (fhandler_base *, int);
int fcntl (int cmd, intptr_t); int fcntl (int cmd, intptr_t);
int ioctl (unsigned int, void *); int ioctl (unsigned int, void *);

View File

@ -156,7 +156,7 @@ fhandler_dev_clipboard::write (const void *buf, size_t len)
return len; return len;
} }
int __reg2 int
fhandler_dev_clipboard::fstat (struct stat *buf) fhandler_dev_clipboard::fstat (struct stat *buf)
{ {
buf->st_mode = S_IFCHR | STD_RBITS | STD_WBITS | S_IWGRP | S_IWOTH; buf->st_mode = S_IFCHR | STD_RBITS | STD_WBITS | S_IWGRP | S_IWOTH;
@ -198,7 +198,7 @@ fhandler_dev_clipboard::fstat (struct stat *buf)
return 0; return 0;
} }
void __reg3 void
fhandler_dev_clipboard::read (void *ptr, size_t& len) fhandler_dev_clipboard::read (void *ptr, size_t& len)
{ {
HGLOBAL hglb; HGLOBAL hglb;

View File

@ -833,7 +833,7 @@ fhandler_console::bg_check (int sig, bool dontsignal)
return fhandler_termios::bg_check (sig, dontsignal); return fhandler_termios::bg_check (sig, dontsignal);
} }
void __reg3 void
fhandler_console::read (void *pv, size_t& buflen) fhandler_console::read (void *pv, size_t& buflen)
{ {
termios_printf ("read(%p,%d)", pv, buflen); termios_printf ("read(%p,%d)", pv, buflen);
@ -1379,7 +1379,7 @@ dev_console::fillin (HANDLE h)
return ret; return ret;
} }
void __reg3 void
dev_console::scroll_buffer (HANDLE h, int x1, int y1, int x2, int y2, dev_console::scroll_buffer (HANDLE h, int x1, int y1, int x2, int y2,
int xn, int yn) int xn, int yn)
{ {
@ -1942,7 +1942,7 @@ dev_console::scroll_window (HANDLE h, int x1, int y1, int x2, int y2)
* Clear the screen context from x1/y1 to x2/y2 cell. * Clear the screen context from x1/y1 to x2/y2 cell.
* Negative values represents current screen dimensions * Negative values represents current screen dimensions
*/ */
void __reg3 void
fhandler_console::clear_screen (cltype xc1, cltype yc1, cltype xc2, cltype yc2) fhandler_console::clear_screen (cltype xc1, cltype yc1, cltype xc2, cltype yc2)
{ {
HANDLE h = get_output_handle (); HANDLE h = get_output_handle ();
@ -1970,7 +1970,7 @@ fhandler_console::clear_screen (cltype xc1, cltype yc1, cltype xc2, cltype yc2)
con.clear_screen (h, x1, y1, x2, y2); con.clear_screen (h, x1, y1, x2, y2);
} }
void __reg3 void
dev_console::clear_screen (HANDLE h, int x1, int y1, int x2, int y2) dev_console::clear_screen (HANDLE h, int x1, int y1, int x2, int y2)
{ {
COORD tlc; COORD tlc;
@ -1995,7 +1995,7 @@ dev_console::clear_screen (HANDLE h, int x1, int y1, int x2, int y2)
release_attach_mutex (); release_attach_mutex ();
} }
void __reg3 void
fhandler_console::cursor_set (bool rel_to_top, int x, int y) fhandler_console::cursor_set (bool rel_to_top, int x, int y)
{ {
COORD pos; COORD pos;
@ -2030,7 +2030,7 @@ fhandler_console::cursor_set (bool rel_to_top, int x, int y)
release_attach_mutex (); release_attach_mutex ();
} }
void __reg3 void
fhandler_console::cursor_rel (int x, int y) fhandler_console::cursor_rel (int x, int y)
{ {
con.fillin (get_output_handle ()); con.fillin (get_output_handle ());
@ -2039,7 +2039,7 @@ fhandler_console::cursor_rel (int x, int y)
cursor_set (false, x, y); cursor_set (false, x, y);
} }
void __reg3 void
fhandler_console::cursor_get (int *x, int *y) fhandler_console::cursor_get (int *x, int *y)
{ {
con.fillin (get_output_handle ()); con.fillin (get_output_handle ());

View File

@ -52,7 +52,7 @@ fhandler_cygdrive::fstat (struct stat *buf)
return 0; return 0;
} }
int __reg2 int
fhandler_cygdrive::fstatvfs (struct statvfs *sfs) fhandler_cygdrive::fstatvfs (struct statvfs *sfs)
{ {
/* Virtual file system. Just return an empty buffer with a few values /* Virtual file system. Just return an empty buffer with a few values

View File

@ -64,7 +64,7 @@ fhandler_dev::close ()
return fhandler_disk_file::close (); return fhandler_disk_file::close ();
} }
int __reg2 int
fhandler_dev::fstat (struct stat *st) fhandler_dev::fstat (struct stat *st)
{ {
/* If /dev really exists on disk, return correct disk information. */ /* If /dev really exists on disk, return correct disk information. */
@ -78,7 +78,7 @@ fhandler_dev::fstat (struct stat *st)
return 0; return 0;
} }
int __reg2 int
fhandler_dev::fstatvfs (struct statvfs *sfs) fhandler_dev::fstatvfs (struct statvfs *sfs)
{ {
int ret = -1, opened = 0; int ret = -1, opened = 0;

View File

@ -21,7 +21,7 @@ fhandler_dev_fd::exists ()
return virt_symlink; return virt_symlink;
} }
int __reg2 int
fhandler_dev_fd::fstat (struct stat *buf) fhandler_dev_fd::fstat (struct stat *buf)
{ {
const char *path = get_name (); const char *path = get_name ();

View File

@ -204,7 +204,7 @@ path_conv::get_ino_by_handle (HANDLE hdl)
This returns the content of a struct fattr3 as defined in RFC 1813. This returns the content of a struct fattr3 as defined in RFC 1813.
The content is the NFS equivalent of struct stat. so there's not much The content is the NFS equivalent of struct stat. so there's not much
to do here except for copying. */ to do here except for copying. */
int __reg2 int
fhandler_base::fstat_by_nfs_ea (struct stat *buf) fhandler_base::fstat_by_nfs_ea (struct stat *buf)
{ {
fattr3 *nfs_attr = pc.nfsattr (); fattr3 *nfs_attr = pc.nfsattr ();
@ -283,7 +283,7 @@ fhandler_base::fstat_by_nfs_ea (struct stat *buf)
return 0; return 0;
} }
int __reg2 int
fhandler_base::fstat_by_handle (struct stat *buf) fhandler_base::fstat_by_handle (struct stat *buf)
{ {
HANDLE h = get_stat_handle (); HANDLE h = get_stat_handle ();
@ -306,7 +306,7 @@ fhandler_base::fstat_by_handle (struct stat *buf)
return fstat_helper (buf); return fstat_helper (buf);
} }
int __reg2 int
fhandler_base::fstat_by_name (struct stat *buf) fhandler_base::fstat_by_name (struct stat *buf)
{ {
NTSTATUS status; NTSTATUS status;
@ -350,7 +350,7 @@ fhandler_base::fstat_by_name (struct stat *buf)
return fstat_helper (buf); return fstat_helper (buf);
} }
int __reg2 int
fhandler_base::fstat_fs (struct stat *buf) fhandler_base::fstat_fs (struct stat *buf)
{ {
int res = -1; int res = -1;
@ -394,7 +394,7 @@ fhandler_base::fstat_fs (struct stat *buf)
return res; return res;
} }
int __reg2 int
fhandler_base::fstat_helper (struct stat *buf) fhandler_base::fstat_helper (struct stat *buf)
{ {
IO_STATUS_BLOCK st; IO_STATUS_BLOCK st;
@ -589,13 +589,13 @@ fhandler_base::fstat_helper (struct stat *buf)
return 0; return 0;
} }
int __reg2 int
fhandler_disk_file::fstat (struct stat *buf) fhandler_disk_file::fstat (struct stat *buf)
{ {
return fstat_fs (buf); return fstat_fs (buf);
} }
int __reg2 int
fhandler_disk_file::fstatvfs (struct statvfs *sfs) fhandler_disk_file::fstatvfs (struct statvfs *sfs)
{ {
int ret = -1, opened = 0; int ret = -1, opened = 0;
@ -635,7 +635,7 @@ out:
return ret; return ret;
} }
int __reg2 int
fhandler_base::fstatvfs_by_handle (HANDLE fh, struct statvfs *sfs) fhandler_base::fstatvfs_by_handle (HANDLE fh, struct statvfs *sfs)
{ {
int ret = -1; int ret = -1;
@ -704,7 +704,7 @@ fhandler_base::fstatvfs_by_handle (HANDLE fh, struct statvfs *sfs)
return ret; return ret;
} }
int __reg1 int
fhandler_disk_file::fchmod (mode_t mode) fhandler_disk_file::fchmod (mode_t mode)
{ {
int ret = -1; int ret = -1;
@ -849,7 +849,7 @@ out:
return ret; return ret;
} }
int __reg2 int
fhandler_disk_file::fchown (uid_t uid, gid_t gid) fhandler_disk_file::fchown (uid_t uid, gid_t gid)
{ {
int oret = 0; int oret = 0;
@ -947,7 +947,7 @@ out:
return ret; return ret;
} }
int __reg3 int
fhandler_disk_file::facl (int cmd, int nentries, aclent_t *aclbufp) fhandler_disk_file::facl (int cmd, int nentries, aclent_t *aclbufp)
{ {
int res = -1; int res = -1;
@ -1562,7 +1562,7 @@ fhandler_disk_file::prw_open (bool write, void *aio)
return 0; return 0;
} }
ssize_t __reg3 ssize_t
fhandler_disk_file::pread (void *buf, size_t count, off_t offset, void *aio) fhandler_disk_file::pread (void *buf, size_t count, off_t offset, void *aio)
{ {
struct aiocb *aiocb = (struct aiocb *) aio; struct aiocb *aiocb = (struct aiocb *) aio;
@ -1666,7 +1666,7 @@ out:
return res; return res;
} }
ssize_t __reg3 ssize_t
fhandler_disk_file::pwrite (void *buf, size_t count, off_t offset, void *aio) fhandler_disk_file::pwrite (void *buf, size_t count, off_t offset, void *aio)
{ {
struct aiocb *aiocb = (struct aiocb *) aio; struct aiocb *aiocb = (struct aiocb *) aio;
@ -2025,7 +2025,7 @@ free_dir:
return res; return res;
} }
ino_t __reg2 ino_t
readdir_get_ino (const char *path, bool dot_dot) readdir_get_ino (const char *path, bool dot_dot)
{ {
char *fname; char *fname;

View File

@ -1026,7 +1026,7 @@ fhandler_dev_dsp::write (const void *ptr, size_t len)
return base ()->_write (ptr, len); return base ()->_write (ptr, len);
} }
void __reg3 void
fhandler_dev_dsp::read (void *ptr, size_t& len) fhandler_dev_dsp::read (void *ptr, size_t& len)
{ {
return base ()->_read (ptr, len); return base ()->_read (ptr, len);
@ -1139,7 +1139,7 @@ fhandler_dev_dsp::_write (const void *ptr, size_t len)
return len - len_s + written; return len - len_s + written;
} }
void __reg3 void
fhandler_dev_dsp::_read (void *ptr, size_t& len) fhandler_dev_dsp::_read (void *ptr, size_t& len)
{ {
debug_printf ("ptr=%p len=%ld", ptr, len); debug_printf ("ptr=%p len=%ld", ptr, len);
@ -1175,7 +1175,7 @@ fhandler_dev_dsp::_read (void *ptr, size_t& len)
audio_in_->read ((char *)ptr, (int&)len); audio_in_->read ((char *)ptr, (int&)len);
} }
void __reg1 void
fhandler_dev_dsp::close_audio_in () fhandler_dev_dsp::close_audio_in ()
{ {
if (audio_in_) if (audio_in_)
@ -1186,7 +1186,7 @@ fhandler_dev_dsp::close_audio_in ()
} }
} }
void __reg2 void
fhandler_dev_dsp::close_audio_out (bool immediately) fhandler_dev_dsp::close_audio_out (bool immediately)
{ {
if (audio_out_) if (audio_out_)

View File

@ -1219,7 +1219,7 @@ nt_read (HANDLE h, HANDLE evt, PIO_STATUS_BLOCK pio, void *in_ptr, size_t& len)
return status; return status;
} }
void __reg3 void
fhandler_fifo::raw_read (void *in_ptr, size_t& len) fhandler_fifo::raw_read (void *in_ptr, size_t& len)
{ {
HANDLE evt; HANDLE evt;
@ -1415,7 +1415,7 @@ out:
CloseHandle (evt); CloseHandle (evt);
} }
int __reg2 int
fhandler_fifo::fstat (struct stat *buf) fhandler_fifo::fstat (struct stat *buf)
{ {
if (reader || writer || duplexer) if (reader || writer || duplexer)
@ -1438,7 +1438,7 @@ fhandler_fifo::fstat (struct stat *buf)
return fhandler_base::fstat (buf); return fhandler_base::fstat (buf);
} }
int __reg2 int
fhandler_fifo::fstatvfs (struct statvfs *sfs) fhandler_fifo::fstatvfs (struct statvfs *sfs)
{ {
if (get_flags () & O_PATH) if (get_flags () & O_PATH)

View File

@ -392,7 +392,7 @@ fhandler_dev_floppy::get_current_position ()
return fpi.CurrentByteOffset.QuadPart; return fpi.CurrentByteOffset.QuadPart;
} }
void __reg3 void
fhandler_dev_floppy::raw_read (void *ptr, size_t& ulen) fhandler_dev_floppy::raw_read (void *ptr, size_t& ulen)
{ {
DWORD bytes_read = 0; DWORD bytes_read = 0;
@ -524,7 +524,7 @@ err:
ulen = (size_t) -1; ulen = (size_t) -1;
} }
ssize_t __reg3 ssize_t
fhandler_dev_floppy::raw_write (const void *ptr, size_t len) fhandler_dev_floppy::raw_write (const void *ptr, size_t len)
{ {
DWORD bytes_written = 0; DWORD bytes_written = 0;

View File

@ -436,7 +436,7 @@ fhandler_mqueue::fill_filebuf ()
return true; return true;
} }
void __reg3 void
fhandler_mqueue::read (void *in_ptr, size_t& len) fhandler_mqueue::read (void *in_ptr, size_t& len)
{ {
if (len == 0) if (len == 0)
@ -479,7 +479,7 @@ fhandler_mqueue::lseek (off_t offset, int whence)
} }
int __reg2 int
fhandler_mqueue::fstat (struct stat *buf) fhandler_mqueue::fstat (struct stat *buf)
{ {
int ret = fhandler_disk_file::fstat (buf); int ret = fhandler_disk_file::fstat (buf);

View File

@ -212,7 +212,7 @@ fhandler_netdrive::fhandler_netdrive ():
{ {
} }
int __reg2 int
fhandler_netdrive::fstat (struct stat *buf) fhandler_netdrive::fstat (struct stat *buf)
{ {
const char *path = get_name (); const char *path = get_name ();

View File

@ -275,7 +275,7 @@ fhandler_pipe::release_select_sem (const char *from)
ReleaseSemaphore (select_sem, n_release, NULL); ReleaseSemaphore (select_sem, n_release, NULL);
} }
void __reg3 void
fhandler_pipe::raw_read (void *ptr, size_t& len) fhandler_pipe::raw_read (void *ptr, size_t& len)
{ {
size_t nbytes = 0; size_t nbytes = 0;
@ -395,7 +395,7 @@ fhandler_pipe::reader_closed ()
return n_reader == n_writer; return n_reader == n_writer;
} }
ssize_t __reg3 ssize_t
fhandler_pipe_fifo::raw_write (const void *ptr, size_t len) fhandler_pipe_fifo::raw_write (const void *ptr, size_t len)
{ {
size_t nbytes = 0; size_t nbytes = 0;
@ -1103,7 +1103,7 @@ fhandler_pipe::fcntl (int cmd, intptr_t arg)
return res; return res;
} }
int __reg2 int
fhandler_pipe::fstat (struct stat *buf) fhandler_pipe::fstat (struct stat *buf)
{ {
int ret = fhandler_base::fstat (buf); int ret = fhandler_base::fstat (buf);
@ -1117,7 +1117,7 @@ fhandler_pipe::fstat (struct stat *buf)
return ret; return ret;
} }
int __reg2 int
fhandler_pipe::fstatvfs (struct statvfs *sfs) fhandler_pipe::fstatvfs (struct statvfs *sfs)
{ {
set_errno (EBADF); set_errno (EBADF);

View File

@ -191,7 +191,7 @@ fhandler_proc::fhandler_proc ():
{ {
} }
int __reg2 int
fhandler_proc::fstat (struct stat *buf) fhandler_proc::fstat (struct stat *buf)
{ {
const char *path = get_name (); const char *path = get_name ();

View File

@ -130,7 +130,7 @@ fhandler_process::fhandler_process ():
{ {
} }
int __reg2 int
fhandler_process::fstat (struct stat *buf) fhandler_process::fstat (struct stat *buf)
{ {
const char *path = get_name (); const char *path = get_name ();

View File

@ -127,7 +127,7 @@ fhandler_process_fd::fd_reopen (int flags, mode_t mode)
return fh; return fh;
} }
int __reg2 int
fhandler_process_fd::fstat (struct stat *statbuf) fhandler_process_fd::fstat (struct stat *statbuf)
{ {
if (!pc.follow_fd_symlink ()) if (!pc.follow_fd_symlink ())

View File

@ -69,7 +69,7 @@ fhandler_procnet::fhandler_procnet ():
{ {
} }
int __reg2 int
fhandler_procnet::fstat (struct stat *buf) fhandler_procnet::fstat (struct stat *buf)
{ {
fhandler_base::fstat (buf); fhandler_base::fstat (buf);

View File

@ -251,7 +251,7 @@ unreadable:
return false; return false;
} }
int __reg2 int
fhandler_procsys::fstat (struct stat *buf) fhandler_procsys::fstat (struct stat *buf)
{ {
const char *path = get_name (); const char *path = get_name ();
@ -426,7 +426,7 @@ fhandler_procsys::closedir (DIR *dir)
return fhandler_virtual::closedir (dir); return fhandler_virtual::closedir (dir);
} }
void __reg3 void
fhandler_procsys::read (void *ptr, size_t& len) fhandler_procsys::read (void *ptr, size_t& len)
{ {
fhandler_base::raw_read (ptr, len); fhandler_base::raw_read (ptr, len);

View File

@ -86,7 +86,7 @@ fhandler_procsysvipc::fhandler_procsysvipc ():
{ {
} }
int __reg2 int
fhandler_procsysvipc::fstat (struct stat *buf) fhandler_procsysvipc::fstat (struct stat *buf)
{ {
fhandler_base::fstat (buf); fhandler_base::fstat (buf);

View File

@ -86,7 +86,7 @@ fhandler_dev_random::pseudo_read (void *ptr, size_t len)
return len; return len;
} }
void __reg3 void
fhandler_dev_random::read (void *ptr, size_t& len) fhandler_dev_random::read (void *ptr, size_t& len)
{ {
if (!len) if (!len)

View File

@ -32,7 +32,7 @@ fhandler_dev_raw::~fhandler_dev_raw ()
delete [] devbufalloc; delete [] devbufalloc;
} }
int __reg2 int
fhandler_dev_raw::fstat (struct stat *buf) fhandler_dev_raw::fstat (struct stat *buf)
{ {
debug_printf ("here"); debug_printf ("here");

View File

@ -459,7 +459,7 @@ fhandler_proc ()
prefix_len = sizeof ("registry") - 1; prefix_len = sizeof ("registry") - 1;
} }
int __reg2 int
fhandler_registry::fstat (struct stat *buf) fhandler_registry::fstat (struct stat *buf)
{ {
fhandler_base::fstat (buf); fhandler_base::fstat (buf);

View File

@ -30,7 +30,7 @@ fhandler_serial::fhandler_serial ()
need_fork_fixup (true); need_fork_fixup (true);
} }
void __reg3 void
fhandler_serial::raw_read (void *ptr, size_t& ulen) fhandler_serial::raw_read (void *ptr, size_t& ulen)
{ {
OVERLAPPED ov = { 0 }; OVERLAPPED ov = { 0 };
@ -173,7 +173,7 @@ out:
/* Cover function to WriteFile to provide Posix interface and semantics /* Cover function to WriteFile to provide Posix interface and semantics
(as much as possible). */ (as much as possible). */
ssize_t __reg3 ssize_t
fhandler_serial::raw_write (const void *ptr, size_t len) fhandler_serial::raw_write (const void *ptr, size_t len)
{ {
DWORD bytes_written; DWORD bytes_written;

View File

@ -54,7 +54,7 @@ fhandler_signalfd::signalfd (const sigset_t *mask, int flags)
return 0; return 0;
} }
int __reg2 int
fhandler_signalfd::fstat (struct stat *buf) fhandler_signalfd::fstat (struct stat *buf)
{ {
int ret = fhandler_base::fstat (buf); int ret = fhandler_base::fstat (buf);
@ -89,7 +89,7 @@ copy_siginfo_to_signalfd (struct signalfd_siginfo *sfd,
sfd->ssi_addr = (uint64_t) si->si_addr; sfd->ssi_addr = (uint64_t) si->si_addr;
} }
void __reg3 void
fhandler_signalfd::read (void *ptr, size_t& len) fhandler_signalfd::read (void *ptr, size_t& len)
{ {
const LARGE_INTEGER poll = { QuadPart : 0 }; const LARGE_INTEGER poll = { QuadPart : 0 };

View File

@ -273,7 +273,7 @@ fhandler_socket::open (int flags, mode_t mode)
return 0; return 0;
} }
int __reg2 int
fhandler_socket::fstat (struct stat *buf) fhandler_socket::fstat (struct stat *buf)
{ {
int res; int res;
@ -293,7 +293,7 @@ fhandler_socket::fstat (struct stat *buf)
return res; return res;
} }
int __reg2 int
fhandler_socket::fstatvfs (struct statvfs *sfs) fhandler_socket::fstatvfs (struct statvfs *sfs)
{ {
memset (sfs, 0, sizeof (*sfs)); memset (sfs, 0, sizeof (*sfs));

View File

@ -1366,7 +1366,7 @@ fhandler_socket_wsock::recvmsg (struct msghdr *msg, int flags)
return ret; return ret;
} }
void __reg3 void
fhandler_socket_wsock::read (void *in_ptr, size_t& len) fhandler_socket_wsock::read (void *in_ptr, size_t& len)
{ {
char *ptr = (char *) in_ptr; char *ptr = (char *) in_ptr;

View File

@ -670,7 +670,7 @@ fhandler_socket_local::fcntl (int cmd, intptr_t arg)
return fhandler_socket_wsock::fcntl (cmd, arg); return fhandler_socket_wsock::fcntl (cmd, arg);
} }
int __reg2 int
fhandler_socket_local::fstat (struct stat *buf) fhandler_socket_local::fstat (struct stat *buf)
{ {
if (!dev ().isfs ()) if (!dev ().isfs ())
@ -687,7 +687,7 @@ fhandler_socket_local::fstat (struct stat *buf)
return res; return res;
} }
int __reg2 int
fhandler_socket_local::fstatvfs (struct statvfs *sfs) fhandler_socket_local::fstatvfs (struct statvfs *sfs)
{ {
if (!dev ().isfs ()) if (!dev ().isfs ())

View File

@ -1891,7 +1891,7 @@ fhandler_socket_unix::recvfrom (void *ptr, size_t len, int flags,
return ret; return ret;
} }
void __reg3 void
fhandler_socket_unix::read (void *ptr, size_t& len) fhandler_socket_unix::read (void *ptr, size_t& len)
{ {
set_errno (EAFNOSUPPORT); set_errno (EAFNOSUPPORT);
@ -2311,7 +2311,7 @@ fhandler_socket_unix::fcntl (int cmd, intptr_t arg)
return ret; return ret;
} }
int __reg2 int
fhandler_socket_unix::fstat (struct stat *buf) fhandler_socket_unix::fstat (struct stat *buf)
{ {
if (!dev ().isfs ()) if (!dev ().isfs ())
@ -2328,7 +2328,7 @@ fhandler_socket_unix::fstat (struct stat *buf)
return ret; return ret;
} }
int __reg2 int
fhandler_socket_unix::fstatvfs (struct statvfs *sfs) fhandler_socket_unix::fstatvfs (struct statvfs *sfs)
{ {
if (!dev ().isfs ()) if (!dev ().isfs ())

View File

@ -1269,7 +1269,7 @@ fhandler_dev_tape::close ()
return ret ? -1 : cret; return ret ? -1 : cret;
} }
void __reg3 void
fhandler_dev_tape::raw_read (void *ptr, size_t &ulen) fhandler_dev_tape::raw_read (void *ptr, size_t &ulen)
{ {
char *buf = (char *) ptr; char *buf = (char *) ptr;
@ -1371,7 +1371,7 @@ fhandler_dev_tape::raw_read (void *ptr, size_t &ulen)
unlock (); unlock ();
} }
ssize_t __reg3 ssize_t
fhandler_dev_tape::raw_write (const void *ptr, size_t len) fhandler_dev_tape::raw_write (const void *ptr, size_t len)
{ {
if (!_lock (true)) if (!_lock (true))
@ -1453,7 +1453,7 @@ out:
#endif #endif
} }
int __reg2 int
fhandler_dev_tape::fstat (struct stat *buf) fhandler_dev_tape::fstat (struct stat *buf)
{ {
int ret; int ret;

View File

@ -101,7 +101,7 @@ fhandler_timerfd::gettime (struct itimerspec *ovalue)
return ret; return ret;
} }
int __reg2 int
fhandler_timerfd::fstat (struct stat *buf) fhandler_timerfd::fstat (struct stat *buf)
{ {
int ret = fhandler_base::fstat (buf); int ret = fhandler_base::fstat (buf);
@ -114,7 +114,7 @@ fhandler_timerfd::fstat (struct stat *buf)
return ret; return ret;
} }
void __reg3 void
fhandler_timerfd::read (void *ptr, size_t& len) fhandler_timerfd::read (void *ptr, size_t& len)
{ {
if (len < sizeof (LONG64)) if (len < sizeof (LONG64))

View File

@ -1350,7 +1350,7 @@ fhandler_pty_common::to_be_read_from_nat_pipe (void)
return get_ttyp ()->nat_fg (get_ttyp ()->getpgid ()); return get_ttyp ()->nat_fg (get_ttyp ()->getpgid ());
} }
void __reg3 void
fhandler_pty_slave::read (void *ptr, size_t& len) fhandler_pty_slave::read (void *ptr, size_t& len)
{ {
ssize_t totalread = 0; ssize_t totalread = 0;
@ -1777,7 +1777,7 @@ out:
return retval; return retval;
} }
int __reg2 int
fhandler_pty_slave::fstat (struct stat *st) fhandler_pty_slave::fstat (struct stat *st)
{ {
fhandler_base::fstat (st); fhandler_base::fstat (st);
@ -1807,7 +1807,7 @@ fhandler_pty_slave::fstat (struct stat *st)
return 0; return 0;
} }
int __reg3 int
fhandler_pty_slave::facl (int cmd, int nentries, aclent_t *aclbufp) fhandler_pty_slave::facl (int cmd, int nentries, aclent_t *aclbufp)
{ {
int res = -1; int res = -1;
@ -1918,7 +1918,7 @@ fhandler_pty_slave::fch_close_handles ()
close_maybe (inuse); close_maybe (inuse);
} }
int __reg1 int
fhandler_pty_slave::fchmod (mode_t mode) fhandler_pty_slave::fchmod (mode_t mode)
{ {
int ret = -1; int ret = -1;
@ -1945,7 +1945,7 @@ errout:
return ret; return ret;
} }
int __reg2 int
fhandler_pty_slave::fchown (uid_t uid, gid_t gid) fhandler_pty_slave::fchown (uid_t uid, gid_t gid)
{ {
int ret = -1; int ret = -1;
@ -2327,7 +2327,7 @@ fhandler_pty_master::write (const void *ptr, size_t len)
return ret; return ret;
} }
void __reg3 void
fhandler_pty_master::read (void *ptr, size_t& len) fhandler_pty_master::read (void *ptr, size_t& len)
{ {
bg_check_types bg = bg_check (SIGTTIN); bg_check_types bg = bg_check (SIGTTIN);

View File

@ -177,7 +177,7 @@ fhandler_virtual::close ()
return 0; return 0;
} }
void __reg3 void
fhandler_virtual::read (void *ptr, size_t& len) fhandler_virtual::read (void *ptr, size_t& len)
{ {
if (len == 0) if (len == 0)
@ -262,7 +262,7 @@ fhandler_virtual::facl (int cmd, int nentries, aclent_t *aclbufp)
return res; return res;
} }
int __reg2 int
fhandler_virtual::fstatvfs (struct statvfs *sfs) fhandler_virtual::fstatvfs (struct statvfs *sfs)
{ {
/* Virtual file system. Just return an empty buffer with a few values /* Virtual file system. Just return an empty buffer with a few values

View File

@ -76,7 +76,7 @@ fhandler_windows::write (const void *buf, size_t)
return sizeof (MSG); return sizeof (MSG);
} }
void __reg3 void
fhandler_windows::read (void *buf, size_t& len) fhandler_windows::read (void *buf, size_t& len)
{ {
MSG *ptr = (MSG *) buf; MSG *ptr = (MSG *) buf;

View File

@ -30,7 +30,7 @@ fhandler_dev_zero::write (const void *, size_t len)
return len; return len;
} }
void __reg3 void
fhandler_dev_zero::read (void *ptr, size_t& len) fhandler_dev_zero::read (void *ptr, size_t& len)
{ {
memset (ptr, 0, len); memset (ptr, 0, len);

View File

@ -243,7 +243,7 @@ sbrk (ptrdiff_t n)
return cygheap->user_heap.sbrk (n); return cygheap->user_heap.sbrk (n);
} }
void __reg2 * void *
user_heap_info::sbrk (ptrdiff_t n) user_heap_info::sbrk (ptrdiff_t n)
{ {
/* FIXME: This function no longer handles "split heaps". */ /* FIXME: This function no longer handles "split heaps". */

View File

@ -37,17 +37,17 @@ class strace
void write (unsigned category, const char *buf, int count); void write (unsigned category, const char *buf, int count);
unsigned char _active; unsigned char _active;
public: public:
void activate (bool) __attribute__ ((__regparm__ (2)));; void activate (bool);
strace () {} strace () {}
int microseconds (); int microseconds ();
int version; int version;
int lmicrosec; int lmicrosec;
bool execing; bool execing;
void dll_info () __attribute__ ((__regparm__ (1))); void dll_info ();
void prntf (unsigned, const char *func, const char *, ...) /*__attribute__ ((__regparm__(3)))*/; void prntf (unsigned, const char *func, const char *, ...);
void vprntf (unsigned, const char *func, const char *, va_list ap) /*__attribute__ ((__regparm__(3)))*/; void vprntf (unsigned, const char *func, const char *, va_list ap);
void wm (int message, int word, int lon) __attribute__ ((__regparm__(3))); void wm (int message, int word, int lon);
void write_childpid (pid_t) __attribute__ ((__regparm__ (3))); void write_childpid (pid_t);
bool attached () const {return _active == 3;} bool attached () const {return _active == 3;}
bool active () const {return _active & 1;} bool active () const {return _active & 1;}
unsigned char& active_val () {return _active;} unsigned char& active_val () {return _active;}

View File

@ -34,7 +34,7 @@ get_obj_handle_count (HANDLE h)
return hdl_cnt; return hdl_cnt;
} }
int __reg2 int
check_invalid_virtual_addr (const void *s, unsigned sz) check_invalid_virtual_addr (const void *s, unsigned sz)
{ {
MEMORY_BASIC_INFORMATION mbuf; MEMORY_BASIC_INFORMATION mbuf;
@ -326,7 +326,7 @@ NT_readline::gets ()
} }
/* Return an address from the import jmp table of main program. */ /* Return an address from the import jmp table of main program. */
void * __reg1 void *
__import_address (void *imp) __import_address (void *imp)
{ {
__try __try

View File

@ -44,10 +44,10 @@ is_alt_numpad_event (PINPUT_RECORD pirec)
&& pirec->Event.KeyEvent.wVirtualScanCode == 0x38; && pirec->Event.KeyEvent.wVirtualScanCode == 0x38;
} }
int __reg1 winprio_to_nice (DWORD); int winprio_to_nice (DWORD);
DWORD __reg1 nice_to_winprio (int &); DWORD nice_to_winprio (int &);
bool __reg3 create_pipe (PHANDLE, PHANDLE, LPSECURITY_ATTRIBUTES, DWORD); bool create_pipe (PHANDLE, PHANDLE, LPSECURITY_ATTRIBUTES, DWORD);
BOOL WINAPI CreatePipeOverlapped (PHANDLE read_handle, PHANDLE write_handle, BOOL WINAPI CreatePipeOverlapped (PHANDLE read_handle, PHANDLE write_handle,
LPSECURITY_ATTRIBUTES sa); LPSECURITY_ATTRIBUTES sa);
@ -78,11 +78,11 @@ public:
extern "C" void yield (); extern "C" void yield ();
#define import_address(x) __import_address ((void *)(x)) #define import_address(x) __import_address ((void *)(x))
void * __reg1 __import_address (void *); void * __import_address (void *);
#define caller_return_address() \ #define caller_return_address() \
__caller_return_address (__builtin_return_address (0)) __caller_return_address (__builtin_return_address (0))
void * __reg1 __caller_return_address (void *); void * __caller_return_address (void *);
void backslashify (const char *, char *, bool); void backslashify (const char *, char *, bool);
void slashify (const char *, char *, bool); void slashify (const char *, char *, bool);
@ -102,9 +102,9 @@ PWCHAR transform_chars_af_unix (PWCHAR, const char *, __socklen_t);
ULONG get_obj_handle_count (HANDLE h); ULONG get_obj_handle_count (HANDLE h);
/* Memory checking */ /* Memory checking */
int __reg2 check_invalid_virtual_addr (const void *s, unsigned sz); int check_invalid_virtual_addr (const void *s, unsigned sz);
ssize_t __reg3 check_iovec (const struct iovec *, int, bool); ssize_t check_iovec (const struct iovec *, int, bool);
#define check_iovec_for_read(a, b) check_iovec ((a), (b), false) #define check_iovec_for_read(a, b) check_iovec ((a), (b), false)
#define check_iovec_for_write(a, b) check_iovec ((a), (b), true) #define check_iovec_for_write(a, b) check_iovec ((a), (b), true)

View File

@ -124,7 +124,7 @@ class fs_info
const char *fsname () const { return fsn[0] ? fsn : "unknown"; } const char *fsname () const { return fsn[0] ? fsn : "unknown"; }
bool __reg3 update (PUNICODE_STRING, HANDLE); bool update (PUNICODE_STRING, HANDLE);
bool inited () const { return !!status.flags; } bool inited () const { return !!status.flags; }
}; };

View File

@ -38,7 +38,7 @@ details. */
#define NEXT_FEA(p) ((PFILE_FULL_EA_INFORMATION) (p->NextEntryOffset \ #define NEXT_FEA(p) ((PFILE_FULL_EA_INFORMATION) (p->NextEntryOffset \
? (char *) p + p->NextEntryOffset : NULL)) ? (char *) p + p->NextEntryOffset : NULL))
ssize_t __reg3 ssize_t
read_ea (HANDLE hdl, path_conv &pc, const char *name, char *value, size_t size) read_ea (HANDLE hdl, path_conv &pc, const char *name, char *value, size_t size)
{ {
OBJECT_ATTRIBUTES attr; OBJECT_ATTRIBUTES attr;
@ -229,7 +229,7 @@ read_ea (HANDLE hdl, path_conv &pc, const char *name, char *value, size_t size)
return ret; return ret;
} }
int __reg3 int
write_ea (HANDLE hdl, path_conv &pc, const char *name, const char *value, write_ea (HANDLE hdl, path_conv &pc, const char *name, const char *value,
size_t size, int flags) size_t size, int flags)
{ {

View File

@ -381,9 +381,9 @@ path_conv::add_ext_from_sym (symlink_info &sym)
} }
} }
static void __reg2 mkrelpath (char *dst, bool caseinsensitive); static void mkrelpath (char *dst, bool caseinsensitive);
static void __reg2 static void
mkrelpath (char *path, bool caseinsensitive) mkrelpath (char *path, bool caseinsensitive)
{ {
tmp_pathbuf tp; tmp_pathbuf tp;
@ -1573,7 +1573,7 @@ normalize_win32_path (const char *src, char *dst, char *&tail)
/* nofinalslash: Remove trailing / and \ from SRC (except for the /* nofinalslash: Remove trailing / and \ from SRC (except for the
first one). It is ok for src == dst. */ first one). It is ok for src == dst. */
void __reg2 void
nofinalslash (const char *src, char *dst) nofinalslash (const char *src, char *dst)
{ {
int len = strlen (src); int len = strlen (src);
@ -3656,7 +3656,7 @@ readlink (const char *__restrict path, char *__restrict buf, size_t buflen)
done during the opendir call and the hash or the filename within done during the opendir call and the hash or the filename within
the directory. FIXME: Not bullet-proof. */ the directory. FIXME: Not bullet-proof. */
/* Cygwin internal */ /* Cygwin internal */
ino_t __reg2 ino_t
hash_path_name (ino_t hash, PUNICODE_STRING name) hash_path_name (ino_t hash, PUNICODE_STRING name)
{ {
if (name->Length == 0) if (name->Length == 0)
@ -3670,7 +3670,7 @@ hash_path_name (ino_t hash, PUNICODE_STRING name)
return hash; return hash;
} }
ino_t __reg2 ino_t
hash_path_name (ino_t hash, PCWSTR name) hash_path_name (ino_t hash, PCWSTR name)
{ {
UNICODE_STRING uname; UNICODE_STRING uname;
@ -3678,7 +3678,7 @@ hash_path_name (ino_t hash, PCWSTR name)
return hash_path_name (hash, &uname); return hash_path_name (hash, &uname);
} }
ino_t __reg2 ino_t
hash_path_name (ino_t hash, const char *name) hash_path_name (ino_t hash, const char *name)
{ {
UNICODE_STRING uname; UNICODE_STRING uname;

View File

@ -245,9 +245,9 @@ class path_conv
void set_symlink (DWORD n) {path_flags |= PATH_SYMLINK; symlink_length = n;} void set_symlink (DWORD n) {path_flags |= PATH_SYMLINK; symlink_length = n;}
void set_exec (int x = 1) {mount_flags |= x ? MOUNT_EXEC : MOUNT_NOTEXEC;} void set_exec (int x = 1) {mount_flags |= x ? MOUNT_EXEC : MOUNT_NOTEXEC;}
void __reg3 check (const UNICODE_STRING *upath, uint32_t opt = PC_SYM_FOLLOW, void check (const UNICODE_STRING *upath, uint32_t opt = PC_SYM_FOLLOW,
const suffix_info *suffixes = NULL); const suffix_info *suffixes = NULL);
void __reg3 check (const char *src, uint32_t opt = PC_SYM_FOLLOW, void check (const char *src, uint32_t opt = PC_SYM_FOLLOW,
const suffix_info *suffixes = NULL); const suffix_info *suffixes = NULL);
path_conv (const device& in_dev) path_conv (const device& in_dev)
@ -411,7 +411,7 @@ class path_conv
ino_t get_ino_by_handle (HANDLE h); ino_t get_ino_by_handle (HANDLE h);
inline const char *get_posix () const { return posix_path; } inline const char *get_posix () const { return posix_path; }
void __reg2 set_posix (const char *); void set_posix (const char *);
DWORD get_symlink_length () { return symlink_length; }; DWORD get_symlink_length () { return symlink_length; };
}; };
@ -431,7 +431,7 @@ enum fe_types
FE_CWD = 4, /* Search CWD for program */ FE_CWD = 4, /* Search CWD for program */
FE_DLL = 8 /* Search for DLLs, not executables. */ FE_DLL = 8 /* Search for DLLs, not executables. */
}; };
const char *__reg3 find_exec (const char *name, path_conv& buf, const char *find_exec (const char *name, path_conv& buf,
const char *search = "PATH", const char *search = "PATH",
unsigned opt = FE_NADA, unsigned opt = FE_NADA,
const char **known_suffix = NULL); const char **known_suffix = NULL);
@ -449,15 +449,15 @@ has_exec_chars (const char *buf, int len)
(buf[0] == 'M' && buf[1] == 'Z')); (buf[0] == 'M' && buf[1] == 'Z'));
} }
int __reg3 pathmatch (const char *path1, const char *path2, bool caseinsensitive); int pathmatch (const char *path1, const char *path2, bool caseinsensitive);
int __reg3 pathnmatch (const char *path1, const char *path2, int len, bool caseinsensitive); int pathnmatch (const char *path1, const char *path2, int len, bool caseinsensitive);
bool __reg2 has_dot_last_component (const char *dir, bool test_dot_dot); bool has_dot_last_component (const char *dir, bool test_dot_dot);
int __reg3 path_prefix_p (const char *path1, const char *path2, int len1, int path_prefix_p (const char *path1, const char *path2, int len1,
bool caseinsensitive); bool caseinsensitive);
int normalize_win32_path (const char *, char *, char *&); int normalize_win32_path (const char *, char *, char *&);
int normalize_posix_path (const char *, char *, char *&); int normalize_posix_path (const char *, char *, char *&);
PUNICODE_STRING __reg3 get_nt_native_path (const char *, UNICODE_STRING&, bool); PUNICODE_STRING get_nt_native_path (const char *, UNICODE_STRING&, bool);
int __reg3 symlink_worker (const char *, path_conv &, bool); int symlink_worker (const char *, path_conv &, bool);

View File

@ -581,7 +581,7 @@ _pinfo::set_ctty (fhandler_termios *fh, int flags)
/* Test to determine if a process really exists and is processing signals. /* Test to determine if a process really exists and is processing signals.
*/ */
bool __reg1 bool
_pinfo::exists () _pinfo::exists ()
{ {
return process_state && !(process_state & (PID_EXITED | PID_REAPED)); return process_state && !(process_state & (PID_EXITED | PID_REAPED));

View File

@ -119,8 +119,8 @@ public:
int siginfo (sigset_t &, sigset_t &, sigset_t &); int siginfo (sigset_t &, sigset_t &, sigset_t &);
bool set_ctty (class fhandler_termios *, int); bool set_ctty (class fhandler_termios *, int);
bool alert_parent (char); bool alert_parent (char);
int __reg2 kill (siginfo_t&); int kill (siginfo_t&);
bool __reg1 exists (); bool exists ();
const char *_ctty (char *); const char *_ctty (char *);
/* signals */ /* signals */
@ -160,7 +160,7 @@ public:
bool waiter_ready; bool waiter_ready;
class cygthread *wait_thread; class cygthread *wait_thread;
void __reg3 init (pid_t, DWORD, HANDLE); void init (pid_t, DWORD, HANDLE);
pinfo (_pinfo *x = NULL) pinfo (_pinfo *x = NULL)
: pinfo_minimal (), destroy (false), winpid_hdl (NULL), procinfo (x), : pinfo_minimal (), destroy (false), winpid_hdl (NULL), procinfo (x),
waiter_ready (false), wait_thread (NULL) {} waiter_ready (false), wait_thread (NULL) {}
@ -171,19 +171,19 @@ public:
init (n, flag, NULL); init (n, flag, NULL);
} }
pinfo (HANDLE, pinfo_minimal&, pid_t); pinfo (HANDLE, pinfo_minimal&, pid_t);
void __reg2 thisproc (HANDLE); void thisproc (HANDLE);
void create_winpid_symlink (); void create_winpid_symlink ();
inline void _pinfo_release (); inline void _pinfo_release ();
void release (); void release ();
bool __reg1 wait (); bool wait ();
~pinfo () ~pinfo ()
{ {
if (destroy && procinfo) if (destroy && procinfo)
release (); release ();
} }
void __reg2 exit (DWORD n) __attribute__ ((noreturn, )); void exit (DWORD n) __attribute__ ((noreturn, ));
void __reg1 maybe_set_exit_code_from_windows (); void maybe_set_exit_code_from_windows ();
void __reg2 set_exit_code (DWORD n); void set_exit_code (DWORD n);
_pinfo *operator -> () const {return procinfo;} _pinfo *operator -> () const {return procinfo;}
int operator == (pinfo *x) const {return x->procinfo == procinfo;} int operator == (pinfo *x) const {return x->procinfo == procinfo;}
int operator == (pinfo &x) const {return x.procinfo == procinfo;} int operator == (pinfo &x) const {return x.procinfo == procinfo;}

View File

@ -1,19 +0,0 @@
/* regparm.h: Define macros for regparm functions and methods.
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#pragma once
#if defined (__x86_64__) || defined (__CYGMAGIC__)
# define __reg1
# define __reg2
# define __reg3
#else
# define __reg1 __stdcall __attribute__ ((regparm (1)))
# define __reg2 __stdcall __attribute__ ((regparm (2)))
# define __reg3 __stdcall __attribute__ ((regparm (3)))
#endif

View File

@ -593,7 +593,7 @@ sec_acl (PACL acl, bool original, bool admins, PSID sid1, PSID sid2, DWORD acces
return true; return true;
} }
PSECURITY_ATTRIBUTES __reg3 PSECURITY_ATTRIBUTES
__sec_user (PVOID sa_buf, PSID sid1, PSID sid2, DWORD access2, BOOL inherit) __sec_user (PVOID sa_buf, PSID sid1, PSID sid2, DWORD access2, BOOL inherit)
{ {
PSECURITY_ATTRIBUTES psa = (PSECURITY_ATTRIBUTES) sa_buf; PSECURITY_ATTRIBUTES psa = (PSECURITY_ATTRIBUTES) sa_buf;

View File

@ -559,14 +559,14 @@ acl_to_text (acl_t acl, ssize_t *len_p)
return NULL; return NULL;
} }
acl_t __reg2 acl_t
fhandler_base::acl_get (acl_type_t type) fhandler_base::acl_get (acl_type_t type)
{ {
set_errno (ENOTSUP); set_errno (ENOTSUP);
return NULL; return NULL;
} }
acl_t __reg2 acl_t
fhandler_disk_file::acl_get (acl_type_t type) fhandler_disk_file::acl_get (acl_type_t type)
{ {
acl_t acl = NULL; acl_t acl = NULL;
@ -663,14 +663,14 @@ acl_get_file (const char *path_p, acl_type_t type)
return acl; return acl;
} }
int __reg3 int
fhandler_base::acl_set (acl_t acl, acl_type_t type) fhandler_base::acl_set (acl_t acl, acl_type_t type)
{ {
set_errno (ENOTSUP); set_errno (ENOTSUP);
return -1; return -1;
} }
int __reg3 int
fhandler_disk_file::acl_set (acl_t acl, acl_type_t type) fhandler_disk_file::acl_set (acl_t acl, acl_type_t type)
{ {
int ret = -1; int ret = -1;

View File

@ -411,23 +411,23 @@ legal_sid_type (SID_NAME_USE type)
class path_conv; class path_conv;
/* File manipulation */ /* File manipulation */
int __reg3 get_file_attribute (HANDLE, path_conv &, mode_t *, int get_file_attribute (HANDLE, path_conv &, mode_t *,
uid_t *, gid_t *); uid_t *, gid_t *);
int __reg3 set_created_file_access (HANDLE, path_conv &, mode_t); int set_created_file_access (HANDLE, path_conv &, mode_t);
int __reg2 get_object_sd (HANDLE, security_descriptor &); int get_object_sd (HANDLE, security_descriptor &);
int __reg3 get_object_attribute (HANDLE, uid_t *, gid_t *, mode_t *); int get_object_attribute (HANDLE, uid_t *, gid_t *, mode_t *);
int __reg3 set_object_attribute (HANDLE, uid_t, gid_t, mode_t); int set_object_attribute (HANDLE, uid_t, gid_t, mode_t);
int __reg3 create_object_sd_from_attribute (uid_t, gid_t, mode_t, int create_object_sd_from_attribute (uid_t, gid_t, mode_t,
security_descriptor &); security_descriptor &);
int __reg3 set_object_sd (HANDLE, security_descriptor &, bool); int set_object_sd (HANDLE, security_descriptor &, bool);
int __reg3 get_reg_attribute (HKEY hkey, mode_t *, uid_t *, gid_t *); int get_reg_attribute (HKEY hkey, mode_t *, uid_t *, gid_t *);
LONG __reg3 get_file_sd (HANDLE fh, path_conv &, security_descriptor &, bool); LONG get_file_sd (HANDLE fh, path_conv &, security_descriptor &, bool);
LONG __reg3 set_file_sd (HANDLE fh, path_conv &, security_descriptor &, bool); LONG set_file_sd (HANDLE fh, path_conv &, security_descriptor &, bool);
bool __reg3 add_access_allowed_ace (PACL, DWORD, PSID, size_t &, DWORD); bool add_access_allowed_ace (PACL, DWORD, PSID, size_t &, DWORD);
bool __reg3 add_access_denied_ace (PACL, DWORD, PSID, size_t &, DWORD); bool add_access_denied_ace (PACL, DWORD, PSID, size_t &, DWORD);
int __reg3 check_file_access (path_conv &, int, bool); int check_file_access (path_conv &, int, bool);
int __reg3 check_registry_access (HANDLE, int, bool); int check_registry_access (HANDLE, int, bool);
void set_security_attribute (path_conv &pc, int attribute, void set_security_attribute (path_conv &pc, int attribute,
PSECURITY_ATTRIBUTES psa, PSECURITY_ATTRIBUTES psa,
@ -514,7 +514,7 @@ void set_cygwin_privileges (HANDLE token);
/* Various types of security attributes for use in Create* functions. */ /* Various types of security attributes for use in Create* functions. */
extern SECURITY_ATTRIBUTES sec_none, sec_none_nih, sec_all, sec_all_nih; extern SECURITY_ATTRIBUTES sec_none, sec_none_nih, sec_all, sec_all_nih;
extern SECURITY_ATTRIBUTES *__reg3 __sec_user (PVOID, PSID, PSID, extern SECURITY_ATTRIBUTES *__sec_user (PVOID, PSID, PSID,
DWORD, BOOL); DWORD, BOOL);
extern PSECURITY_DESCRIPTOR _recycler_sd (void *buf, bool users, bool dir); extern PSECURITY_DESCRIPTOR _recycler_sd (void *buf, bool users, bool dir);
@ -531,9 +531,9 @@ extern PSECURITY_DESCRIPTOR _everyone_sd (void *buf, ACCESS_MASK access);
extern bool sec_acl (PACL acl, bool original, bool admins, PSID sid1 = NO_SID, extern bool sec_acl (PACL acl, bool original, bool admins, PSID sid1 = NO_SID,
PSID sid2 = NO_SID, DWORD access2 = 0); PSID sid2 = NO_SID, DWORD access2 = 0);
ssize_t __reg3 read_ea (HANDLE, path_conv &, const char *, ssize_t read_ea (HANDLE, path_conv &, const char *,
char *, size_t); char *, size_t);
int __reg3 write_ea (HANDLE, path_conv &, const char *, const char *, int write_ea (HANDLE, path_conv &, const char *, const char *,
size_t, int); size_t, int);
/* Note: sid1 is usually (read: currently always) the current user's /* Note: sid1 is usually (read: currently always) the current user's

View File

@ -27,7 +27,7 @@ details. */
#define _SA_NORESTART 0x8000 #define _SA_NORESTART 0x8000
static int __reg3 sigaction_worker (int, const struct sigaction *, struct sigaction *, bool); static int sigaction_worker (int, const struct sigaction *, struct sigaction *, bool);
#define sigtrapped(func) ((func) != SIG_IGN && (func) != SIG_DFL) #define sigtrapped(func) ((func) != SIG_IGN && (func) != SIG_DFL)
@ -204,7 +204,7 @@ sigprocmask (int how, const sigset_t *set, sigset_t *oldset)
return res; return res;
} }
int __reg3 int
handle_sigprocmask (int how, const sigset_t *set, sigset_t *oldset, sigset_t& opmask) handle_sigprocmask (int how, const sigset_t *set, sigset_t *oldset, sigset_t& opmask)
{ {
/* check that how is in right range if set is not NULL */ /* check that how is in right range if set is not NULL */
@ -248,7 +248,7 @@ handle_sigprocmask (int how, const sigset_t *set, sigset_t *oldset, sigset_t& op
return 0; return 0;
} }
int __reg2 int
_pinfo::kill (siginfo_t& si) _pinfo::kill (siginfo_t& si)
{ {
int res; int res;
@ -415,7 +415,7 @@ abort (void)
do_exit (SIGABRT); /* signal handler didn't exit. Goodbye. */ do_exit (SIGABRT); /* signal handler didn't exit. Goodbye. */
} }
static int __reg3 static int
sigaction_worker (int sig, const struct sigaction *newact, sigaction_worker (int sig, const struct sigaction *newact,
struct sigaction *oldact, bool isinternal) struct sigaction *oldact, bool isinternal)
{ {

View File

@ -101,7 +101,7 @@ Static HANDLE my_readsig;
HANDLE NO_COPY my_pendingsigs_evt; HANDLE NO_COPY my_pendingsigs_evt;
/* Function declarations */ /* Function declarations */
static int __reg1 checkstate (waitq *); static int checkstate (waitq *);
static __inline__ bool get_proc_lock (DWORD, DWORD); static __inline__ bool get_proc_lock (DWORD, DWORD);
static int remove_proc (int); static int remove_proc (int);
static bool stopped_or_terminated (waitq *, _pinfo *); static bool stopped_or_terminated (waitq *, _pinfo *);
@ -120,7 +120,7 @@ public:
bool pending () {retry = true; return !!start.next;} bool pending () {retry = true; return !!start.next;}
void clear (int sig) {sigs[sig].si.si_signo = 0;} void clear (int sig) {sigs[sig].si.si_signo = 0;}
void clear (_cygtls *tls); void clear (_cygtls *tls);
friend void __reg1 sig_dispatch_pending (bool); friend void sig_dispatch_pending (bool);
friend void WINAPI wait_sig (VOID *arg); friend void WINAPI wait_sig (VOID *arg);
}; };
@ -192,7 +192,7 @@ proc_can_be_signalled (_pinfo *p)
return false; return false;
} }
bool __reg1 bool
pid_exists (pid_t pid) pid_exists (pid_t pid)
{ {
pinfo p (pid); pinfo p (pid);
@ -211,7 +211,7 @@ mychild (int pid)
/* Handle all subprocess requests /* Handle all subprocess requests
*/ */
int __reg2 int
proc_subproc (DWORD what, uintptr_t val) proc_subproc (DWORD what, uintptr_t val)
{ {
int slot; int slot;
@ -433,7 +433,7 @@ proc_terminate ()
} }
/* Clear pending signal */ /* Clear pending signal */
void __reg1 void
sig_clear (int sig) sig_clear (int sig)
{ {
sigq.clear (sig); sigq.clear (sig);
@ -474,7 +474,7 @@ sigpending (sigset_t *mask)
} }
/* Force the wait_sig thread to wake up and scan for pending signals */ /* Force the wait_sig thread to wake up and scan for pending signals */
void __reg1 void
sig_dispatch_pending (bool fast) sig_dispatch_pending (bool fast)
{ {
/* Non-atomically test for any signals pending and wake up wait_sig if any are /* Non-atomically test for any signals pending and wake up wait_sig if any are
@ -551,7 +551,7 @@ exit_thread (DWORD res)
ExitThread (res); ExitThread (res);
} }
sigset_t __reg3 sigset_t
sig_send (_pinfo *p, int sig, _cygtls *tls) sig_send (_pinfo *p, int sig, _cygtls *tls)
{ {
siginfo_t si = {}; siginfo_t si = {};
@ -564,7 +564,7 @@ sig_send (_pinfo *p, int sig, _cygtls *tls)
If pinfo *p == NULL, send to the current process. If pinfo *p == NULL, send to the current process.
If sending to this process, wait for notification that a signal has If sending to this process, wait for notification that a signal has
completed before returning. */ completed before returning. */
sigset_t __reg3 sigset_t
sig_send (_pinfo *p, siginfo_t& si, _cygtls *tls) sig_send (_pinfo *p, siginfo_t& si, _cygtls *tls)
{ {
int rc = 1; int rc = 1;
@ -1155,7 +1155,7 @@ child_info_fork::abort (const char *fmt, ...)
/* Check the state of all of our children to see if any are stopped or /* Check the state of all of our children to see if any are stopped or
* terminated. * terminated.
*/ */
static int __reg1 static int
checkstate (waitq *parent_w) checkstate (waitq *parent_w)
{ {
int potential_match = 0; int potential_match = 0;

View File

@ -53,33 +53,33 @@ struct sigpacket
HANDLE thread_handle; HANDLE thread_handle;
struct sigpacket *next; struct sigpacket *next;
}; };
int __reg1 process (); int process ();
int __reg3 setup_handler (void *, struct sigaction&, _cygtls *); int setup_handler (void *, struct sigaction&, _cygtls *);
}; };
void __reg1 sig_dispatch_pending (bool fast = false); void sig_dispatch_pending (bool fast = false);
void __reg2 set_signal_mask (sigset_t&, sigset_t); void set_signal_mask (sigset_t&, sigset_t);
int __reg3 handle_sigprocmask (int sig, const sigset_t *set, int handle_sigprocmask (int sig, const sigset_t *set,
sigset_t *oldset, sigset_t& opmask); sigset_t *oldset, sigset_t& opmask);
void __reg1 sig_clear (int); void sig_clear (int);
void __reg1 sig_set_pending (int); void sig_set_pending (int);
int __stdcall handle_sigsuspend (sigset_t); int __stdcall handle_sigsuspend (sigset_t);
int __reg2 proc_subproc (DWORD, uintptr_t); int proc_subproc (DWORD, uintptr_t);
class _pinfo; class _pinfo;
void proc_terminate (); void proc_terminate ();
void sigproc_init (); void sigproc_init ();
bool __reg1 pid_exists (pid_t); bool pid_exists (pid_t);
sigset_t __reg3 sig_send (_pinfo *, siginfo_t&, class _cygtls * = NULL); sigset_t sig_send (_pinfo *, siginfo_t&, class _cygtls * = NULL);
sigset_t __reg3 sig_send (_pinfo *, int, class _cygtls * = NULL); sigset_t sig_send (_pinfo *, int, class _cygtls * = NULL);
void signal_fixup_after_exec (); void signal_fixup_after_exec ();
void sigalloc (); void sigalloc ();
int kill_pgrp (pid_t, siginfo_t&); int kill_pgrp (pid_t, siginfo_t&);
void __reg1 exit_thread (DWORD) __attribute__ ((noreturn)); void exit_thread (DWORD) __attribute__ ((noreturn));
void __reg1 setup_signal_exit (int); void setup_signal_exit (int);
int sigwait_common (const sigset_t *, siginfo_t *, PLARGE_INTEGER); int sigwait_common (const sigset_t *, siginfo_t *, PLARGE_INTEGER);
class no_thread_exit_protect class no_thread_exit_protect

View File

@ -84,7 +84,7 @@ perhaps_suffix (const char *prog, path_conv& buf, int& err, unsigned opt)
If the file is not found and !FE_NNF then the POSIX version of name is If the file is not found and !FE_NNF then the POSIX version of name is
placed in buf and returned. Otherwise the contents of buf is undefined placed in buf and returned. Otherwise the contents of buf is undefined
and NULL is returned. */ and NULL is returned. */
const char * __reg3 const char *
find_exec (const char *name, path_conv& buf, const char *search, find_exec (const char *name, path_conv& buf, const char *search,
unsigned opt, const char **known_suffix) unsigned opt, const char **known_suffix)
{ {

View File

@ -24,17 +24,17 @@ public:
// class muto *next; // class muto *next;
/* The real constructor. */ /* The real constructor. */
muto __reg2 *init (const char *); muto *init (const char *);
#if 0 /* FIXME: See comment in sync.cc */ #if 0 /* FIXME: See comment in sync.cc */
~muto () ~muto ()
#endif #endif
int __reg2 acquire (DWORD ms = INFINITE); /* Acquire the lock. */ int acquire (DWORD ms = INFINITE); /* Acquire the lock. */
int __reg2 release (_cygtls * = &_my_tls); /* Release the lock. */ int release (_cygtls * = &_my_tls); /* Release the lock. */
bool __reg1 acquired (); bool acquired ();
void upforgrabs () {tls = this;} // just set to an invalid address void upforgrabs () {tls = this;} // just set to an invalid address
void __reg1 grab (); void grab ();
operator int () const {return !!name;} operator int () const {return !!name;}
}; };

View File

@ -1998,7 +1998,7 @@ sync ()
} }
/* Cygwin internal */ /* Cygwin internal */
int __reg2 int
stat_worker (path_conv &pc, struct stat *buf) stat_worker (path_conv &pc, struct stat *buf)
{ {
int res = -1; int res = -1;
@ -4961,7 +4961,7 @@ unlinkat (int dirfd, const char *pathname, int flags)
return -1; return -1;
} }
static int __reg3 static int
pipe_worker (int filedes[2], unsigned int psize, int mode) pipe_worker (int filedes[2], unsigned int psize, int mode)
{ {
fhandler_pipe *fhs[2]; fhandler_pipe *fhs[2];

View File

@ -82,7 +82,7 @@ tty::init_session ()
cygheap->fdtab.get_debugger_info (); cygheap->fdtab.get_debugger_info ();
} }
int __reg2 int
tty_list::attach (int n) tty_list::attach (int n)
{ {
int res; int res;

View File

@ -77,7 +77,7 @@ public:
void setsid (pid_t tsid) {sid = tsid;} void setsid (pid_t tsid) {sid = tsid;}
void kill_pgrp (int, pid_t target_pgid = 0); void kill_pgrp (int, pid_t target_pgid = 0);
int is_orphaned_process_group (int); int is_orphaned_process_group (int);
const __reg1 char *ttyname () __attribute (()); const char *ttyname () __attribute (());
}; };
@ -88,7 +88,7 @@ class fhandler_pty_master;
class tty: public tty_min class tty: public tty_min
{ {
HANDLE __reg3 get_event (const char *fmt, PSECURITY_ATTRIBUTES sa, HANDLE get_event (const char *fmt, PSECURITY_ATTRIBUTES sa,
BOOL manual_reset = FALSE); BOOL manual_reset = FALSE);
public: public:
pid_t master_pid; /* PID of tty master process */ pid_t master_pid; /* PID of tty master process */
@ -191,7 +191,7 @@ public:
int connect (int); int connect (int);
void init (); void init ();
tty_min *get_cttyp (); tty_min *get_cttyp ();
int __reg2 attach (int n); int attach (int n);
static void __stdcall init_session (); static void __stdcall init_session ();
friend class lock_ttys; friend class lock_ttys;
}; };

View File

@ -21,7 +21,7 @@ wininfo NO_COPY winmsg;
muto NO_COPY wininfo::_lock; muto NO_COPY wininfo::_lock;
int __reg3 int
wininfo::process (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) wininfo::process (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
#ifndef NOSTRACE #ifndef NOSTRACE
@ -52,7 +52,7 @@ process_window_events (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
} }
/* Handle windows events. Inherits ownership of the wininfo lock */ /* Handle windows events. Inherits ownership of the wininfo lock */
DWORD __reg1 WINAPI DWORD WINAPI
wininfo::winthread () wininfo::winthread ()
{ {
MSG msg; MSG msg;

View File

@ -39,7 +39,7 @@ class av
cfree (argv); cfree (argv);
} }
} }
int unshift (const char *what) __reg2; int unshift (const char *what);
operator char **() {return argv;} operator char **() {return argv;}
void all_calloced () {calloced = argc;} void all_calloced () {calloced = argc;}
void replace0_maybe (const char *arg0) void replace0_maybe (const char *arg0)
@ -58,7 +58,7 @@ class av
calloced = argc; calloced = argc;
} }
int setup (const char *, path_conv&, const char *, int, const char *const *, int setup (const char *, path_conv&, const char *, int, const char *const *,
bool) __reg3; bool);
}; };
class linebuf class linebuf
@ -69,11 +69,11 @@ class linebuf
public: public:
linebuf () : ix (0), buf (NULL), alloced (0) {} linebuf () : ix (0), buf (NULL), alloced (0) {}
~linebuf () {if (buf) free (buf);} ~linebuf () {if (buf) free (buf);}
void __reg3 add (const char *, int); void add (const char *, int);
void add (const char *what) {add (what, strlen (what));} void add (const char *what) {add (what, strlen (what));}
void prepend (const char *, int); void prepend (const char *, int);
void __reg2 finish (bool); void finish (bool);
bool __reg3 fromargv(av&, const char *, bool);; bool fromargv(av&, const char *, bool);;
operator size_t () const { return ix + 1; } operator size_t () const { return ix + 1; }
operator const char * () const { return buf; } operator const char * () const { return buf; }
operator wchar_t * () operator wchar_t * ()

View File

@ -13,10 +13,10 @@ class wininfo
static muto _lock; static muto _lock;
public: public:
operator HWND (); operator HWND ();
int __reg3 process (HWND, UINT, WPARAM, LPARAM); int process (HWND, UINT, WPARAM, LPARAM);
void lock (); void lock ();
void release (); void release ();
DWORD __reg1 WINAPI winthread (); DWORD WINAPI winthread ();
}; };
extern wininfo winmsg; extern wininfo winmsg;

View File

@ -79,7 +79,6 @@ uint32_t cygwin_inet_addr (const char *cp);
#ifdef __cplusplus #ifdef __cplusplus
#include "wincap.h" #include "wincap.h"
#include "regparm.h"
extern const unsigned char case_folded_lower[]; extern const unsigned char case_folded_lower[];
#define cyg_tolower(c) ((char) case_folded_lower[(unsigned char)(c)]) #define cyg_tolower(c) ((char) case_folded_lower[(unsigned char)(c)])
@ -162,7 +161,7 @@ extern "C" void _pei386_runtime_relocator (per_process *);
extern "C" int dll_noncygwin_dllcrt0 (HMODULE, per_process *); extern "C" int dll_noncygwin_dllcrt0 (HMODULE, per_process *);
#endif /* __i386__ */ #endif /* __i386__ */
void __reg1 do_exit (int) __attribute__ ((noreturn)); void do_exit (int) __attribute__ ((noreturn));
/* libstdc++ malloc operator wrapper support. */ /* libstdc++ malloc operator wrapper support. */
extern struct per_process_cxx_malloc default_cygwin_cxx_malloc; extern struct per_process_cxx_malloc default_cygwin_cxx_malloc;
@ -191,13 +190,13 @@ const char *find_first_notloaded_dll (class path_conv &);
void __stdcall set_std_handle (int); void __stdcall set_std_handle (int);
int __stdcall stat_dev (DWORD, int, unsigned long, struct stat *); int __stdcall stat_dev (DWORD, int, unsigned long, struct stat *);
ino_t __reg2 hash_path_name (ino_t hash, PUNICODE_STRING name); ino_t hash_path_name (ino_t hash, PUNICODE_STRING name);
ino_t __reg2 hash_path_name (ino_t hash, PCWSTR name); ino_t hash_path_name (ino_t hash, PCWSTR name);
ino_t __reg2 hash_path_name (ino_t hash, const char *name); ino_t hash_path_name (ino_t hash, const char *name);
void __reg2 nofinalslash (const char *src, char *dst); void nofinalslash (const char *src, char *dst);
void __reg3 *hook_or_detect_cygwin (const char *, const void *, WORD&, HANDLE h = NULL); void *hook_or_detect_cygwin (const char *, const void *, WORD&, HANDLE h = NULL);
void __reg3 *hook_api (const char *mname, const char *name, const void *fn); void *hook_api (const char *mname, const char *name, const void *fn);
/* Time related */ /* Time related */
void __stdcall totimeval (struct timeval *, PLARGE_INTEGER, int, int); void __stdcall totimeval (struct timeval *, PLARGE_INTEGER, int, int);
@ -225,9 +224,9 @@ bool child_copy (HANDLE, bool, bool, ...);
class path_conv; class path_conv;
int __reg2 stat_worker (path_conv &pc, struct stat *buf); int stat_worker (path_conv &pc, struct stat *buf);
ino_t __reg2 readdir_get_ino (const char *path, bool dot_dot); ino_t readdir_get_ino (const char *path, bool dot_dot);
/* mmap functions. */ /* mmap functions. */
enum mmap_region_status enum mmap_region_status