Throughout, change __attribute__ ((regparm (N))) to just __regN. Throughout,

(mainly in fhandler*) start fixing gcc 4.7.2 mismatch between regparm
definitions and declarations.
* gendef: Define some functions to take @ declaration to accommodate _regN
defines which use __stdcall.
* gentls_offsets: Define __regN macros as empty.
* autoload.cc (wsock_init): Remove unneeded regparm attribute.
* winsup.h (__reg1): Define.
(__reg2): Define.
(__reg3): Define.
* advapi32.cc (DuplicateTokenEx): Coerce some initializers to avoid warnings
from gcc 4.7.2.
* exceptions.cc (status_info): Declare struct to use NTSTATUS.
(cygwin_exception::dump_exception): Coerce e->ExceptionCode to NTSTATUS.
* fhandler_clipboard.cc (cygnativeformat): Redefine as UINT to avoid gcc 4.7.2
warnings.
(fhandler_dev_clipboard::read): Ditto.
This commit is contained in:
Christopher Faylor 2013-01-21 04:34:52 +00:00
parent d89e61f354
commit 6e75c72b89
60 changed files with 510 additions and 511 deletions

View File

@ -1,3 +1,25 @@
2013-01-20 Christopher Faylor <me.cygwin2013@cgf.cx>
Throughout, change __attribute__ ((regparm (N))) to just __regN.
Throughout, (mainly in fhandler*) start fixing gcc 4.7.2 mismatch
between regparm definitions and declarations.
* gendef: Define some functions to take @ declaration to accommodate
_regN defines which use __stdcall.
* gentls_offsets: Define __regN macros as empty.
* autoload.cc (wsock_init): Remove unneeded regparm attribute.
* winsup.h (__reg1): Define.
(__reg2): Define.
(__reg3): Define.
* advapi32.cc (DuplicateTokenEx): Coerce some initializers to avoid
warnings from gcc 4.7.2.
* exceptions.cc (status_info): Declare struct to use NTSTATUS.
(cygwin_exception::dump_exception): Coerce e->ExceptionCode to
NTSTATUS.
* fhandler_clipboard.cc (cygnativeformat): Redefine as UINT to avoid
gcc 4.7.2 warnings.
(fhandler_dev_clipboard::read): Ditto.
2013-01-20 Christopher Faylor <me.cygwin2013@cgf.cx>
* update-copyright (update_maybe): Accommodate perl-style copyright

View File

