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

@ -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;