@ -1,6 +1,6 @@
/* advapi32.cc: Win32 replacement functions.
Copyright 2011, 2012 Red Hat, Inc.
Copyright 2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -42,8 +42,8 @@ DuplicateTokenEx (HANDLE tok, DWORD access, LPSECURITY_ATTRIBUTES sec_attr,
{ sizeof sqos, level, SECURITY_STATIC_TRACKING, FALSE };
OBJECT_ATTRIBUTES attr =
{ sizeof attr, NULL, NULL,
sec_attr && sec_attr->bInheritHandle? OBJ_INHERIT : 0,
sec_attr ? sec_attr->lpSecurityDescriptor : NULL, &sqos };
(ULONG) ((sec_attr && sec_attr->bInheritHandle) ? OBJ_INHERIT : 0),
(sec_attr ? sec_attr->lpSecurityDescriptor : NULL), &sqos };
NTSTATUS status = NtDuplicateToken (tok, access, &attr, FALSE, type, new_tok);
DEFAULT_NTSTATUS_TO_BOOL_RETURN
}

View File

@ -1,7 +1,7 @@
/* autoload.cc: all dynamic load stuff.
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
2009, 2010, 2011, 2012 Red Hat, Inc.
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -299,7 +299,7 @@ std_dll_init ()
/* Initialization function for winsock stuff. */
WSADATA NO_COPY wsadata;
__attribute__ ((used, noinline, regparm(1))) static long long
static long long __attribute__ ((used, noinline))
wsock_init ()
{
static LONG NO_COPY here = -1L;

View File

@ -35,7 +35,7 @@ enum child_status
#define EXEC_MAGIC_SIZE sizeof(child_info)
/* Change this value if you get a message indicating that it is out-of-sync. */
#define CURR_CHILD_INFO_MAGIC 0x744dfd6dU
#define CURR_CHILD_INFO_MAGIC 0xb7de78e6U
#define NPROCS 256
@ -76,8 +76,8 @@ public:
~child_info ();
void refresh_cygheap () { cygheap_max = ::cygheap_max; }
void ready (bool);
bool sync (int, HANDLE&, DWORD) __attribute__ ((regparm (3)));
DWORD proc_retry (HANDLE) __attribute__ ((regparm (2)));
bool __reg3 sync (int, HANDLE&, DWORD);
DWORD __reg2 proc_retry (HANDLE);
bool isstraced () const {return !!(flag & _CI_STRACED);}
bool iscygwin () const {return !!(flag & _CI_ISCYGWIN);}
bool saw_ctrl_c () const {return !!(flag & _CI_SAW_CTRL_C);}
@ -106,7 +106,7 @@ public:
// user stack
char filler[4];
child_info_fork ();
void handle_fork () __attribute__ ((regparm (1)));;
void __reg1 handle_fork ();;
bool abort (const char *fmt = NULL, ...);
void alloc_stack ();
void alloc_stack_hard_way (volatile char *);
@ -146,7 +146,7 @@ public:
void reattach_children ();
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 handle_spawn () __attribute__ ((regparm (1)));
void __reg1 handle_spawn ();
bool set_saw_ctrl_c ()
{
if (!has_execed ())
@ -176,8 +176,8 @@ public:
bool get_parent_handle ();
bool has_execed_cygwin () const { return iscygwin () && has_execed (); }
operator HANDLE& () {return hExeced;}
int worker (const char *, const char *const *, const char *const [], int,
int = -1, int = -1) __attribute__ ((regparm (3)));;
int __reg3 worker (const char *, const char *const *, const char *const [], int,
int = -1, int = -1);;
};
extern child_info_spawn ch_spawn;

View File

@ -1,6 +1,7 @@
/* cygerrno.h: main Cygwin header file.
Copyright 2000, 2001, 2002, 2003, 2004, 2010, 2011, 2012, 2013 Red Hat, Inc.
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2010, 2011, 2012, 2013
Red Hat, Inc.
This file is part of Cygwin.
@ -12,11 +13,11 @@ details. */
#define _CYGERRNO_H
#include <errno.h>
void __stdcall seterrno_from_win_error (const char *file, int line, DWORD code) __attribute__ ((regparm(3)));
void __stdcall seterrno_from_nt_status (const char *file, int line, NTSTATUS status) __attribute__ ((regparm(3)));
void __stdcall seterrno (const char *, int line) __attribute__ ((regparm(2)));
int __stdcall geterrno_from_win_error (DWORD code = GetLastError (), int deferrno = 13 /*EACCESS*/) __attribute__ ((regparm(2)));
int __stdcall geterrno_from_nt_status (NTSTATUS status, int deferrno = 13 /*EACCESS*/) __attribute__ ((regparm(2)));
void __reg3 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 __reg2 seterrno (const char *, int line);
int __reg2 geterrno_from_win_error (DWORD code = GetLastError (), int deferrno = 13 /*EACCESS*/);
int __reg2 geterrno_from_nt_status (NTSTATUS status, int deferrno = 13 /*EACCESS*/);
#define __seterrno() seterrno (__FILE__, __LINE__)
#define __seterrno_from_win_error(val) seterrno_from_win_error (__FILE__, __LINE__, val)

View File

@ -1,7 +1,7 @@
/* cygheap.cc: Cygwin heap manager.
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
2010, 2011, 2012 Red Hat, Inc.
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -72,7 +72,7 @@ static NO_COPY size_t nthreads;
#define MVMAP_OPTIONS (FILE_MAP_WRITE)
extern "C" {
static void __stdcall _cfree (void *) __attribute__((regparm(1)));
static void __reg1 _cfree (void *);
static void *__stdcall _csbrk (int);
}
@ -278,10 +278,10 @@ cygheap_init ()
/* Copyright (C) 1997, 2000 DJ Delorie */
static void *__stdcall _cmalloc (unsigned size) __attribute__ ((regparm(1)));
static void *__stdcall _crealloc (void *ptr, unsigned size) __attribute__ ((regparm(2)));
static void *__reg1 _cmalloc (unsigned size);
static void *__reg2 _crealloc (void *ptr, unsigned size);
static void *__stdcall __attribute__ ((regparm(1)))
static void *__reg1
_cmalloc (unsigned size)
{
_cmalloc_entry *rvc;
@ -315,7 +315,7 @@ _cmalloc (unsigned size)
return rvc->data;
}
static void __stdcall __attribute__ ((regparm(1)))
static void __reg1
_cfree (void *ptr)
{
cygheap_protect.acquire ();
@ -326,7 +326,7 @@ _cfree (void *ptr)
cygheap_protect.release ();
}
static void *__stdcall __attribute__ ((regparm(2)))
static void *__reg2
_crealloc (void *ptr, unsigned size)
{
void *newptr;
@ -409,19 +409,19 @@ crealloc (void *s, DWORD n, const char *fn)
return creturn (t, c, n, fn);
}
extern "C" void *__stdcall __attribute__ ((regparm(2)))
extern "C" void *__reg2
crealloc (void *s, DWORD n)
{
return crealloc (s, n, NULL);
}
extern "C" void *__stdcall __attribute__ ((regparm(2)))
extern "C" void *__reg2
crealloc_abort (void *s, DWORD n)
{
return crealloc (s, n, "crealloc");
}
extern "C" void __stdcall __attribute__ ((regparm(1)))
extern "C" void __reg1
cfree (void *s)
{
assert (!inheap (s));
@ -429,7 +429,7 @@ cfree (void *s)
MALLOC_CHECK;
}
extern "C" void __stdcall __attribute__ ((regparm(2)))
extern "C" void __reg2
cfree_and_set (char *&s, char *what)
{
if (s && s != almost_null)
@ -449,19 +449,19 @@ ccalloc (cygheap_types x, DWORD n, DWORD size, const char *fn)
return creturn (x, c, n, fn);
}
extern "C" void *__stdcall __attribute__ ((regparm(3)))
extern "C" void *__reg3
ccalloc (cygheap_types x, DWORD n, DWORD size)
{
return ccalloc (x, n, size, NULL);
}
extern "C" void *__stdcall __attribute__ ((regparm(3)))
extern "C" void *__reg3
ccalloc_abort (cygheap_types x, DWORD n, DWORD size)
{
return ccalloc (x, n, size, "ccalloc");
}
extern "C" PWCHAR __stdcall __attribute__ ((regparm(1)))
extern "C" PWCHAR __reg1
cwcsdup (const PWCHAR s)
{
MALLOC_CHECK;
@ -473,7 +473,7 @@ cwcsdup (const PWCHAR s)
return p;
}
extern "C" PWCHAR __stdcall __attribute__ ((regparm(1)))
extern "C" PWCHAR __reg1
cwcsdup1 (const PWCHAR s)
{
MALLOC_CHECK;
@ -485,7 +485,7 @@ cwcsdup1 (const PWCHAR s)
return p;
}
extern "C" char *__stdcall __attribute__ ((regparm(1)))
extern "C" char *__reg1
cstrdup (const char *s)
{
MALLOC_CHECK;
@ -497,7 +497,7 @@ cstrdup (const char *s)
return p;
}
extern "C" char *__stdcall __attribute__ ((regparm(1)))
extern "C" char *__reg1
cstrdup1 (const char *s)
{
MALLOC_CHECK;

View File

@ -1,7 +1,7 @@
/* cygheap.h: Cygwin heap manager.
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
2010, 2011, 2012 Red Hat, Inc.
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -198,8 +198,7 @@ public:
return effec_cygsid.string (buf);
}
const char *test_uid (char *&, const char *, size_t)
__attribute__ ((regparm (3)));
const char __reg3 *test_uid (char *&, const char *, size_t);
};
/* cwd cache stuff. */
@ -396,10 +395,10 @@ struct init_cygheap: public mini_cygheap
hook_chain hooks;
void close_ctty ();
void init_installation_root ();
void init_tls_list () __attribute__ ((regparm (1)));;
void add_tls (_cygtls *) __attribute__ ((regparm (2)));
void remove_tls (_cygtls *, DWORD) __attribute__ ((regparm (3)));
_cygtls *find_tls (int) __attribute__ ((regparm (2)));
void __reg1 init_tls_list ();;
void __reg2 add_tls (_cygtls *);
void __reg3 remove_tls (_cygtls *, DWORD);
_cygtls __reg2 *find_tls (int);
};

View File

@ -1,6 +1,7 @@
/* cygheap_malloc.h: Cygwin heap manager allocation functions.
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc.
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011
Red Hat, Inc.
This file is part of Cygwin.
@ -39,18 +40,18 @@ enum cygheap_types
};
extern "C" {
void __stdcall cfree (void *) __attribute__ ((regparm(1)));
void *__stdcall cmalloc (cygheap_types, DWORD) __attribute__ ((regparm(2)));
void *__stdcall crealloc (void *, DWORD) __attribute__ ((regparm(2)));
void *__stdcall ccalloc (cygheap_types, DWORD, DWORD) __attribute__ ((regparm(3)));
void *__stdcall cmalloc_abort (cygheap_types, DWORD) __attribute__ ((regparm(2)));
void *__stdcall crealloc_abort (void *, DWORD) __attribute__ ((regparm(2)));
void *__stdcall ccalloc_abort (cygheap_types, DWORD, DWORD) __attribute__ ((regparm(3)));
PWCHAR __stdcall cwcsdup (const PWCHAR) __attribute__ ((regparm(1)));
PWCHAR __stdcall cwcsdup1 (const PWCHAR) __attribute__ ((regparm(1)));
char *__stdcall cstrdup (const char *) __attribute__ ((regparm(1)));
char *__stdcall cstrdup1 (const char *) __attribute__ ((regparm(1)));
void __stdcall cfree_and_set (char *&, char * = NULL) __attribute__ ((regparm(2)));
void __reg1 cfree (void *);
void *__reg2 cmalloc (cygheap_types, DWORD);
void *__reg2 crealloc (void *, DWORD);
void *__reg3 ccalloc (cygheap_types, DWORD, DWORD);
void *__reg2 cmalloc_abort (cygheap_types, DWORD);
void *__reg2 crealloc_abort (void *, DWORD);
void *__reg3 ccalloc_abort (cygheap_types, DWORD, DWORD);
PWCHAR __reg1 cwcsdup (const PWCHAR);
PWCHAR __reg1 cwcsdup1 (const PWCHAR);
char *__reg1 cstrdup (const char *);
char *__reg1 cstrdup1 (const char *);
void __reg2 cfree_and_set (char *&, char * = NULL);
}
#endif /*_CYGHEAP_MALLOC_H*/

View File

@ -1,6 +1,6 @@
/* cygmalloc.h: cygwin DLL malloc stuff
Copyright 2002, 2003, 2004, 2005, 2007 Red Hat, Inc.
Copyright 2002, 2003, 2004, 2005, 2007, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -11,15 +11,24 @@ details. */
#ifdef __cplusplus
extern "C" {
#endif
void dlfree (void *p) __attribute__ ((regparm (1)));
void *dlmalloc (unsigned size) __attribute__ ((regparm (1)));
void *dlrealloc (void *p, unsigned size) __attribute__ ((regparm (2)));
void *dlcalloc (size_t nmemb, size_t size) __attribute__ ((regparm (2)));
void *dlmemalign (size_t alignment, size_t bytes) __attribute__ ((regparm (2)));
void *dlvalloc (size_t bytes) __attribute__ ((regparm (1)));
size_t dlmalloc_usable_size (void *p) __attribute__ ((regparm (1)));
int dlmalloc_trim (size_t) __attribute__ ((regparm (1)));
int dlmallopt (int p, int v) __attribute__ ((regparm (2)));
#ifndef __reg1
# define __reg1 __stdcall __attribute__ ((regparm (1)))
#endif
#ifndef __reg2
# define __reg2 __stdcall __attribute__ ((regparm (2)))
#endif
#ifndef __reg2
# define __reg2 __stdcall __attribute__ ((regparm (2)))
#endif
void __reg1 dlfree (void *p);
void __reg1 *dlmalloc (unsigned size);
void __reg2 *dlrealloc (void *p, unsigned size);
void __reg2 *dlcalloc (size_t nmemb, size_t size);
void __reg2 *dlmemalign (size_t alignment, size_t bytes);
void __reg1 *dlvalloc (size_t bytes);
size_t __reg1 dlmalloc_usable_size (void *p);
int __reg1 dlmalloc_trim (size_t);
int __reg2 dlmallopt (int p, int v);
void dlmalloc_stats ();
#ifndef __INSIDE_CYGWIN__

View File

@ -1,7 +1,7 @@
/* cygthread.h
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2010,
2011 Red Hat, Inc.
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2010, 2011 Red
Hat, Inc.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
@ -31,7 +31,7 @@ class cygthread
bool is_freerange;
static bool exiting;
HANDLE notify_detached;
void create () __attribute__ ((regparm (1)));
void __reg1 create ();
static void CALLBACK async_create (ULONG_PTR);
public:
bool terminate_thread ();
@ -39,7 +39,7 @@ class cygthread
static DWORD WINAPI simplestub (VOID *);
static DWORD main_thread_id;
static const char *name (DWORD = 0);
void callfunc (bool) __attribute__ ((noinline, regparm (2)));
void __reg2 callfunc (bool) __attribute__ ((noinline, ));
void auto_release () {func = NULL;}
void release (bool);
cygthread (LPTHREAD_START_ROUTINE start, unsigned n, LPVOID param, const char *name, HANDLE notify = NULL)

View File

@ -1,6 +1,7 @@
/* cygtls.h
Copyright 2003, 2004, 2005, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
Red Hat, Inc.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
@ -208,30 +209,28 @@ public:
static void call (DWORD (*) (void *, void *), void *);
void remove (DWORD);
void push (__stack_t addr) {*stackptr++ = (__stack_t) addr;}
__stack_t pop () __attribute__ ((regparm (1)));
__stack_t __reg1 pop ();
__stack_t retaddr () {return stackptr[-1];}
bool isinitialized () const
{
return initialized == CYGTLS_INITIALIZED;
}
bool interrupt_now (CONTEXT *, siginfo_t&, void *, struct sigaction&)
__attribute__((regparm(3)));
void __stdcall interrupt_setup (siginfo_t&, void *, struct sigaction&)
__attribute__((regparm(3)));
bool __reg3 interrupt_now (CONTEXT *, siginfo_t&, void *, struct sigaction&);
void __reg3 interrupt_setup (siginfo_t&, void *, struct sigaction&);
bool inside_kernel (CONTEXT *);
void copy_context (CONTEXT *) __attribute__ ((regparm(2)));
void signal_debugger (int) __attribute__ ((regparm(2)));
void __reg2 copy_context (CONTEXT *);
void __reg2 signal_debugger (int);
#ifdef CYGTLS_HANDLE
operator HANDLE () const {return tid ? tid->win32_obj_id : NULL;}
#endif
int call_signal_handler () __attribute__ ((regparm (1)));
void remove_wq (DWORD) __attribute__ ((regparm (1)));
void fixup_after_fork () __attribute__ ((regparm (1)));
void lock () __attribute__ ((regparm (1)));
void unlock () __attribute__ ((regparm (1)));
bool locked () __attribute__ ((regparm (1)));
int __reg1 call_signal_handler ();
void __reg1 remove_wq (DWORD);
void __reg1 fixup_after_fork ();
void __reg1 lock ();
void __reg1 unlock ();
bool __reg1 locked ();
HANDLE get_signal_arrived (bool wait_for_lock = true)
{
if (!signal_arrived)
@ -257,7 +256,7 @@ public:
}
void reset_signal_arrived () { will_wait_for_signal = false; }
private:
void call2 (DWORD (*) (void *, void *), void *, void *) __attribute__ ((regparm (3)));
void __reg3 call2 (DWORD (*) (void *, void *), void *, void *);
/*gentls_offsets*/
};
#pragma pack(pop)

View File

@ -28,9 +28,8 @@ extern LARGE_INTEGER cw_nowait_storage;
const unsigned cw_std_mask = cw_cancel | cw_cancel_self | cw_sig;
DWORD cygwait (HANDLE, PLARGE_INTEGER timeout,
unsigned = cw_std_mask)
__attribute__ ((regparm (3)));
DWORD __reg3 cygwait (HANDLE, PLARGE_INTEGER timeout,
unsigned = cw_std_mask);
extern inline DWORD __attribute__ ((always_inline))
cygwait (HANDLE h, DWORD howlong, unsigned mask)

View File

@ -103,7 +103,7 @@ newh ()
return NULL;
}
void __stdcall
void __reg3
modify_handle (const char *func, int ln, HANDLE h, const char *name, bool inh)
{
lock_debug here;
@ -119,7 +119,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. */
void __stdcall
void __reg3
add_handle (const char *func, int ln, HANDLE h, const char *name, bool inh)
{
handle_list *hl;
@ -213,7 +213,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
if the name of the handle being closed does not match the registered name. */
bool __stdcall
bool __reg3
close_handle (const char *func, int ln, HANDLE h, const char *name, bool force)
{
bool ret;

View File

@ -1,6 +1,7 @@
/* debug.h
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2010
Red Hat, Inc.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
@ -66,16 +67,12 @@ details. */
# define VerifyHandle(h) verify_handle (__PRETTY_FUNCTION__, __LINE__, (h))
void debug_init ();
void __stdcall add_handle (const char *, int, HANDLE, const char *, bool = false)
__attribute__ ((regparm (3)));
void __stdcall verify_handle (const char *, int, HANDLE)
__attribute__ ((regparm (3)));
bool __stdcall close_handle (const char *, int, HANDLE, const char *, bool)
__attribute__ ((regparm (3)));
void __reg3 add_handle (const char *, int, HANDLE, const char *, bool = false);
void __reg3 verify_handle (const char *, int, HANDLE);
bool __reg3 close_handle (const char *, int, HANDLE, const char *, bool);
extern "C" void console_printf (const char *fmt,...);
void __stdcall cygbench (const char *s) __attribute__ ((regparm (1)));
void __stdcall modify_handle (const char *, int, HANDLE, const char *, bool)
__attribute__ ((regparm (3)));
void __reg1 cygbench (const char *s);
void __reg3 modify_handle (const char *, int, HANDLE, const char *, bool);
void setclexec (HANDLE, HANDLE, bool);
void debug_fixup_after_fork_exec ();

View File

@ -1,7 +1,7 @@
/* dtable.h: fd table definition.
Copyright 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
2010, 2011, 2012 Red Hat, Inc.
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -67,7 +67,7 @@ public:
}
int find_unused_handle (int start);
int find_unused_handle () { return find_unused_handle (first_fd_for_open);}
void release (int fd) __attribute__ ((regparm (2)));
void __reg2 release (int fd);
void init_std_file_from_handle (int fd, HANDLE handle);
int dup3 (int oldfd, int newfd, int flags);
void fixup_after_exec ();

View File

@ -1,8 +1,8 @@
/* environ.cc: Cygwin-adopted functions from newlib to manipulate
process's environment.
Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
@ -375,7 +375,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
known posix value for the environment variable. Returns a pointer to
the appropriate conversion structure. */
win_env * __stdcall
win_env * __reg3
getwinenv (const char *env, const char *in_posix, win_env *temp)
{
if (!match_first_char (env, WC))
@ -872,7 +872,7 @@ env_sort (const void *a, const void *b)
return strcmp (*p, *q);
}
char * __stdcall
char * __reg3
getwinenveq (const char *name, size_t namelen, int x)
{
WCHAR name0[namelen - 1];
@ -907,8 +907,7 @@ struct spenv
bool add_if_exists; /* if true, retrieve value from cache */
const char * (cygheap_user::*from_cygheap) (const char *, size_t);
char *retrieve (bool, const char * const = NULL)
__attribute__ ((regparm (3)));
char __reg3 *retrieve (bool, const char * const = NULL);
};
#define env_dontadd almost_null
@ -972,7 +971,7 @@ spenv::retrieve (bool no_envblock, const char *const env)
filled with null terminated strings, terminated by double null characters.
Converts environment variables noted in conv_envvars into win32 form
prior to placing them in the string. */
char ** __stdcall
char ** __reg3
build_env (const char * const *envp, PWCHAR &envblock, int &envc,
bool no_envblock)
{

View File

@ -1,6 +1,6 @@
/* environ.h: Declarations for environ manipulation
Copyright 2000, 2001, 2002, 2003, 2005, 2006, 2008 Red Hat, Inc.
Copyright 2000, 2001, 2002, 2003, 2005, 2006, 2008, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -9,8 +9,7 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
/* Initialize the environment */
void environ_init (char **, int)
__attribute__ ((regparm (2)));
void __reg2 environ_init (char **, int);
/* The structure below is used to control conversion to/from posix-style
file specs. Currently, only PATH and HOME are converted, but PATH
@ -25,8 +24,7 @@ struct win_env
ssize_t (*toposix) (const void *, void *, size_t);
ssize_t (*towin32) (const void *, void *, size_t);
bool immediate;
void add_cache (const char *in_posix, const char *in_native = NULL)
__attribute__ ((regparm (3)));
void __reg3 add_cache (const char *in_posix, const char *in_native = NULL);
const char * get_native () const {return native ? native + namelen : NULL;}
const char * get_posix () const {return posix ? posix : NULL;}
struct win_env& operator = (struct win_env& x);
@ -34,16 +32,13 @@ struct win_env
~win_env ();
};
win_env * __stdcall getwinenv (const char *name, const char *posix = NULL, win_env * = NULL)
__attribute__ ((regparm (3)));
char * __stdcall getwinenveq (const char *name, size_t len, int)
__attribute__ ((regparm (3)));
win_env * __reg3 getwinenv (const char *name, const char *posix = NULL, win_env * = NULL);
char * __reg3 getwinenveq (const char *name, size_t len, int);
void __stdcall update_envptrs ();
extern "C" char **__cygwin_environ, ***main_environ;
extern "C" char __stdcall **cur_environ ();
char ** __stdcall build_env (const char * const *envp, PWCHAR &envblock,
int &envc, bool need_envblock)
__attribute__ ((regparm (3)));
char ** __reg3 build_env (const char * const *envp, PWCHAR &envblock,
int &envc, bool need_envblock);
#define ENV_CVT -1

View File

@ -1,7 +1,7 @@
/* errno.cc: errno-related functions
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -313,7 +313,7 @@ const char *_sys_errlist[] NO_COPY_INIT =
int NO_COPY_INIT _sys_nerr = sizeof (_sys_errlist) / sizeof (_sys_errlist[0]);
};
int __stdcall
int __reg2
geterrno_from_win_error (DWORD code, int deferrno)
{
for (int i = 0; errmap[i].w != 0; ++i)
@ -330,14 +330,14 @@ geterrno_from_win_error (DWORD code, int deferrno)
/* seterrno_from_win_error: Given a Windows error code, set errno
as appropriate. */
void __stdcall
void __reg3
seterrno_from_win_error (const char *file, int line, DWORD code)
{
syscall_printf ("%s:%d windows error %d", file, line, code);
errno = _impure_ptr->_errno = geterrno_from_win_error (code, EACCES);
}
int __stdcall
int __reg2
geterrno_from_nt_status (NTSTATUS status, int deferrno)
{
return geterrno_from_win_error (RtlNtStatusToDosError (status));
@ -345,7 +345,7 @@ geterrno_from_nt_status (NTSTATUS status, int deferrno)
/* seterrno_from_nt_status: Given a NT status code, set errno
as appropriate. */
void __stdcall
void __reg3
seterrno_from_nt_status (const char *file, int line, NTSTATUS status)
{
DWORD code = RtlNtStatusToDosError (status);
@ -356,7 +356,7 @@ seterrno_from_nt_status (const char *file, int line, NTSTATUS status)
}
/* seterrno: Set `errno' based on GetLastError (). */
void __stdcall
void __reg2
seterrno (const char *file, int line)
{
seterrno_from_win_error (file, line, GetLastError ());

View File

@ -41,7 +41,7 @@ static BOOL WINAPI ctrl_c_handler (DWORD);
NO_COPY static struct
{
unsigned int code;
NTSTATUS code;
const char *name;
} status_info[] =
{
@ -170,7 +170,7 @@ cygwin_exception::dump_exception ()
{
for (int i = 0; status_info[i].name; i++)
{
if (status_info[i].code == e->ExceptionCode)
if (status_info[i].code == (NTSTATUS) e->ExceptionCode)
{
exception_name = status_info[i].name;
break;
@ -441,7 +441,7 @@ try_to_debug (bool waitloop)
}
extern "C" void WINAPI RtlUnwind (void *, void *, PEXCEPTION_RECORD, void *);
static void __stdcall rtl_unwind (exception_list *, PEXCEPTION_RECORD) __attribute__ ((noinline, regparm (3)));
static void __reg3 rtl_unwind (exception_list *, PEXCEPTION_RECORD) __attribute__ ((noinline, ));
void __stdcall
rtl_unwind (exception_list *frame, PEXCEPTION_RECORD e)
{

View File

@ -1,7 +1,7 @@
/* fhandler.cc. See console.cc for fhandler_console functions.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -1269,7 +1269,7 @@ fhandler_base::lock (int, struct __flock64 *)
return -1;
}
int __stdcall
int __reg2
fhandler_base::fstat (struct __stat64 *buf)
{
if (is_fs_special ())
@ -1872,7 +1872,7 @@ fhandler_base::fpathconf (int v)
/* Overlapped I/O */
int __stdcall __attribute__ ((regparm (1)))
int __reg1
fhandler_base_overlapped::setup_overlapped ()
{
OVERLAPPED *ov = get_overlapped_buffer ();
@ -1883,7 +1883,7 @@ fhandler_base_overlapped::setup_overlapped ()
return ov->hEvent ? 0 : -1;
}
void __stdcall __attribute__ ((regparm (1)))
void __reg1
fhandler_base_overlapped::destroy_overlapped ()
{
OVERLAPPED *ov = get_overlapped ();
@ -1897,7 +1897,7 @@ fhandler_base_overlapped::destroy_overlapped ()
get_overlapped () = NULL;
}
bool __stdcall __attribute__ ((regparm (1)))
bool __reg1
fhandler_base_overlapped::has_ongoing_io ()
{
if (!io_pending)
@ -1911,7 +1911,7 @@ fhandler_base_overlapped::has_ongoing_io ()
return false;
}
fhandler_base_overlapped::wait_return __stdcall __attribute__ ((regparm (3)))
fhandler_base_overlapped::wait_return __reg3
fhandler_base_overlapped::wait_overlapped (bool inres, bool writing, DWORD *bytes, bool nonblocking, DWORD len)
{
if (!get_overlapped ())
@ -2019,7 +2019,7 @@ fhandler_base_overlapped::wait_overlapped (bool inres, bool writing, DWORD *byte
return res;
}
void __stdcall __attribute__ ((regparm (3)))
void __reg3
fhandler_base_overlapped::raw_read (void *ptr, size_t& len)
{
DWORD nbytes;
@ -2044,7 +2044,7 @@ fhandler_base_overlapped::raw_read (void *ptr, size_t& len)
len = (size_t) nbytes;
}
ssize_t __stdcall __attribute__ ((regparm (3)))
ssize_t __reg3
fhandler_base_overlapped::raw_write (const void *ptr, size_t len)
{
size_t nbytes;

View File

@ -1,7 +1,7 @@
/* fhandler.h
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -328,38 +328,37 @@ class fhandler_base
int open_fs (int, mode_t = 0);
# define archetype_usecount(n) _archetype_usecount (__PRETTY_FUNCTION__, __LINE__, (n))
int close_fs () { return fhandler_base::close (); }
virtual int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
void stat_fixup (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __stdcall fstat_fs (struct __stat64 *buf) __attribute__ ((regparm (2)));
virtual int __reg2 fstat (struct __stat64 *buf);
void __reg2 stat_fixup (struct __stat64 *buf);
int __reg2 fstat_fs (struct __stat64 *buf);
private:
int __stdcall fstat_helper (struct __stat64 *buf,
DWORD nNumberOfLinks)
__attribute__ ((regparm (3)));
int __stdcall fstat_by_nfs_ea (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __stdcall fstat_by_handle (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __stdcall fstat_by_name (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __reg3 fstat_helper (struct __stat64 *buf,
DWORD nNumberOfLinks);
int __reg2 fstat_by_nfs_ea (struct __stat64 *buf);
int __reg2 fstat_by_handle (struct __stat64 *buf);
int __reg2 fstat_by_name (struct __stat64 *buf);
public:
virtual int __stdcall fstatvfs (struct statvfs *buf) __attribute__ ((regparm (2)));
int utimens_fs (const struct timespec *) __attribute__ ((regparm (2)));
virtual int __stdcall fchmod (mode_t mode) __attribute__ ((regparm (1)));
virtual int __stdcall fchown (__uid32_t uid, __gid32_t gid) __attribute__ ((regparm (2)));
virtual int __stdcall facl (int, int, __acl32 *) __attribute__ ((regparm (3)));
virtual ssize_t __stdcall fgetxattr (const char *, void *, size_t) __attribute__ ((regparm (3)));
virtual int __stdcall fsetxattr (const char *, const void *, size_t, int) __attribute__ ((regparm (3)));
virtual int __stdcall fadvise (_off64_t, _off64_t, int) __attribute__ ((regparm (3)));
virtual int __stdcall ftruncate (_off64_t, bool) __attribute__ ((regparm (3)));
virtual int __stdcall link (const char *) __attribute__ ((regparm (2)));
virtual int __stdcall utimens (const struct timespec *) __attribute__ ((regparm (2)));
virtual int __stdcall fsync () __attribute__ ((regparm (1)));
virtual int __reg2 fstatvfs (struct statvfs *buf);
int __reg2 utimens_fs (const struct timespec *);
virtual int __reg1 fchmod (mode_t mode);
virtual int __reg2 fchown (__uid32_t uid, __gid32_t gid);
virtual int __reg3 facl (int, int, __acl32 *);
virtual ssize_t __reg3 fgetxattr (const char *, void *, size_t);
virtual int __reg3 fsetxattr (const char *, const void *, size_t, int);
virtual int __reg3 fadvise (_off64_t, _off64_t, int);
virtual int __reg3 ftruncate (_off64_t, bool);
virtual int __reg2 link (const char *);
virtual int __reg2 utimens (const struct timespec *);
virtual int __reg1 fsync ();
virtual int ioctl (unsigned int cmd, void *);
virtual int fcntl (int cmd, void *);
virtual char const *ttyname () { return get_name (); }
virtual void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
virtual void __reg3 read (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 writev (const struct iovec *, int iovcnt, ssize_t tot = -1);
virtual ssize_t __stdcall pread (void *, size_t, _off64_t) __attribute__ ((regparm (3)));
virtual ssize_t __stdcall pwrite (void *, size_t, _off64_t) __attribute__ ((regparm (3)));
virtual ssize_t __reg3 pread (void *, size_t, _off64_t);
virtual ssize_t __reg3 pwrite (void *, size_t, _off64_t);
virtual _off64_t lseek (_off64_t offset, int whence);
virtual int lock (int, struct __flock64 *);
virtual int dup (fhandler_base *child, int flags);
@ -396,8 +395,8 @@ public:
virtual class fhandler_console *is_console () { return 0; }
virtual int is_windows () {return 0; }
virtual void __stdcall raw_read (void *ptr, size_t& ulen) __attribute__ ((regparm (3)));
virtual ssize_t __stdcall raw_write (const void *ptr, size_t ulen) __attribute__ ((regparm (3)));
virtual void __reg3 raw_read (void *ptr, size_t& ulen);
virtual ssize_t __reg3 raw_write (const void *ptr, size_t ulen);
/* Virtual accessor functions to hide the fact
that some fd's have two handles. */
@ -423,8 +422,8 @@ public:
virtual void set_eof () {}
virtual int mkdir (mode_t mode);
virtual int rmdir ();
virtual DIR *opendir (int fd) __attribute__ ((regparm (2)));
virtual int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
virtual __reg2 DIR *opendir (int fd);
virtual __reg3 int readdir (DIR *, dirent *);
virtual long telldir (DIR *);
virtual void seekdir (DIR *, long);
virtual void rewinddir (DIR *);
@ -432,9 +431,9 @@ public:
bool is_auto_device () {return isdevice () && !dev ().isfs ();}
bool is_fs_special () {return pc.is_fs_special ();}
bool issymlink () {return pc.issymlink ();}
bool device_access_denied (int) __attribute__ ((regparm (2)));
int fhaccess (int flags, bool) __attribute__ ((regparm (3)));
virtual bool __stdcall has_ongoing_io () __attribute__ ((regparm (1))) {return false;}
bool __reg2 device_access_denied (int);
int __reg3 fhaccess (int flags, bool);
virtual bool __reg1 has_ongoing_io () {return false;}
fhandler_base (void *) {}
@ -556,9 +555,9 @@ class fhandler_socket: public fhandler_base
int getpeereid (pid_t *pid, __uid32_t *euid, __gid32_t *egid);
int open (int flags, mode_t mode = 0);
void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
void __reg3 read (void *ptr, size_t& len);
ssize_t __stdcall readv (const struct iovec *, int iovcnt, ssize_t tot = -1);
inline ssize_t recv_internal (struct _WSAMSG *wsamsg, bool use_recvmsg) __attribute__ ((regparm (3)));
inline ssize_t __reg3 recv_internal (struct _WSAMSG *wsamsg, bool use_recvmsg);
ssize_t recvfrom (void *ptr, size_t len, int flags,
struct sockaddr *from, int *fromlen);
ssize_t recvmsg (struct msghdr *msg, int flags);
@ -596,12 +595,12 @@ class fhandler_socket: public fhandler_base
void set_peer_sun_path (const char *path);
char *get_peer_sun_path () {return peer_sun_path;}
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __stdcall fstatvfs (struct statvfs *buf) __attribute__ ((regparm (2)));
int __stdcall fchmod (mode_t mode) __attribute__ ((regparm (1)));
int __stdcall fchown (__uid32_t uid, __gid32_t gid) __attribute__ ((regparm (2)));
int __stdcall facl (int, int, __acl32 *) __attribute__ ((regparm (3)));
int __stdcall link (const char *) __attribute__ ((regparm (2)));
int __reg2 fstat (struct __stat64 *buf);
int __reg2 fstatvfs (struct statvfs *buf);
int __reg1 fchmod (mode_t mode);
int __reg2 fchown (__uid32_t uid, __gid32_t gid);
int __reg3 facl (int, int, __acl32 *);
int __reg2 link (const char *);
fhandler_socket (void *) {}
@ -639,11 +638,11 @@ protected:
OVERLAPPED *overlapped;
size_t max_atomic_write;
public:
wait_return __stdcall wait_overlapped (bool, bool, DWORD *, bool, DWORD = 0) __attribute__ ((regparm (3)));
int __stdcall setup_overlapped () __attribute__ ((regparm (1)));
void __stdcall destroy_overlapped () __attribute__ ((regparm (1)));
virtual void __stdcall raw_read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
virtual ssize_t __stdcall raw_write (const void *ptr, size_t len) __attribute__ ((regparm (3)));
wait_return __reg3 wait_overlapped (bool, bool, DWORD *, bool, DWORD = 0);
int __reg1 setup_overlapped ();
void __reg1 destroy_overlapped ();
virtual void __reg3 raw_read (void *ptr, size_t& len);
virtual ssize_t __reg3 raw_write (const void *ptr, size_t len);
OVERLAPPED *&get_overlapped () {return overlapped;}
OVERLAPPED *get_overlapped_buffer () {return &io_status;}
void set_overlapped (OVERLAPPED *ov) {overlapped = ov;}
@ -651,7 +650,7 @@ public:
{
memset (&io_status, 0, sizeof io_status);
}
bool __stdcall has_ongoing_io () __attribute__ ((regparm (1)));
bool __reg1 has_ongoing_io ();
void fixup_after_fork (HANDLE);
void fixup_after_exec ();
@ -660,7 +659,7 @@ public:
int dup (fhandler_base *child, int);
void check_later ();
static void flush_all_async_io () __attribute__ ((regparm (1)));;
static void __reg1 flush_all_async_io ();;
fhandler_base_overlapped (void *) {}
@ -702,9 +701,9 @@ public:
int open (int flags, mode_t mode = 0);
int dup (fhandler_base *child, int);
int ioctl (unsigned int cmd, void *);
int __stdcall fstatvfs (struct statvfs *buf) __attribute__ ((regparm (2)));
int __stdcall fadvise (_off64_t, _off64_t, int) __attribute__ ((regparm (3)));
int __stdcall ftruncate (_off64_t, bool) __attribute__ ((regparm (3)));
int __reg2 fstatvfs (struct statvfs *buf);
int __reg3 fadvise (_off64_t, _off64_t, int);
int __reg3 ftruncate (_off64_t, bool);
int init (HANDLE, DWORD, mode_t);
static int create (fhandler_pipe *[2], unsigned, int);
static DWORD create (LPSECURITY_ATTRIBUTES, HANDLE *, HANDLE *, DWORD,
@ -731,8 +730,8 @@ class fhandler_fifo: public fhandler_base_overlapped
{
HANDLE read_ready;
HANDLE write_ready;
bool wait (HANDLE) __attribute__ ((regparm (2)));
char *fifo_name (char *, const char *) __attribute__ ((regparm (2)));
bool __reg2 wait (HANDLE);
char __reg2 *fifo_name (char *, const char *);
public:
fhandler_fifo ();
int open (int, mode_t);
@ -740,10 +739,10 @@ public:
int dup (fhandler_base *child, int);
bool isfifo () const { return true; }
void set_close_on_exec (bool val);
void __stdcall raw_read (void *ptr, size_t& ulen) __attribute__ ((regparm (3)));
void __reg3 raw_read (void *ptr, size_t& ulen);
bool arm (HANDLE h);
void fixup_after_fork (HANDLE);
int __stdcall fstatvfs (struct statvfs *buf) __attribute__ ((regparm (2)));
int __reg2 fstatvfs (struct statvfs *buf);
select_record *select_read (select_stuff *);
select_record *select_write (select_stuff *);
select_record *select_except (select_stuff *);
@ -771,9 +770,9 @@ class fhandler_mailslot : public fhandler_base_overlapped
POBJECT_ATTRIBUTES get_object_attr (OBJECT_ATTRIBUTES &, PUNICODE_STRING, int);
public:
fhandler_mailslot ();
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __reg2 fstat (struct __stat64 *buf);
int open (int flags, mode_t mode = 0);
ssize_t __stdcall raw_write (const void *, size_t) __attribute__ ((regparm (3)));
ssize_t __reg3 raw_write (const void *, size_t);
int ioctl (unsigned int cmd, void *);
select_record *select_read (select_stuff *);
@ -820,7 +819,7 @@ class fhandler_dev_raw: public fhandler_base
int open (int flags, mode_t mode = 0);
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __reg2 fstat (struct __stat64 *buf);
int dup (fhandler_base *child, int);
int ioctl (unsigned int cmd, void *buf);
@ -882,8 +881,8 @@ class fhandler_dev_floppy: public fhandler_dev_raw
int open (int flags, mode_t mode = 0);
int close ();
int dup (fhandler_base *child, int);
void __stdcall raw_read (void *ptr, size_t& ulen) __attribute__ ((regparm (3)));
ssize_t __stdcall raw_write (const void *ptr, size_t ulen) __attribute__ ((regparm (3)));
void __reg3 raw_read (void *ptr, size_t& ulen);
ssize_t __reg3 raw_write (const void *ptr, size_t ulen);
_off64_t lseek (_off64_t offset, int whence);
int ioctl (unsigned int cmd, void *buf);
@ -923,12 +922,12 @@ class fhandler_dev_tape: public fhandler_dev_raw
int open (int flags, mode_t mode = 0);
virtual int close ();
void __stdcall raw_read (void *ptr, size_t& ulen) __attribute__ ((regparm (3)));
ssize_t __stdcall raw_write (const void *ptr, size_t ulen) __attribute__ ((regparm (3)));
void __reg3 raw_read (void *ptr, size_t& ulen);
ssize_t __reg3 raw_write (const void *ptr, size_t ulen);
virtual _off64_t lseek (_off64_t offset, int whence);
virtual int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
virtual int __reg2 fstat (struct __stat64 *buf);
virtual int dup (fhandler_base *child, int);
virtual void fixup_after_fork (HANDLE parent);
@ -958,7 +957,7 @@ class fhandler_dev_tape: public fhandler_dev_raw
class fhandler_disk_file: public fhandler_base
{
HANDLE prw_handle;
int readdir_helper (DIR *, dirent *, DWORD, DWORD, PUNICODE_STRING fname) __attribute__ ((regparm (3)));
int __reg3 readdir_helper (DIR *, dirent *, DWORD, DWORD, PUNICODE_STRING fname);
int prw_open (bool);
@ -972,17 +971,17 @@ class fhandler_disk_file: public fhandler_base
void fixup_after_fork (HANDLE parent);
int lock (int, struct __flock64 *);
bool isdevice () const { return false; }
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __stdcall fchmod (mode_t mode) __attribute__ ((regparm (1)));
int __stdcall fchown (__uid32_t uid, __gid32_t gid) __attribute__ ((regparm (2)));
int __stdcall facl (int, int, __acl32 *) __attribute__ ((regparm (3)));
ssize_t __stdcall fgetxattr (const char *, void *, size_t) __attribute__ ((regparm (3)));
int __stdcall fsetxattr (const char *, const void *, size_t, int) __attribute__ ((regparm (3)));
int __stdcall fadvise (_off64_t, _off64_t, int) __attribute__ ((regparm (3)));
int __stdcall ftruncate (_off64_t, bool) __attribute__ ((regparm (3)));
int __stdcall link (const char *) __attribute__ ((regparm (2)));
int __stdcall utimens (const struct timespec *) __attribute__ ((regparm (2)));
int __stdcall fstatvfs (struct statvfs *buf) __attribute__ ((regparm (2)));
int __reg2 fstat (struct __stat64 *buf);
int __reg1 fchmod (mode_t mode);
int __reg2 fchown (__uid32_t uid, __gid32_t gid);
int __reg3 facl (int, int, __acl32 *);
ssize_t __reg3 fgetxattr (const char *, void *, size_t);
int __reg3 fsetxattr (const char *, const void *, size_t, int);
int __reg3 fadvise (_off64_t, _off64_t, int);
int __reg3 ftruncate (_off64_t, bool);
int __reg2 link (const char *);
int __reg2 utimens (const struct timespec *);
int __reg2 fstatvfs (struct statvfs *buf);
HANDLE mmap (caddr_t *addr, size_t len, int prot, int flags, _off64_t off);
int munmap (HANDLE h, caddr_t addr, size_t len);
@ -991,15 +990,15 @@ class fhandler_disk_file: public fhandler_base
_off64_t offset, DWORD size, void *address);
int mkdir (mode_t mode);
int rmdir ();
DIR *opendir (int fd) __attribute__ ((regparm (2)));
int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
DIR __reg2 *opendir (int fd);
int __reg3 readdir (DIR *, dirent *);
long telldir (DIR *);
void seekdir (DIR *, long);
void rewinddir (DIR *);
int closedir (DIR *);
ssize_t __stdcall pread (void *, size_t, _off64_t) __attribute__ ((regparm (3)));
ssize_t __stdcall pwrite (void *, size_t, _off64_t) __attribute__ ((regparm (3)));
ssize_t __reg3 pread (void *, size_t, _off64_t);
ssize_t __reg3 pwrite (void *, size_t, _off64_t);
fhandler_disk_file (void *) {}
@ -1027,10 +1026,10 @@ public:
fhandler_dev ();
int open (int flags, mode_t mode);
int close ();
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __stdcall fstatvfs (struct statvfs *buf) __attribute__ ((regparm (2)));
DIR *opendir (int fd) __attribute__ ((regparm (2)));
int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
int __reg2 fstat (struct __stat64 *buf);
int __reg2 fstatvfs (struct statvfs *buf);
DIR __reg2 *opendir (int fd);
int __reg3 readdir (DIR *, dirent *);
void rewinddir (DIR *);
fhandler_dev (void *) {}
@ -1065,12 +1064,12 @@ class fhandler_cygdrive: public fhandler_disk_file
fhandler_cygdrive ();
int open (int flags, mode_t mode);
int close ();
DIR *opendir (int fd) __attribute__ ((regparm (2)));
int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
DIR __reg2 *opendir (int fd);
int __reg3 readdir (DIR *, dirent *);
void rewinddir (DIR *);
int closedir (DIR *);
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __stdcall fstatvfs (struct statvfs *buf) __attribute__ ((regparm (2)));
int __reg2 fstat (struct __stat64 *buf);
int __reg2 fstatvfs (struct statvfs *buf);
fhandler_cygdrive (void *) {}
@ -1112,8 +1111,8 @@ class fhandler_serial: public fhandler_base
int init (HANDLE h, DWORD a, mode_t flags);
void overlapped_setup ();
int dup (fhandler_base *child, int);
void __stdcall raw_read (void *ptr, size_t& ulen) __attribute__ ((regparm (3)));
ssize_t __stdcall raw_write (const void *ptr, size_t ulen) __attribute__ ((regparm (3)));
void __reg3 raw_read (void *ptr, size_t& ulen);
ssize_t __reg3 raw_write (const void *ptr, size_t ulen);
int tcsendbreak (int);
int tcdrain ();
int tcflow (int);
@ -1372,7 +1371,7 @@ private:
void open_setup (int flags);
int dup (fhandler_base *, int);
void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
void __reg3 read (void *ptr, size_t& len);
ssize_t __stdcall write (const void *ptr, size_t len);
void doecho (const void *str, DWORD len) { (void) write (str, len); }
int close ();
@ -1480,7 +1479,7 @@ class fhandler_pty_slave: public fhandler_pty_common
int open (int flags, mode_t mode = 0);
void open_setup (int flags);
ssize_t __stdcall write (const void *ptr, size_t len);
void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
void __reg3 read (void *ptr, size_t& len);
int init (HANDLE, DWORD, mode_t);
int tcsetattr (int a, const struct termios *t);
@ -1496,9 +1495,9 @@ class fhandler_pty_slave: public fhandler_pty_common
select_record *select_read (select_stuff *);
int get_unit ();
virtual char const *ttyname () { return pc.dev.name; }
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __stdcall fchmod (mode_t mode) __attribute__ ((regparm (1)));
int __stdcall fchown (__uid32_t uid, __gid32_t gid) __attribute__ ((regparm (2)));
int __reg2 fstat (struct __stat64 *buf);
int __reg1 fchmod (mode_t mode);
int __reg2 fchown (__uid32_t uid, __gid32_t gid);
fhandler_pty_slave (void *) {}
@ -1540,7 +1539,7 @@ public:
int open (int flags, mode_t mode = 0);
void open_setup (int flags);
ssize_t __stdcall write (const void *ptr, size_t len);
void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
void __reg3 read (void *ptr, size_t& len);
int close ();
void cleanup ();
@ -1611,7 +1610,7 @@ class fhandler_dev_zero: public fhandler_base
fhandler_dev_zero ();
int open (int flags, mode_t mode = 0);
ssize_t __stdcall write (const void *ptr, size_t len);
void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
void __reg3 read (void *ptr, size_t& len);
_off64_t lseek (_off64_t offset, int whence);
virtual HANDLE mmap (caddr_t *addr, size_t len, int prot,
@ -1655,7 +1654,7 @@ class fhandler_dev_random: public fhandler_base
fhandler_dev_random ();
int open (int flags, mode_t mode = 0);
ssize_t __stdcall write (const void *ptr, size_t len);
void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
void __reg3 read (void *ptr, size_t& len);
_off64_t lseek (_off64_t offset, int whence);
int close ();
int dup (fhandler_base *child, int);
@ -1690,9 +1689,9 @@ class fhandler_dev_mem: public fhandler_base
int open (int flags, mode_t mode = 0);
ssize_t __stdcall write (const void *ptr, size_t ulen);
void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
void __reg3 read (void *ptr, size_t& len);
_off64_t lseek (_off64_t offset, int whence);
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __reg2 fstat (struct __stat64 *buf);
HANDLE mmap (caddr_t *addr, size_t len, int prot, int flags, _off64_t off);
int munmap (HANDLE h, caddr_t addr, size_t len);
@ -1727,9 +1726,9 @@ class fhandler_dev_clipboard: public fhandler_base
fhandler_dev_clipboard ();
int is_windows () { return 1; }
int open (int flags, mode_t mode = 0);
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __reg2 fstat (struct __stat64 *buf);
ssize_t __stdcall write (const void *ptr, size_t len);
void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
void __reg3 read (void *ptr, size_t& len);
_off64_t lseek (_off64_t offset, int whence);
int close ();
@ -1764,7 +1763,7 @@ class fhandler_windows: public fhandler_base
int is_windows () { return 1; }
int open (int flags, mode_t mode = 0);
ssize_t __stdcall write (const void *ptr, size_t len);
void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
void __reg3 read (void *ptr, size_t& len);
int ioctl (unsigned int cmd, void *);
_off64_t lseek (_off64_t, int) { return 0; }
int close () { return 0; }
@ -1811,7 +1810,7 @@ class fhandler_dev_dsp: public fhandler_base
int open (int flags, mode_t mode = 0);
ssize_t __stdcall write (const void *ptr, size_t len);
void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
void __reg3 read (void *ptr, size_t& len);
int ioctl (unsigned int cmd, void *);
_off64_t lseek (_off64_t, int);
int close ();
@ -1853,22 +1852,22 @@ class fhandler_virtual : public fhandler_base
virtual ~fhandler_virtual();
virtual virtual_ftype_t exists();
DIR *opendir (int fd) __attribute__ ((regparm (2)));
DIR __reg2 *opendir (int fd);
long telldir (DIR *);
void seekdir (DIR *, long);
void rewinddir (DIR *);
int closedir (DIR *);
ssize_t __stdcall write (const void *ptr, size_t len);
void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
void __reg3 read (void *ptr, size_t& len);
_off64_t lseek (_off64_t, int);
int dup (fhandler_base *child, int);
int open (int flags, mode_t mode = 0);
int close ();
int __stdcall fstat (struct stat *buf) __attribute__ ((regparm (2)));
int __stdcall fstatvfs (struct statvfs *buf) __attribute__ ((regparm (2)));
int __stdcall fchmod (mode_t mode) __attribute__ ((regparm (1)));
int __stdcall fchown (__uid32_t uid, __gid32_t gid) __attribute__ ((regparm (2)));
int __stdcall facl (int, int, __acl32 *) __attribute__ ((regparm (3)));
int __reg2 fstat (struct stat *buf);
int __reg2 fstatvfs (struct statvfs *buf);
int __reg1 fchmod (mode_t mode);
int __reg2 fchown (__uid32_t uid, __gid32_t gid);
int __reg3 facl (int, int, __acl32 *);
virtual bool fill_filebuf ();
char *get_filebuf () { return filebuf; }
void fixup_after_exec ();
@ -1896,13 +1895,13 @@ class fhandler_proc: public fhandler_virtual
public:
fhandler_proc ();
virtual_ftype_t exists();
DIR *opendir (int fd) __attribute__ ((regparm (2)));
DIR __reg2 *opendir (int fd);
int closedir (DIR *);
int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
int __reg3 readdir (DIR *, dirent *);
static fh_devices get_proc_fhandler (const char *path);
int open (int flags, mode_t mode = 0);
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __reg2 fstat (struct __stat64 *buf);
bool fill_filebuf ();
fhandler_proc (void *) {}
@ -1927,18 +1926,18 @@ class fhandler_procsys: public fhandler_virtual
{
public:
fhandler_procsys ();
virtual_ftype_t exists(struct __stat64 *buf) __attribute__ ((regparm (2)));
virtual_ftype_t __reg2 exists(struct __stat64 *buf);
virtual_ftype_t exists();
DIR *opendir (int fd) __attribute__ ((regparm (2)));
int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
DIR __reg2 *opendir (int fd);
int __reg3 readdir (DIR *, dirent *);
long telldir (DIR *);
void seekdir (DIR *, long);
int closedir (DIR *);
int open (int flags, mode_t mode = 0);
int close ();
void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
void __reg3 read (void *ptr, size_t& len);
ssize_t __stdcall write (const void *ptr, size_t len);
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __reg2 fstat (struct __stat64 *buf);
bool fill_filebuf ();
fhandler_procsys (void *) {}
@ -1965,9 +1964,9 @@ class fhandler_procsysvipc: public fhandler_proc
public:
fhandler_procsysvipc ();
virtual_ftype_t exists();
int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
int __reg3 readdir (DIR *, dirent *);
int open (int flags, mode_t mode = 0);
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __reg2 fstat (struct __stat64 *buf);
bool fill_filebuf ();
fhandler_procsysvipc (void *) {}
@ -1993,12 +1992,12 @@ class fhandler_netdrive: public fhandler_virtual
public:
fhandler_netdrive ();
virtual_ftype_t exists();
int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
int __reg3 readdir (DIR *, dirent *);
void seekdir (DIR *, long);
void rewinddir (DIR *);
int closedir (DIR *);
int open (int flags, mode_t mode = 0);
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __reg2 fstat (struct __stat64 *buf);
fhandler_netdrive (void *) {}
@ -2028,15 +2027,15 @@ class fhandler_registry: public fhandler_proc
fhandler_registry ();
void set_name (path_conv &pc);
virtual_ftype_t exists();
DIR *opendir (int fd) __attribute__ ((regparm (2)));
int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
DIR __reg2 *opendir (int fd);
int __reg3 readdir (DIR *, dirent *);
long telldir (DIR *);
void seekdir (DIR *, long);
void rewinddir (DIR *);
int closedir (DIR *);
int open (int flags, mode_t mode = 0);
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __reg2 fstat (struct __stat64 *buf);
bool fill_filebuf ();
int close ();
int dup (fhandler_base *child, int);
@ -2066,11 +2065,11 @@ class fhandler_process: public fhandler_proc
public:
fhandler_process ();
virtual_ftype_t exists();
DIR *opendir (int fd) __attribute__ ((regparm (2)));
DIR __reg2 *opendir (int fd);
int closedir (DIR *);
int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
int __reg3 readdir (DIR *, dirent *);
int open (int flags, mode_t mode = 0);
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __reg2 fstat (struct __stat64 *buf);
bool fill_filebuf ();
fhandler_process (void *) {}
@ -2097,9 +2096,9 @@ class fhandler_procnet: public fhandler_proc
public:
fhandler_procnet ();
virtual_ftype_t exists();
int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
int __reg3 readdir (DIR *, dirent *);
int open (int flags, mode_t mode = 0);
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __reg2 fstat (struct __stat64 *buf);
bool fill_filebuf ();
fhandler_procnet (void *) {}

View File

@ -1,7 +1,7 @@
/* fhandler_dev_clipboard: code to access /dev/clipboard
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2011,
2012 Red Hat, Inc
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2011, 2012, 2013
Red Hat, Inc
Written by Charles Wilson (cwilson@ece.gatech.edu)
@ -31,7 +31,7 @@ details. */
static const NO_COPY WCHAR *CYGWIN_NATIVE = L"CYGWIN_NATIVE_CLIPBOARD";
/* this is MT safe because windows format id's are atomic */
static int cygnativeformat;
static UINT cygnativeformat;
typedef struct
{
@ -180,7 +180,7 @@ fhandler_dev_clipboard::write (const void *buf, size_t len)
return len;
}
int __stdcall
int __reg2
fhandler_dev_clipboard::fstat (struct __stat64 *buf)
{
buf->st_mode = S_IFCHR | STD_RBITS | STD_WBITS | S_IWGRP | S_IWOTH;
@ -214,13 +214,13 @@ fhandler_dev_clipboard::fstat (struct __stat64 *buf)
return 0;
}
void __stdcall
void __reg3
fhandler_dev_clipboard::read (void *ptr, size_t& len)
{
HGLOBAL hglb;
size_t ret = 0;
UINT formatlist[2];
int format;
UINT format;
LPVOID cb_data;
int rach;
@ -269,9 +269,9 @@ fhandler_dev_clipboard::read (void *ptr, size_t& len)
size_t glen = GlobalSize (hglb) / sizeof (WCHAR) - 1;
if (pos < glen)
{
/* If caller's buffer is too small to hold at least one
max-size character, redirect algorithm to local
read-ahead buffer, finally fill class read-ahead buffer
/* If caller's buffer is too small to hold at least one
max-size character, redirect algorithm to local
read-ahead buffer, finally fill class read-ahead buffer
with result and feed caller from there. */
char *conv_ptr = (char *) ptr;
size_t conv_len = len;
@ -293,7 +293,7 @@ fhandler_dev_clipboard::read (void *ptr, size_t& len)
it, so we could potentially drop wide chars. */
while ((ret = sys_wcstombs (NULL, 0, buf + pos, glen - pos))
!= (size_t) -1
&& (ret > conv_len
&& (ret > conv_len
/* Skip separated high surrogate: */
|| ((buf [pos + glen - 1] & 0xFC00) == 0xD800 && glen - pos > 1)))
--glen;

View File

@ -1,6 +1,6 @@
/* fhandler_dev.cc, Implement /dev.
Copyright 2012 Red Hat, Inc.
Copyright 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -67,7 +67,7 @@ fhandler_dev::close ()
return fhandler_disk_file::close ();
}
int
int __reg2
fhandler_dev::fstat (struct __stat64 *st)
{
/* If /dev really exists on disk, return correct disk information. */

View File

@ -1,7 +1,7 @@
/* fhandler_disk_file.cc
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -699,7 +699,7 @@ fhandler_base::fstat_helper (struct __stat64 *buf,
return 0;
}
int __stdcall
int __reg2
fhandler_disk_file::fstat (struct __stat64 *buf)
{
return fstat_fs (buf);

View File

@ -313,7 +313,7 @@ errout:
len = -1;
}
int __stdcall
int __reg2
fhandler_fifo::fstatvfs (struct statvfs *sfs)
{
fhandler_disk_file fh (pc);

View File

@ -1,6 +1,6 @@
/* fhandler_mailslot.cc. See fhandler.h for a description of the fhandler classes.
Copyright 2005, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
Copyright 2005, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -28,7 +28,7 @@ fhandler_mailslot::fhandler_mailslot ()
{
}
int __stdcall
int __reg2
fhandler_mailslot::fstat (struct __stat64 *buf)
{
debug_printf ("here");

View File

@ -1,7 +1,7 @@
/* fhandler_mem.cc. See fhandler.h for a description of the fhandler classes.
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009,
2010, 2011, 2012 Red Hat, Inc.
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011,
2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -239,7 +239,7 @@ fhandler_dev_mem::lseek (_off64_t offset, int whence)
return pos;
}
int
int __reg2
fhandler_dev_mem::fstat (struct __stat64 *buf)
{
fhandler_base::fstat (buf);

View File

@ -1,6 +1,6 @@
/* fhandler_netdrive.cc: fhandler for // and //MACHINE handling
Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -174,7 +174,7 @@ fhandler_netdrive::fhandler_netdrive ():
{
}
int
int __reg2
fhandler_netdrive::fstat (struct __stat64 *buf)
{
const char *path = get_name ();

View File

@ -1,6 +1,7 @@
/* fhandler_proc.cc: fhandler for /proc virtual filesystem
Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 Red Hat, Inc.
Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013
Red Hat, Inc.
This file is part of Cygwin.
@ -183,7 +184,7 @@ fhandler_proc::fhandler_proc ():
{
}
int
int __reg2
fhandler_proc::fstat (struct __stat64 *buf)
{
const char *path = get_name ();

View File

@ -1,7 +1,7 @@
/* fhandler_process.cc: fhandler for /proc/<pid> virtual filesystem
Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
2010, 2011, 2012 Red Hat, Inc.
Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
2013 Red Hat, Inc.
This file is part of Cygwin.
@ -136,7 +136,7 @@ fhandler_process::fhandler_process ():
{
}
int
int __reg2
fhandler_process::fstat (struct __stat64 *buf)
{
const char *path = get_name ();

View File

@ -1,6 +1,6 @@
/* fhandler_procnet.cc: fhandler for /proc/net virtual filesystem
Copyright 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -80,7 +80,7 @@ fhandler_procnet::fhandler_procnet ():
{
}
int
int __reg2
fhandler_procnet::fstat (struct __stat64 *buf)
{
fhandler_base::fstat (buf);

View File

@ -1,6 +1,6 @@
/* fhandler_procsys.cc: fhandler for native NT namespace.
Copyright 2010, 2011 Red Hat, Inc.
Copyright 2010, 2011, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -260,7 +260,7 @@ unreadable:
return false;
}
int
int __reg2
fhandler_procsys::fstat (struct __stat64 *buf)
{
const char *path = get_name ();

View File

@ -1,6 +1,6 @@
/* fhandler_procsysvipc.cc: fhandler for /proc/sysvipc virtual filesystem
Copyright 2011 Red Hat, Inc.
Copyright 2011, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -92,7 +92,7 @@ fhandler_procsysvipc::fhandler_procsysvipc ():
{
}
int
int __reg2
fhandler_procsysvipc::fstat (struct __stat64 *buf)
{
fhandler_base::fstat (buf);

View File

@ -1,7 +1,7 @@
/* fhandler_raw.cc. See fhandler.h for a description of the fhandler classes.
Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2011,
2012 Red Hat, Inc.
2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -35,7 +35,7 @@ fhandler_dev_raw::~fhandler_dev_raw ()
delete [] devbufalloc;
}
int __stdcall
int __reg2
fhandler_dev_raw::fstat (struct __stat64 *buf)
{
debug_printf ("here");

View File

@ -1,7 +1,7 @@
/* fhandler_registry.cc: fhandler for /proc/registry virtual filesystem
Copyright 2002, 2003, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
2010, 2011, 2012 Red Hat, Inc.
Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
2013 Red Hat, Inc.
This file is part of Cygwin.
@ -461,7 +461,7 @@ fhandler_proc ()
prefix_len = sizeof ("registry") - 1;
}
int
int __reg2
fhandler_registry::fstat (struct __stat64 *buf)
{
fhandler_base::fstat (buf);

View File

@ -1,7 +1,7 @@
/* fhandler_socket.cc. See fhandler.h for a description of the fhandler classes.
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
2009, 2010, 2011, 2012 Red Hat, Inc.
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -802,7 +802,7 @@ fhandler_socket::dup (fhandler_base *child, int flags)
return -1;
}
int __stdcall
int __reg2
fhandler_socket::fstat (struct __stat64 *buf)
{
int res;

View File

@ -1,8 +1,8 @@
/* fhandler_tape.cc. See fhandler.h for a description of the fhandler
classes.
Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
2008, 2010, 2011, 2012 Red Hat, Inc.
Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
2010, 2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -1417,7 +1417,7 @@ out:
return unlock (ret);
}
int
int __reg2
fhandler_dev_tape::fstat (struct __stat64 *buf)
{
int ret;

View File

@ -1,7 +1,7 @@
/* fhandler_tty.cc
Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -1071,7 +1071,7 @@ out:
return retval;
}
int __stdcall
int __reg2
fhandler_pty_slave::fstat (struct __stat64 *st)
{
fhandler_base::fstat (st);

View File

@ -1,5 +1,6 @@
#!/usr/bin/perl
# Copyright 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
# Copyright 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011, 2012, 2013
# Red Hat, Inc.
#
# This file is part of Cygwin.
#
@ -175,7 +176,7 @@ _sigdelayed:
movl \$$tls::start_offset,%eax # point to beginning
addl %ebx,%eax # of tls block
call __ZN7_cygtls19call_signal_handlerEv # call handler
call __ZN7_cygtls19call_signal_handlerEv\@4 # call handler
movl %fs:4,%ebx # reget tls
1: movl \$1,%eax # potential lock value
@ -208,8 +209,8 @@ leave: xorl %eax,%eax
popf
ret
.global __ZN7_cygtls3popEv
__ZN7_cygtls3popEv:
.global __ZN7_cygtls3popEv\@4
__ZN7_cygtls3popEv\@4:
1: pushl %ebx
movl %eax,%ebx # this
movl \$-4,%eax
@ -219,8 +220,8 @@ __ZN7_cygtls3popEv:
ret
# _cygtls::lock
.global __ZN7_cygtls4lockEv
__ZN7_cygtls4lockEv:
.global __ZN7_cygtls4lockEv\@4
__ZN7_cygtls4lockEv\@4:
pushl %ebx
movl %eax,%ebx
1: movl \$1,%eax
@ -233,8 +234,8 @@ __ZN7_cygtls4lockEv:
ret
# _cygtls::unlock
.global __ZN7_cygtls6unlockEv
__ZN7_cygtls6unlockEv:
.global __ZN7_cygtls6unlockEv\@4
__ZN7_cygtls6unlockEv\@4:
decl $tls::pstacklock(%eax)
ret
@ -243,7 +244,7 @@ __ZN7_cygtls6lockedEv:
movl $tls::pstacklock(%eax),%eax
ret
.extern __ZN7_cygtls19call_signal_handlerEv
.extern __ZN7_cygtls19call_signal_handlerEv\@4
stabilize_sig_stack:
movl %fs:4,%ebx
1: movl \$1,%eax
@ -259,7 +260,7 @@ stabilize_sig_stack:
decl $tls::stacklock(%ebx) # unlock
movl \$$tls::start_offset,%eax # point to beginning
addl %ebx,%eax # of tls block
call __ZN7_cygtls19call_signal_handlerEv
call __ZN7_cygtls19call_signal_handlerEv\@4
jmp 1b
3: decl $tls::incyg(%ebx)
ret

View File

@ -1,5 +1,5 @@
#!/usr/bin/perl -s
# Copyright 2003, 2004, 2005 Red Hat, Inc.
# Copyright 2003, 2004, 2005, 2006, 2008, 2012, 2013 Red Hat, Inc.
#
# This file is part of Cygwin.
#
@ -45,6 +45,9 @@ open(TMP, '>', "/tmp/$$.cc") or die "$0: couldn't open temporary index file \"/t
print TMP <<EOF;
#define __INSIDE_CYGWIN__
#define __attribute__(X)
#define __reg1
#define __reg2
#define __reg3
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>

View File

@ -1,7 +1,7 @@
/* malloc_wrapper.cc
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2013 Red Hat, Inc.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2007, 2008, 2009, 2013 Red Hat, Inc.
This file is part of Cygwin.

View File

@ -1,7 +1,7 @@
/* miscfuncs.cc: misc funcs that don't belong anywhere else
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -434,7 +434,7 @@ slashify (const char *src, char *dst, bool trailing_slash_p)
}
/* Return an address from the import jmp table of main program. */
void * __attribute__ ((regparm (1)))
void * __reg1
__import_address (void *imp)
{
const char *ptr = (const char *) imp;

View File

@ -11,11 +11,10 @@ details. */
#ifndef _MISCFUNCS_H
#define _MISCFUNCS_H
int winprio_to_nice (DWORD) __attribute__ ((regparm (1)));
DWORD nice_to_winprio (int &) __attribute__ ((regparm (1)));
int __reg1 winprio_to_nice (DWORD);
DWORD __reg1 nice_to_winprio (int &);
bool __stdcall create_pipe (PHANDLE, PHANDLE, LPSECURITY_ATTRIBUTES, DWORD)
__attribute__ ((regparm (3)));
bool __reg3 create_pipe (PHANDLE, PHANDLE, LPSECURITY_ATTRIBUTES, DWORD);
BOOL WINAPI CreatePipeOverlapped (PHANDLE read_handle, PHANDLE write_handle,
LPSECURITY_ATTRIBUTES sa);
@ -27,7 +26,7 @@ BOOL WINAPI WritePipeOverlapped (HANDLE h, LPCVOID buf, DWORD len,
extern "C" void yield ();
#define import_address(x) __import_address ((void *)(x))
void * __stdcall __attribute__ ((regparm (1))) __import_address (void *);
void * __reg1 __import_address (void *);
void backslashify (const char *, char *, bool);
void slashify (const char *, char *, bool);
@ -42,9 +41,9 @@ transform_chars (PUNICODE_STRING upath, USHORT start_idx)
}
/* Memory checking */
int __stdcall check_invalid_virtual_addr (const void *s, unsigned sz) __attribute__ ((regparm(2)));
int __reg2 check_invalid_virtual_addr (const void *s, unsigned sz);
ssize_t check_iovec (const struct iovec *, int, bool) __attribute__ ((regparm(3)));
ssize_t __reg3 check_iovec (const struct iovec *, int, bool);
#define check_iovec_for_read(a, b) check_iovec ((a), (b), false)
#define check_iovec_for_write(a, b) check_iovec ((a), (b), true)

View File

@ -1,7 +1,7 @@
/* mount.h: mount definitions.
Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -121,7 +121,7 @@ class fs_info
const char *fsname () const { return fsn[0] ? fsn : "unknown"; }
bool update (PUNICODE_STRING, HANDLE) __attribute__ ((regparm (3)));
bool __reg3 update (PUNICODE_STRING, HANDLE);
bool inited () const { return !!status.flags; }
};

View File

@ -1,7 +1,7 @@
/* path.cc: path support.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -341,8 +341,7 @@ path_conv::add_ext_from_sym (symlink_info &sym)
}
}
static void __stdcall mkrelpath (char *dst, bool caseinsensitive)
__attribute__ ((regparm (2)));
static void __reg2 mkrelpath (char *dst, bool caseinsensitive);
static void __stdcall
mkrelpath (char *path, bool caseinsensitive)

View File

@ -1,7 +1,7 @@
/* path.h: path data structures
Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -215,10 +215,10 @@ class path_conv
void set_has_symlinks () {path_flags |= PATH_HAS_SYMLINKS;}
void set_exec (int x = 1) {path_flags |= x ? PATH_EXEC : PATH_NOTEXEC;}
void check (const UNICODE_STRING *upath, unsigned opt = PC_SYM_FOLLOW,
const suffix_info *suffixes = NULL) __attribute__ ((regparm(3)));
void check (const char *src, unsigned opt = PC_SYM_FOLLOW,
const suffix_info *suffixes = NULL) __attribute__ ((regparm(3)));
void __reg3 check (const UNICODE_STRING *upath, unsigned opt = PC_SYM_FOLLOW,
const suffix_info *suffixes = NULL);
void __reg3 check (const char *src, unsigned opt = PC_SYM_FOLLOW,
const suffix_info *suffixes = NULL);
path_conv (const device& in_dev)
: fileattr (INVALID_FILE_ATTRIBUTES), wide_path (NULL), path (NULL),
@ -384,7 +384,7 @@ class path_conv
#if 0 /* obsolete, method still exists in fhandler_disk_file.cc */
unsigned __stdcall ndisk_links (DWORD);
#endif
void set_normalized_path (const char *) __attribute__ ((regparm (2)));
void __reg2 set_normalized_path (const char *);
DWORD get_symlink_length () { return symlink_length; };
private:
char *modifiable_path () {return (char *) path;}
@ -407,11 +407,10 @@ enum fe_types
FE_CWD = 4, /* Search CWD for program */
FE_DLL = 8 /* Search for DLLs, not executables. */
};
const char *__stdcall find_exec (const char *name, path_conv& buf,
const char *__reg3 find_exec (const char *name, path_conv& buf,
const char *winenv = "PATH=",
unsigned opt = FE_NADA,
const char **known_suffix = NULL)
__attribute__ ((regparm(3)));
const char **known_suffix = NULL);
/* Common macros for checking for invalid path names */
#define isdrive(s) (isalpha (*(s)) && (s)[1] == ':')
@ -426,17 +425,17 @@ has_exec_chars (const char *buf, int len)
(buf[0] == 'M' && buf[1] == 'Z'));
}
int pathmatch (const char *path1, const char *path2, bool caseinsensitive) __attribute__ ((regparm (3)));
int pathnmatch (const char *path1, const char *path2, int len, bool caseinsensitive) __attribute__ ((regparm (3)));
bool has_dot_last_component (const char *dir, bool test_dot_dot) __attribute__ ((regparm (2)));
int __reg3 pathmatch (const char *path1, const char *path2, bool caseinsensitive);
int __reg3 pathnmatch (const char *path1, const char *path2, int len, bool caseinsensitive);
bool __reg2 has_dot_last_component (const char *dir, bool test_dot_dot);
int path_prefix_p (const char *path1, const char *path2, int len1,
bool caseinsensitive) __attribute__ ((regparm (3)));
int __reg3 path_prefix_p (const char *path1, const char *path2, int len1,
bool caseinsensitive);
NTSTATUS file_get_fnoi (HANDLE, bool, struct _FILE_NETWORK_OPEN_INFORMATION *);
int normalize_win32_path (const char *, char *, char *&);
int normalize_posix_path (const char *, char *, char *&);
PUNICODE_STRING get_nt_native_path (const char *, UNICODE_STRING&, bool) __attribute__ ((regparm (3)));
PUNICODE_STRING __reg3 get_nt_native_path (const char *, UNICODE_STRING&, bool);
/* FIXME: Move to own include file eventually */

View File

@ -1,7 +1,7 @@
/* pinfo.h: process table info
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012 Red Hat, Inc.
2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -112,8 +112,8 @@ public:
char *cmdline (size_t &);
bool set_ctty (class fhandler_termios *, int);
bool alert_parent (char);
int __stdcall kill (siginfo_t&) __attribute__ ((regparm (2)));
bool __stdcall exists () __attribute__ ((regparm (1)));
int __reg2 kill (siginfo_t&);
bool __reg1 exists ();
const char *_ctty (char *);
/* signals */
@ -151,7 +151,7 @@ public:
bool waiter_ready;
class cygthread *wait_thread;
void init (pid_t, DWORD, HANDLE) __attribute__ ((regparm(3)));
void __reg3 init (pid_t, DWORD, HANDLE);
pinfo (_pinfo *x = NULL): pinfo_minimal (), destroy (false), procinfo (x),
waiter_ready (false), wait_thread (NULL) {}
pinfo (pid_t n, DWORD flag = 0): pinfo_minimal (), destroy (false),
@ -161,18 +161,18 @@ public:
init (n, flag, NULL);
}
pinfo (HANDLE, pinfo_minimal&, pid_t);
void thisproc (HANDLE) __attribute__ ((regparm (2)));
void __reg2 thisproc (HANDLE);
inline void _pinfo_release ();
void release ();
bool wait () __attribute__ ((regparm (1)));
bool __reg1 wait ();
~pinfo ()
{
if (destroy && procinfo)
release ();
}
void exit (DWORD n) __attribute__ ((noreturn, regparm(2)));
void maybe_set_exit_code_from_windows () __attribute__ ((regparm(1)));
void set_exit_code (DWORD n) __attribute__ ((regparm(2)));
void __reg2 exit (DWORD n) __attribute__ ((noreturn, ));
void __reg1 maybe_set_exit_code_from_windows ();
void __reg2 set_exit_code (DWORD n);
_pinfo *operator -> () const {return procinfo;}
int operator == (pinfo *x) const {return x->procinfo == procinfo;}
int operator == (pinfo &x) const {return x.procinfo == procinfo;}

View File

@ -399,7 +399,7 @@ fhandler_pipe::fstatvfs (struct statvfs *sfs)
return -1;
}
static int __attribute__ ((regparm (3)))
static int __reg3
pipe_worker (int filedes[2], unsigned int psize, int mode)
{
fhandler_pipe *fhs[2];

View File

@ -1,7 +1,7 @@
/* security.h: security declarations
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
2010, 2011, 2012 Red Hat, Inc.
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -369,38 +369,24 @@ legal_sid_type (SID_NAME_USE type)
class path_conv;
/* File manipulation */
int __stdcall get_file_attribute (HANDLE, path_conv &, mode_t *,
__uid32_t *, __gid32_t *)
__attribute__ ((regparm (3)));
int __stdcall set_file_attribute (HANDLE, path_conv &,
__uid32_t, __gid32_t, mode_t)
__attribute__ ((regparm (3)));
int __stdcall get_object_sd (HANDLE, security_descriptor &)
__attribute__ ((regparm (2)));
int __stdcall get_object_attribute (HANDLE, __uid32_t *, __gid32_t *, mode_t *)
__attribute__ ((regparm (3)));
int __stdcall set_object_attribute (HANDLE, __uid32_t, __gid32_t, mode_t)
__attribute__ ((regparm (3)));
int __stdcall create_object_sd_from_attribute (HANDLE, __uid32_t, __gid32_t,
mode_t, security_descriptor &)
__attribute__ ((regparm (3)));
int __stdcall set_object_sd (HANDLE, security_descriptor &, bool)
__attribute__ ((regparm (3)));
int __reg3 get_file_attribute (HANDLE, path_conv &, mode_t *,
__uid32_t *, __gid32_t *);
int __reg3 set_file_attribute (HANDLE, path_conv &,
__uid32_t, __gid32_t, mode_t);
int __reg2 get_object_sd (HANDLE, security_descriptor &);
int __reg3 get_object_attribute (HANDLE, __uid32_t *, __gid32_t *, mode_t *);
int __reg3 set_object_attribute (HANDLE, __uid32_t, __gid32_t, mode_t);
int __reg3 create_object_sd_from_attribute (HANDLE, __uid32_t, __gid32_t,
mode_t, security_descriptor &);
int __reg3 set_object_sd (HANDLE, security_descriptor &, bool);
int __stdcall get_reg_attribute (HKEY hkey, mode_t *, __uid32_t *, __gid32_t *)
__attribute__ ((regparm (3)));
LONG __stdcall get_file_sd (HANDLE fh, path_conv &, security_descriptor &, bool)
__attribute__ ((regparm (3)));
LONG __stdcall set_file_sd (HANDLE fh, path_conv &, security_descriptor &, bool)
__attribute__ ((regparm (3)));
bool __stdcall add_access_allowed_ace (PACL, int, DWORD, PSID, size_t &, DWORD)
__attribute__ ((regparm (3)));
bool __stdcall add_access_denied_ace (PACL, int, DWORD, PSID, size_t &, DWORD)
__attribute__ ((regparm (3)));
int __stdcall check_file_access (path_conv &, int, bool)
__attribute__ ((regparm (3)));
int __stdcall check_registry_access (HANDLE, int, bool)
__attribute__ ((regparm (3)));
int __reg3 get_reg_attribute (HKEY hkey, mode_t *, __uid32_t *, __gid32_t *);
LONG __reg3 get_file_sd (HANDLE fh, path_conv &, security_descriptor &, bool);
LONG __reg3 set_file_sd (HANDLE fh, path_conv &, security_descriptor &, bool);
bool __reg3 add_access_allowed_ace (PACL, int, DWORD, PSID, size_t &, DWORD);
bool __reg3 add_access_denied_ace (PACL, int, DWORD, PSID, size_t &, DWORD);
int __reg3 check_file_access (path_conv &, int, bool);
int __reg3 check_registry_access (HANDLE, int, bool);
void set_security_attribute (path_conv &pc, int attribute,
PSECURITY_ATTRIBUTES psa,
@ -472,9 +458,8 @@ void set_cygwin_privileges (HANDLE token);
/* 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 *__stdcall __sec_user (PVOID, PSID, PSID,
DWORD, BOOL)
__attribute__ ((regparm (3)));
extern SECURITY_ATTRIBUTES *__reg3 __sec_user (PVOID, PSID, PSID,
DWORD, BOOL);
extern PSECURITY_DESCRIPTOR _recycler_sd (void *buf, bool users, bool dir);
#define recycler_sd(users,dir) \
@ -490,12 +475,10 @@ extern PSECURITY_DESCRIPTOR _everyone_sd (void *buf, ACCESS_MASK access);
extern bool sec_acl (PACL acl, bool original, bool admins, PSID sid1 = NO_SID,
PSID sid2 = NO_SID, DWORD access2 = 0);
ssize_t __stdcall read_ea (HANDLE, path_conv &, const char *,
char *, size_t)
__attribute__ ((regparm (3)));
int __stdcall write_ea (HANDLE, path_conv &, const char *, const char *,
size_t, int)
__attribute__ ((regparm (3)));
ssize_t __reg3 read_ea (HANDLE, path_conv &, const char *,
char *, size_t);
int __reg3 write_ea (HANDLE, path_conv &, const char *, const char *,
size_t, int);
/* Note: sid1 is usually (read: currently always) the current user's
effective sid (cygheap->user.sid ()). */

View File

@ -1,7 +1,7 @@
/* shared_info.h: shared info for cygwin
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009,
2010, 2011, 2012 Red Hat, Inc.
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -74,7 +74,7 @@ enum shared_locations
};
void memory_init (bool) __attribute__ ((regparm(1)));
void __reg1 memory_init (bool);
void __stdcall shared_destroy ();
#define shared_align_past(p) \

View File

@ -1,7 +1,7 @@
/* signal.cc
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
Written by Steve Chamberlain of Cygnus Support, sac@cygnus.com
Significant changes by Sergey Okhapkin <sos@prospect.com.ru>
@ -26,8 +26,7 @@ details. */
#define _SA_NORESTART 0x8000
static int sigaction_worker (int, const struct sigaction *, struct sigaction *, bool)
__attribute__ ((regparm (3)));
static int __reg3 sigaction_worker (int, const struct sigaction *, struct sigaction *, bool);
#define sigtrapped(func) ((func) != SIG_IGN && (func) != SIG_DFL)
@ -387,7 +386,7 @@ abort (void)
do_exit (SIGABRT); /* signal handler didn't exit. Goodbye. */
}
static int __attribute__ ((regparm (3)))
static int __reg3
sigaction_worker (int sig, const struct sigaction *newact,
struct sigaction *oldact, bool isinternal)
{

View File

@ -61,7 +61,7 @@ Static HANDLE my_sendsig;
Static HANDLE my_readsig;
/* Function declarations */
static int __stdcall checkstate (waitq *) __attribute__ ((regparm (1)));
static int __reg1 checkstate (waitq *);
static __inline__ bool get_proc_lock (DWORD, DWORD);
static bool __stdcall remove_proc (int);
static bool __stdcall stopped_or_terminated (waitq *, _pinfo *);
@ -84,7 +84,7 @@ public:
sigpacket *next ();
sigpacket *save () const {return curr;}
void restore (sigpacket *saved) {curr = saved;}
friend void __stdcall sig_dispatch_pending (bool) __attribute__ ((regparm (1)));;
friend void __reg1 sig_dispatch_pending (bool);;
friend void WINAPI wait_sig (VOID *arg);
};
@ -156,7 +156,7 @@ proc_can_be_signalled (_pinfo *p)
return false;
}
bool __stdcall __attribute__ ((regparm(1)))
bool __reg1
pid_exists (pid_t pid)
{
return pinfo (pid)->exists ();
@ -174,7 +174,7 @@ mychild (int pid)
/* Handle all subprocess requests
*/
int __stdcall __attribute__ ((regparm (2)))
int __reg2
proc_subproc (DWORD what, DWORD val)
{
int rc = 1;
@ -390,7 +390,7 @@ proc_terminate ()
}
/* Clear pending signal */
void __stdcall __attribute__ ((regparm (1)))
void __reg1
sig_clear (int target_sig)
{
if (&_my_tls != _sig_tls)
@ -421,7 +421,7 @@ sigpending (sigset_t *mask)
}
/* Force the wait_sig thread to wake up and scan for pending signals */
void __stdcall __attribute__ ((regparm (1)))
void __reg1
sig_dispatch_pending (bool fast)
{
if (&_my_tls == _sig_tls)
@ -500,7 +500,7 @@ exit_thread (DWORD res)
ExitThread (0);
}
int __stdcall __attribute__ ((regparm (3)))
int __reg3
sig_send (_pinfo *p, int sig, _cygtls *tid)
{
if (sig == __SIGHOLD)
@ -531,7 +531,7 @@ sig_send (_pinfo *p, int sig, _cygtls *tid)
If pinfo *p == NULL, send to the current process.
If sending to this process, wait for notification that a signal has
completed before returning. */
int __stdcall __attribute__ ((regparm (3)))
int __reg3
sig_send (_pinfo *p, siginfo_t& si, _cygtls *tls)
{
int rc = 1;
@ -1081,7 +1081,7 @@ child_info_fork::abort (const char *fmt, ...)
/* Check the state of all of our children to see if any are stopped or
* terminated.
*/
static int __stdcall __attribute__ ((regparm (1)))
static int __reg1
checkstate (waitq *parent_w)
{
int potential_match = 0;

View File

@ -1,6 +1,6 @@
/* sigproc.h
Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010,
2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -55,37 +55,34 @@ struct sigpacket
HANDLE thread_handle;
struct sigpacket *next;
};
int __stdcall process () __attribute__ ((regparm (1)));
int setup_handler (void *, struct sigaction&, _cygtls *)
__attribute__ ((regparm (3)));
int __reg1 process ();
int __reg3 setup_handler (void *, struct sigaction&, _cygtls *);
};
void __stdcall sig_dispatch_pending (bool fast = false)
__attribute__ ((regparm (1)));
void set_signal_mask (sigset_t&, sigset_t) __attribute__ ((regparm (2)));
int __stdcall handle_sigprocmask (int sig, const sigset_t *set,
sigset_t *oldset, sigset_t& opmask)
__attribute__ ((regparm (3)));
void __reg1 sig_dispatch_pending (bool fast = false);
void __reg2 set_signal_mask (sigset_t&, sigset_t);
int __reg3 handle_sigprocmask (int sig, const sigset_t *set,
sigset_t *oldset, sigset_t& opmask);
void __stdcall sig_clear (int) __attribute__ ((regparm (1)));
void __stdcall sig_set_pending (int) __attribute__ ((regparm (1)));
void __reg1 sig_clear (int);
void __reg1 sig_set_pending (int);
int __stdcall handle_sigsuspend (sigset_t);
int __stdcall proc_subproc (DWORD, DWORD) __attribute__ ((regparm (2)));
int __reg2 proc_subproc (DWORD, DWORD);
class _pinfo;
void __stdcall proc_terminate ();
void __stdcall sigproc_init ();
bool __stdcall pid_exists (pid_t) __attribute__ ((regparm(1)));
int __stdcall sig_send (_pinfo *, siginfo_t&, class _cygtls * = NULL) __attribute__ ((regparm (3)));
int __stdcall sig_send (_pinfo *, int, class _cygtls * = NULL) __attribute__ ((regparm (3)));
bool __reg1 pid_exists (pid_t);
int __reg3 sig_send (_pinfo *, siginfo_t&, class _cygtls * = NULL);
int __reg3 sig_send (_pinfo *, int, class _cygtls * = NULL);
void __stdcall signal_fixup_after_exec ();
void __stdcall sigalloc ();
int kill_pgrp (pid_t, siginfo_t&);
int killsys (pid_t, int);
void exit_thread (DWORD) __attribute__ ((regparm (1), noreturn));
void setup_signal_exit (int) __attribute__ ((regparm (1)));
void __reg1 exit_thread (DWORD) __attribute__ ((noreturn));
void __reg1 setup_signal_exit (int);
extern "C" void sigdelayed ();

View File

@ -1,7 +1,7 @@
/* sync.h: Header file for cygwin synchronization primitives.
Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2011, 2012,
2013 Red Hat, Inc.
Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2010, 2011,
2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -27,17 +27,17 @@ public:
// class muto *next;
/* The real constructor. */
muto *init (const char *) __attribute__ ((regparm (2)));
muto __reg2 *init (const char *);
#if 0 /* FIXME: See comment in sync.cc */
~muto ()
#endif
int acquire (DWORD ms = INFINITE) __attribute__ ((regparm (2))); /* Acquire the lock. */
int release (_cygtls * = &_my_tls) __attribute__ ((regparm (2))); /* Release the lock. */
int __reg2 acquire (DWORD ms = INFINITE); /* Acquire the lock. */
int __reg2 release (_cygtls * = &_my_tls); /* Release the lock. */
bool acquired () __attribute__ ((regparm (1)));
bool __reg1 acquired ();
void upforgrabs () {tls = this;} // just set to an invalid address
void grab () __attribute__ ((regparm (1)));
void __reg1 grab ();
operator int () const {return !!name;}
};

View File

@ -1,6 +1,7 @@
/* tty.h: shared tty info for cygwin
Copyright 2000, 2001, 2002, 2003, 2004, 2006, 2009, 2010, 2011 Red Hat, Inc.
Copyright 2000, 2001, 2002, 2003, 2004, 2006, 2009, 2010, 2011, 2012, 2013
Red Hat, Inc.
This file is part of Cygwin.
@ -77,16 +78,15 @@ public:
void setsid (pid_t tsid) {sid = tsid;}
void kill_pgrp (int);
int is_orphaned_process_group (int);
const char *ttyname () __attribute ((regparm (1)));
const __reg1 char *ttyname () __attribute (());
};
class fhandler_pty_master;
class tty: public tty_min
{
HANDLE get_event (const char *fmt, PSECURITY_ATTRIBUTES sa,
HANDLE __reg3 get_event (const char *fmt, PSECURITY_ATTRIBUTES sa,
BOOL manual_reset = FALSE);
__attribute__ ((regparm (3)));
public:
pid_t master_pid; /* PID of tty master process */
@ -124,7 +124,7 @@ public:
int connect (int);
void init ();
tty_min *get_cttyp ();
int __stdcall attach (int n) __attribute__ ((regparm (2)));
int __reg2 attach (int n);
static void __stdcall init_session ();
friend class lock_ttys;
};

View File

@ -1,6 +1,6 @@
/* wchar.h: Extra wchar defs
Copyright 2007, 2009, 2010 Red Hat, Inc.
Copyright 2007, 2009, 2010, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -50,25 +50,19 @@ extern char *__locale_charset ();
#ifdef __INSIDE_CYGWIN__
#ifdef __cplusplus
size_t __stdcall sys_cp_wcstombs (wctomb_p, const char *, char *, size_t,
const wchar_t *, size_t = (size_t) -1)
__attribute__ ((regparm(3)));
size_t __stdcall sys_wcstombs (char *dst, size_t len, const wchar_t * src,
size_t nwc = (size_t) -1)
__attribute__ ((regparm(3)));
size_t __stdcall sys_wcstombs_alloc (char **, int, const wchar_t *,
size_t = (size_t) -1)
__attribute__ ((regparm(3)));
size_t __reg3 sys_cp_wcstombs (wctomb_p, const char *, char *, size_t,
const wchar_t *, size_t = (size_t) -1);
size_t __reg3 sys_wcstombs (char *dst, size_t len, const wchar_t * src,
size_t nwc = (size_t) -1);
size_t __reg3 sys_wcstombs_alloc (char **, int, const wchar_t *,
size_t = (size_t) -1);
size_t __stdcall sys_cp_mbstowcs (mbtowc_p, const char *, wchar_t *, size_t,
const char *, size_t = (size_t) -1)
__attribute__ ((regparm(3)));
size_t __stdcall sys_mbstowcs (wchar_t * dst, size_t dlen, const char *src,
size_t nms = (size_t) -1)
__attribute__ ((regparm(3)));
size_t __stdcall sys_mbstowcs_alloc (wchar_t **, int, const char *,
size_t = (size_t) -1)
__attribute__ ((regparm(3)));
size_t __reg3 sys_cp_mbstowcs (mbtowc_p, const char *, wchar_t *, size_t,
const char *, size_t = (size_t) -1);
size_t __reg3 sys_mbstowcs (wchar_t * dst, size_t dlen, const char *src,
size_t nms = (size_t) -1);
size_t __reg3 sys_mbstowcs_alloc (wchar_t **, int, const char *,
size_t = (size_t) -1);
#endif /* __cplusplus */
#endif /* __INSIDE_CYGWIN__ */

View File

@ -1,6 +1,6 @@
/* winf.h
Copyright 2006, 2007, 2011 Red Hat, Inc.
Copyright 2006, 2007, 2009, 2011, 2013 Red Hat, Inc.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
@ -78,11 +78,11 @@ class linebuf
size_t alloced;
linebuf () : ix (0), buf (NULL), alloced (0) {}
~linebuf () {if (buf) free (buf);}
void add (const char *, int) __attribute__ ((regparm (3)));
void __reg3 add (const char *, int);
void add (const char *what) {add (what, strlen (what));}
void prepend (const char *, int);
void finish (bool) __attribute__ ((regparm (2)));
bool fromargv(av&, const char *, bool) __attribute__ ((regparm (3)));;
void __reg2 finish (bool);
bool __reg3 fromargv(av&, const char *, bool);;
operator char *() {return buf;}
};

View File

@ -1,6 +1,6 @@
/* wininfo.h: main Cygwin header file.
Copyright 2004 Red Hat, Inc.
Copyright 2004, 2005, 2006, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -15,11 +15,10 @@ class wininfo
static muto _lock;
public:
operator HWND ();
int __stdcall process (HWND, UINT, WPARAM, LPARAM)
__attribute__ ((regparm (3)));
int __reg3 process (HWND, UINT, WPARAM, LPARAM);
void lock ();
void release ();
DWORD WINAPI winthread () __attribute__ ((regparm (1)));
DWORD __reg1 WINAPI winthread ();
};
extern wininfo winmsg;

View File

@ -1,6 +1,6 @@
/* winlean.h - Standard "lean" windows include
Copyright 2010, 2011, 2012 Red Hat, Inc.
Copyright 2010, 2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.

View File

@ -1,7 +1,7 @@
/* winsup.h: main Cygwin header file.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@ -79,6 +79,10 @@ int fcntl64 (int fd, int cmd, ...);
#include "wincap.h"
#define __reg1 __stdcall __attribute__ ((regparm (1)))
#define __reg2 __stdcall __attribute__ ((regparm (2)))
#define __reg3 __stdcall __attribute__ ((regparm (3)))
extern const char case_folded_lower[];
#define cyg_tolower(c) (case_folded_lower[(unsigned char)(c)])
extern const char case_folded_upper[];
@ -163,7 +167,7 @@ extern "C" void _pei386_runtime_relocator (per_process *);
/* dynamically loaded dll initialization for non-cygwin apps */
extern "C" int dll_noncygwin_dllcrt0 (HMODULE, per_process *);
void __stdcall do_exit (int) __attribute__ ((regparm (1), noreturn));
void __reg1 do_exit (int) __attribute__ ((noreturn));
/* libstdc++ malloc operator wrapper support. */
extern struct per_process_cxx_malloc default_cygwin_cxx_malloc;
@ -202,12 +206,12 @@ extern bool cygwin_finished_initializing;
void __stdcall set_std_handle (int);
int __stdcall stat_dev (DWORD, int, unsigned long, struct __stat64 *);
__ino64_t __stdcall hash_path_name (__ino64_t hash, PUNICODE_STRING name) __attribute__ ((regparm(2)));
__ino64_t __stdcall hash_path_name (__ino64_t hash, PCWSTR name) __attribute__ ((regparm(2)));
__ino64_t __stdcall hash_path_name (__ino64_t hash, const char *name) __attribute__ ((regparm(2)));
void __stdcall nofinalslash (const char *src, char *dst) __attribute__ ((regparm(2)));
__ino64_t __reg2 hash_path_name (__ino64_t hash, PUNICODE_STRING name);
__ino64_t __reg2 hash_path_name (__ino64_t hash, PCWSTR name);
__ino64_t __reg2 hash_path_name (__ino64_t hash, const char *name);
void __reg2 nofinalslash (const char *src, char *dst);
void *hook_or_detect_cygwin (const char *, const void *, WORD&, HANDLE h = NULL) __attribute__ ((regparm (3)));
void __reg3 *hook_or_detect_cygwin (const char *, const void *, WORD&, HANDLE h = NULL);
/* Time related */
void __stdcall totimeval (struct timeval *, FILETIME *, int, int);
@ -223,7 +227,7 @@ void init_console_handler (bool);
void init_global_security ();
void __set_winsock_errno (const char *fn, int ln) __attribute__ ((regparm(2)));
void __reg2 __set_winsock_errno (const char *fn, int ln);
#define set_winsock_errno() __set_winsock_errno (__FUNCTION__, __LINE__)
extern bool wsock_started;
@ -231,24 +235,23 @@ extern bool wsock_started;
/* Printf type functions */
extern "C" void vapi_fatal (const char *, va_list ap) __attribute__ ((noreturn));
extern "C" void api_fatal (const char *, ...) __attribute__ ((noreturn));
int __small_sprintf (char *dst, const char *fmt, ...) /*__attribute__ ((regparm (2)))*/;
int __small_vsprintf (char *dst, const char *fmt, va_list ap) /*__attribute__ ((regparm (3)))*/;
int __small_swprintf (PWCHAR dst, const WCHAR *fmt, ...) /*__attribute__ ((regparm (2)))*/;
int __small_vswprintf (PWCHAR dst, const WCHAR *fmt, va_list ap) /*__attribute__ ((regparm (3)))*/;
int __small_sprintf (char *dst, const char *fmt, ...);
int __small_vsprintf (char *dst, const char *fmt, va_list ap);
int __small_swprintf (PWCHAR dst, const WCHAR *fmt, ...);
int __small_vswprintf (PWCHAR dst, const WCHAR *fmt, va_list ap);
void multiple_cygwin_problem (const char *, unsigned, unsigned);
extern "C" void vklog (int priority, const char *message, va_list ap);
extern "C" void klog (int priority, const char *message, ...);
bool child_copy (HANDLE, bool, ...);
int symlink_worker (const char *, const char *, bool, bool)
__attribute__ ((regparm (3)));
int __reg3 symlink_worker (const char *, const char *, bool, bool);
class path_conv;
int __stdcall stat_worker (path_conv &pc, struct __stat64 *buf) __attribute__ ((regparm (2)));
int __reg2 stat_worker (path_conv &pc, struct __stat64 *buf);
__ino64_t __stdcall readdir_get_ino (const char *path, bool dot_dot) __attribute__ ((regparm (2)));
__ino64_t __reg2 readdir_get_ino (const char *path, bool dot_dot);
/* mmap functions. */
enum mmap_region_status
@ -294,6 +297,8 @@ extern "C" char _data_start__, _data_end__, _bss_start__, _bss_end__;
extern "C" void (*__CTOR_LIST__) (void);
extern "C" void (*__DTOR_LIST__) (void);
#ifndef NO_GLOBALS_H
#include "globals.h"