Throughout, (mainly in fhandler*) fix remaining gcc 4.7 mismatch

warnings between regparm definitions and declarations.
* smallprint.cc (__small_vswprintf): Conditionalize declaration and
setting of l_opt for only x86_64.
* spawn.cc (child_info_spawn::worker): Remove unused 'pid' variable.
* thread.cc (verifyable_object_isvalid): Temporarily define as
non-inline with gcc 4.7+, regardless of target.
This commit is contained in:
Yaakov Selkowitz 2013-05-01 01:20:37 +00:00
parent 92f63de367
commit 1f36328e7f
33 changed files with 85 additions and 74 deletions

View File

@ -1,3 +1,13 @@
2013-04-30 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Throughout, (mainly in fhandler*) fix remaining gcc 4.7 mismatch
warnings between regparm definitions and declarations.
* smallprint.cc (__small_vswprintf): Conditionalize declaration and
setting of l_opt for only x86_64.
* spawn.cc (child_info_spawn::worker): Remove unused 'pid' variable.
* thread.cc (verifyable_object_isvalid): Temporarily define as
non-inline with gcc 4.7+, regardless of target.
2013-04-30 Christopher Faylor <me.cygwin2013@cgf.cx> 2013-04-30 Christopher Faylor <me.cygwin2013@cgf.cx>
* gendef: Fix sigfe.s typo. * gendef: Fix sigfe.s typo.

View File

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

View File

@ -318,7 +318,7 @@ fhandler_console::mouse_aware (MOUSE_EVENT_RECORD& mouse_event)
|| dev_state.use_mouse >= 3)); || dev_state.use_mouse >= 3));
} }
void __stdcall void __reg3
fhandler_console::read (void *pv, size_t& buflen) fhandler_console::read (void *pv, size_t& buflen)
{ {
push_process_state process_state (PID_TTYIN); push_process_state process_state (PID_TTYIN);

View File

@ -81,7 +81,7 @@ fhandler_dev::fstat (struct stat *st)
return 0; return 0;
} }
int __stdcall int __reg2
fhandler_dev::fstatvfs (struct statvfs *sfs) fhandler_dev::fstatvfs (struct statvfs *sfs)
{ {
int ret = -1, opened = 0; int ret = -1, opened = 0;

View File

@ -319,7 +319,7 @@ path_conv::ndisk_links (DWORD nNumberOfLinks)
This returns the content of a struct fattr3 as defined in RFC 1813. This returns the content of a struct fattr3 as defined in RFC 1813.
The content is the NFS equivalent of struct stat. so there's not much The content is the NFS equivalent of struct stat. so there's not much
to do here except for copying. */ to do here except for copying. */
int __stdcall int __reg2
fhandler_base::fstat_by_nfs_ea (struct stat *buf) fhandler_base::fstat_by_nfs_ea (struct stat *buf)
{ {
fattr3 *nfs_attr = pc.nfsattr (); fattr3 *nfs_attr = pc.nfsattr ();
@ -362,7 +362,7 @@ fhandler_base::fstat_by_nfs_ea (struct stat *buf)
return 0; return 0;
} }
int __stdcall int __reg2
fhandler_base::fstat_by_handle (struct stat *buf) fhandler_base::fstat_by_handle (struct stat *buf)
{ {
/* Don't use FileAllInformation info class. It returns a pathname rather /* Don't use FileAllInformation info class. It returns a pathname rather
@ -420,7 +420,7 @@ fhandler_base::fstat_by_handle (struct stat *buf)
return fstat_helper (buf, fsi.NumberOfLinks); return fstat_helper (buf, fsi.NumberOfLinks);
} }
int __stdcall int __reg2
fhandler_base::fstat_by_name (struct stat *buf) fhandler_base::fstat_by_name (struct stat *buf)
{ {
NTSTATUS status; NTSTATUS status;
@ -464,7 +464,7 @@ fhandler_base::fstat_by_name (struct stat *buf)
return fstat_helper (buf, 1); return fstat_helper (buf, 1);
} }
int __stdcall int __reg2
fhandler_base::fstat_fs (struct stat *buf) fhandler_base::fstat_fs (struct stat *buf)
{ {
int res = -1; int res = -1;
@ -508,7 +508,7 @@ fhandler_base::fstat_fs (struct stat *buf)
return res; return res;
} }
int __stdcall int __reg3
fhandler_base::fstat_helper (struct stat *buf, fhandler_base::fstat_helper (struct stat *buf,
DWORD nNumberOfLinks) DWORD nNumberOfLinks)
{ {
@ -708,7 +708,7 @@ fhandler_disk_file::fstat (struct stat *buf)
return fstat_fs (buf); return fstat_fs (buf);
} }
int __stdcall int __reg2
fhandler_disk_file::fstatvfs (struct statvfs *sfs) fhandler_disk_file::fstatvfs (struct statvfs *sfs)
{ {
int ret = -1, opened = 0; int ret = -1, opened = 0;
@ -783,7 +783,7 @@ out:
return ret; return ret;
} }
int __stdcall int __reg1
fhandler_disk_file::fchmod (mode_t mode) fhandler_disk_file::fchmod (mode_t mode)
{ {
extern int chmod_device (path_conv& pc, mode_t mode); extern int chmod_device (path_conv& pc, mode_t mode);
@ -891,7 +891,7 @@ out:
return res; return res;
} }
int __stdcall int __reg2
fhandler_disk_file::fchown (uid_t uid, gid_t gid) fhandler_disk_file::fchown (uid_t uid, gid_t gid)
{ {
int oret = 0; int oret = 0;
@ -959,7 +959,7 @@ fhandler_disk_file::fchown (uid_t uid, gid_t gid)
return res; return res;
} }
int _stdcall int __reg3
fhandler_disk_file::facl (int cmd, int nentries, aclent_t *aclbufp) fhandler_disk_file::facl (int cmd, int nentries, aclent_t *aclbufp)
{ {
int res = -1; int res = -1;
@ -1535,7 +1535,7 @@ fhandler_disk_file::prw_open (bool write)
return 0; return 0;
} }
ssize_t __stdcall ssize_t __reg3
fhandler_disk_file::pread (void *buf, size_t count, off_t offset) fhandler_disk_file::pread (void *buf, size_t count, off_t offset)
{ {
ssize_t res; ssize_t res;
@ -1609,7 +1609,7 @@ non_atomic:
return res; return res;
} }
ssize_t __stdcall ssize_t __reg3
fhandler_disk_file::pwrite (void *buf, size_t count, off_t offset) fhandler_disk_file::pwrite (void *buf, size_t count, off_t offset)
{ {
if ((get_flags () & O_ACCMODE) == O_RDONLY) if ((get_flags () & O_ACCMODE) == O_RDONLY)
@ -1924,7 +1924,7 @@ free_dir:
return res; return res;
} }
ino_t __stdcall ino_t __reg2
readdir_get_ino (const char *path, bool dot_dot) readdir_get_ino (const char *path, bool dot_dot)
{ {
char *fname; char *fname;
@ -2393,7 +2393,7 @@ fhandler_cygdrive::fstat (struct stat *buf)
return 0; return 0;
} }
int __stdcall int __reg2
fhandler_cygdrive::fstatvfs (struct statvfs *sfs) fhandler_cygdrive::fstatvfs (struct statvfs *sfs)
{ {
/* Virtual file system. Just return an empty buffer with a few values /* Virtual file system. Just return an empty buffer with a few values

View File

@ -1095,7 +1095,7 @@ fhandler_dev_dsp::write (const void *ptr, size_t len)
return len - len_s + written; return len - len_s + written;
} }
void __stdcall void __reg3
fhandler_dev_dsp::read (void *ptr, size_t& len) fhandler_dev_dsp::read (void *ptr, size_t& len)
{ {
debug_printf ("ptr=%p len=%ld", ptr, len); debug_printf ("ptr=%p len=%ld", ptr, len);

View File

@ -274,7 +274,7 @@ fhandler_fifo::wait (HANDLE h)
} }
} }
void __stdcall void __reg3
fhandler_fifo::raw_read (void *in_ptr, size_t& len) fhandler_fifo::raw_read (void *in_ptr, size_t& len)
{ {
size_t orig_len = len; size_t orig_len = len;

View File

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

View File

@ -146,7 +146,7 @@ fhandler_mailslot::open (int flags, mode_t mode)
return res; return res;
} }
ssize_t __stdcall ssize_t __reg3
fhandler_mailslot::raw_write (const void *ptr, size_t len) fhandler_mailslot::raw_write (const void *ptr, size_t len)
{ {
/* Check for 425/426 byte weirdness */ /* Check for 425/426 byte weirdness */

View File

@ -160,7 +160,7 @@ fhandler_dev_mem::write (const void *ptr, size_t ulen)
return ulen; return ulen;
} }
void __stdcall void __reg3
fhandler_dev_mem::read (void *ptr, size_t& ulen) fhandler_dev_mem::read (void *ptr, size_t& ulen)
{ {
if (!ulen || pos >= (off_t) mem_size) if (!ulen || pos >= (off_t) mem_size)

View File

@ -391,7 +391,7 @@ fhandler_procsys::closedir (DIR *dir)
return fhandler_virtual::closedir (dir); return fhandler_virtual::closedir (dir);
} }
void __stdcall void __reg3
fhandler_procsys::read (void *ptr, size_t& len) fhandler_procsys::read (void *ptr, size_t& len)
{ {
NTSTATUS status; NTSTATUS status;

View File

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

View File

@ -41,7 +41,7 @@ fhandler_serial::overlapped_setup ()
overlapped_armed = 0; overlapped_armed = 0;
} }
void __stdcall void __reg3
fhandler_serial::raw_read (void *ptr, size_t& ulen) fhandler_serial::raw_read (void *ptr, size_t& ulen)
{ {
int tot; int tot;
@ -167,7 +167,7 @@ out:
/* Cover function to WriteFile to provide Posix interface and semantics /* Cover function to WriteFile to provide Posix interface and semantics
(as much as possible). */ (as much as possible). */
ssize_t __stdcall ssize_t __reg3
fhandler_serial::raw_write (const void *ptr, size_t len) fhandler_serial::raw_write (const void *ptr, size_t len)
{ {
DWORD bytes_written; DWORD bytes_written;

View File

@ -846,7 +846,7 @@ fhandler_socket::fstat (struct stat *buf)
return res; return res;
} }
int __stdcall int __reg2
fhandler_socket::fstatvfs (struct statvfs *sfs) fhandler_socket::fstatvfs (struct statvfs *sfs)
{ {
if (get_device () == FH_UNIX) if (get_device () == FH_UNIX)
@ -1527,7 +1527,7 @@ fhandler_socket::recv_internal (LPWSAMSG wsamsg, bool use_recvmsg)
return ret; return ret;
} }
void __stdcall void __reg3
fhandler_socket::read (void *in_ptr, size_t& len) fhandler_socket::read (void *in_ptr, size_t& len)
{ {
char *ptr = (char *) in_ptr; char *ptr = (char *) in_ptr;

View File

@ -1237,7 +1237,7 @@ fhandler_dev_tape::close ()
return ret ? -1 : cret; return ret ? -1 : cret;
} }
void __stdcall void __reg3
fhandler_dev_tape::raw_read (void *ptr, size_t &ulen) fhandler_dev_tape::raw_read (void *ptr, size_t &ulen)
{ {
char *buf = (char *) ptr; char *buf = (char *) ptr;
@ -1339,7 +1339,7 @@ fhandler_dev_tape::raw_read (void *ptr, size_t &ulen)
unlock (); unlock ();
} }
ssize_t __stdcall ssize_t __reg3
fhandler_dev_tape::raw_write (const void *ptr, size_t len) fhandler_dev_tape::raw_write (const void *ptr, size_t len)
{ {
if (!_lock (true)) if (!_lock (true))

View File

@ -684,7 +684,7 @@ fhandler_pty_slave::write (const void *ptr, size_t len)
return towrite; return towrite;
} }
void __stdcall void __reg3
fhandler_pty_slave::read (void *ptr, size_t& len) fhandler_pty_slave::read (void *ptr, size_t& len)
{ {
ssize_t totalread = 0; ssize_t totalread = 0;
@ -1150,7 +1150,7 @@ fhandler_pty_slave::fch_close_handles ()
close_maybe (inuse); close_maybe (inuse);
} }
int __stdcall int __reg1
fhandler_pty_slave::fchmod (mode_t mode) fhandler_pty_slave::fchmod (mode_t mode)
{ {
int ret = -1; int ret = -1;
@ -1176,7 +1176,7 @@ errout:
return ret; return ret;
} }
int __stdcall int __reg2
fhandler_pty_slave::fchown (uid_t uid, gid_t gid) fhandler_pty_slave::fchown (uid_t uid, gid_t gid)
{ {
int ret = -1; int ret = -1;
@ -1355,7 +1355,7 @@ fhandler_pty_master::write (const void *ptr, size_t len)
return i; return i;
} }
void __stdcall void __reg3
fhandler_pty_master::read (void *ptr, size_t& len) fhandler_pty_master::read (void *ptr, size_t& len)
{ {
bg_check_types bg = bg_check (SIGTTIN); bg_check_types bg = bg_check (SIGTTIN);

View File

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

View File

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

View File

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

View File

@ -177,7 +177,7 @@ cygwin_strupr (char *string)
return string; return string;
} }
int __stdcall int __reg2
check_invalid_virtual_addr (const void *s, unsigned sz) check_invalid_virtual_addr (const void *s, unsigned sz)
{ {
MEMORY_BASIC_INFORMATION mbuf; MEMORY_BASIC_INFORMATION mbuf;

View File

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

View File

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

View File

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

View File

@ -394,7 +394,7 @@ fhandler_pipe::ioctl (unsigned int cmd, void *p)
return 0; return 0;
} }
int __stdcall int __reg2
fhandler_pipe::fstatvfs (struct statvfs *sfs) fhandler_pipe::fstatvfs (struct statvfs *sfs)
{ {
set_errno (EBADF); set_errno (EBADF);

View File

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

View File

@ -187,7 +187,7 @@ sigprocmask (int how, const sigset_t *set, sigset_t *oldset)
return res; return res;
} }
int __stdcall int __reg3
handle_sigprocmask (int how, const sigset_t *set, sigset_t *oldset, sigset_t& opmask) handle_sigprocmask (int how, const sigset_t *set, sigset_t *oldset, sigset_t& opmask)
{ {
/* check that how is in right range */ /* check that how is in right range */
@ -227,7 +227,7 @@ handle_sigprocmask (int how, const sigset_t *set, sigset_t *oldset, sigset_t& op
return 0; return 0;
} }
int __stdcall int __reg2
_pinfo::kill (siginfo_t& si) _pinfo::kill (siginfo_t& si)
{ {
int res; int res;

View File

@ -484,7 +484,9 @@ __small_vswprintf (PWCHAR dst, const WCHAR *fmt, va_list ap)
while (*fmt) while (*fmt)
{ {
unsigned int n = 0x7fff; unsigned int n = 0x7fff;
#ifdef __x86_64__
bool l_opt = false; bool l_opt = false;
#endif
if (*fmt != L'%') if (*fmt != L'%')
*dst++ = *fmt++; *dst++ = *fmt++;
else else
@ -519,7 +521,9 @@ __small_vswprintf (PWCHAR dst, const WCHAR *fmt, va_list ap)
len = len * 10 + (c - L'0'); len = len * 10 + (c - L'0');
continue; continue;
case L'l': case L'l':
#ifdef __x86_64__
l_opt = true; l_opt = true;
#endif
continue; continue;
case L'c': case L'c':
case L'C': case L'C':

View File

@ -85,7 +85,7 @@ perhaps_suffix (const char *prog, path_conv& buf, int& err, unsigned opt)
of name is placed in buf and returned. Otherwise the contents of buf of name is placed in buf and returned. Otherwise the contents of buf
is undefined and NULL is returned. */ is undefined and NULL is returned. */
const char * __stdcall const char * __reg3
find_exec (const char *name, path_conv& buf, const char *mywinenv, find_exec (const char *name, path_conv& buf, const char *mywinenv,
unsigned opt, const char **known_suffix) unsigned opt, const char **known_suffix)
{ {
@ -764,7 +764,6 @@ loop:
/* Name the handle similarly to proc_subproc. */ /* Name the handle similarly to proc_subproc. */
ProtectHandle1 (pi.hProcess, childhProc); ProtectHandle1 (pi.hProcess, childhProc);
pid_t pid;
if (mode == _P_OVERLAY) if (mode == _P_OVERLAY)
{ {
myself->dwProcessId = pi.dwProcessId; myself->dwProcessId = pi.dwProcessId;
@ -772,7 +771,6 @@ loop:
myself.hProcess = hExeced = pi.hProcess; myself.hProcess = hExeced = pi.hProcess;
real_path.get_wide_win32_path (myself->progname); // FIXME: race? real_path.get_wide_win32_path (myself->progname); // FIXME: race?
sigproc_printf ("new process name %W", myself->progname); sigproc_printf ("new process name %W", myself->progname);
pid = myself->pid;
if (!iscygwin ()) if (!iscygwin ())
close_all_files (); close_all_files ();
} }
@ -812,7 +810,6 @@ loop:
res = -1; res = -1;
goto out; goto out;
} }
pid = child->pid;
} }
/* Start the child running */ /* Start the child running */

View File

@ -410,7 +410,7 @@ __big5_mbtowc (struct _reent *r, wchar_t *pwc, const char *s, size_t n,
to buffer size, it's a bug in Cygwin and the buffer in the calling to buffer size, it's a bug in Cygwin and the buffer in the calling
function should be raised. function should be raised.
*/ */
size_t __stdcall size_t __reg3
sys_cp_wcstombs (wctomb_p f_wctomb, const char *charset, char *dst, size_t len, sys_cp_wcstombs (wctomb_p f_wctomb, const char *charset, char *dst, size_t len,
const wchar_t *src, size_t nwc) const wchar_t *src, size_t nwc)
{ {
@ -496,7 +496,7 @@ sys_cp_wcstombs (wctomb_p f_wctomb, const char *charset, char *dst, size_t len,
return n; return n;
} }
size_t __stdcall size_t __reg3
sys_wcstombs (char *dst, size_t len, const wchar_t * src, size_t nwc) sys_wcstombs (char *dst, size_t len, const wchar_t * src, size_t nwc)
{ {
return sys_cp_wcstombs (cygheap->locale.wctomb, cygheap->locale.charset, return sys_cp_wcstombs (cygheap->locale.wctomb, cygheap->locale.charset,
@ -513,7 +513,7 @@ sys_wcstombs (char *dst, size_t len, const wchar_t * src, size_t nwc)
Note that this code is shared by cygserver (which requires it via Note that this code is shared by cygserver (which requires it via
__small_vsprintf) and so when built there plain calloc is the __small_vsprintf) and so when built there plain calloc is the
only choice. */ only choice. */
size_t __stdcall size_t __reg3
sys_wcstombs_alloc (char **dst_p, int type, const wchar_t *src, size_t nwc) sys_wcstombs_alloc (char **dst_p, int type, const wchar_t *src, size_t nwc)
{ {
size_t ret; size_t ret;
@ -539,7 +539,7 @@ sys_wcstombs_alloc (char **dst_p, int type, const wchar_t *src, size_t nwc)
conversion. This is so that fhandler_console can switch to an alternate conversion. This is so that fhandler_console can switch to an alternate
charset, which is the charset returned by GetConsoleCP (). Most of the charset, which is the charset returned by GetConsoleCP (). Most of the
time this is used for box and line drawing characters. */ time this is used for box and line drawing characters. */
size_t __stdcall size_t __reg3
sys_cp_mbstowcs (mbtowc_p f_mbtowc, const char *charset, wchar_t *dst, sys_cp_mbstowcs (mbtowc_p f_mbtowc, const char *charset, wchar_t *dst,
size_t dlen, const char *src, size_t nms) size_t dlen, const char *src, size_t nms)
{ {
@ -648,7 +648,7 @@ sys_cp_mbstowcs (mbtowc_p f_mbtowc, const char *charset, wchar_t *dst,
return count; return count;
} }
size_t __stdcall size_t __reg3
sys_mbstowcs (wchar_t * dst, size_t dlen, const char *src, size_t nms) sys_mbstowcs (wchar_t * dst, size_t dlen, const char *src, size_t nms)
{ {
return sys_cp_mbstowcs (cygheap->locale.mbtowc, cygheap->locale.charset, return sys_cp_mbstowcs (cygheap->locale.mbtowc, cygheap->locale.charset,
@ -656,7 +656,7 @@ sys_mbstowcs (wchar_t * dst, size_t dlen, const char *src, size_t nms)
} }
/* Same as sys_wcstombs_alloc, just backwards. */ /* Same as sys_wcstombs_alloc, just backwards. */
size_t __stdcall size_t __reg3
sys_mbstowcs_alloc (wchar_t **dst_p, int type, const char *src, size_t nms) sys_mbstowcs_alloc (wchar_t **dst_p, int type, const char *src, size_t nms)
{ {
size_t ret; size_t ret;

View File

@ -1847,7 +1847,7 @@ sync ()
} }
/* Cygwin internal */ /* Cygwin internal */
int __stdcall int __reg2
stat_worker (path_conv &pc, struct stat *buf) stat_worker (path_conv &pc, struct stat *buf)
{ {
int res = -1; int res = -1;

View File

@ -38,8 +38,8 @@ extern "C" void __fp_lock_all ();
extern "C" void __fp_unlock_all (); extern "C" void __fp_unlock_all ();
extern "C" int valid_sched_parameters(const struct sched_param *); extern "C" int valid_sched_parameters(const struct sched_param *);
extern "C" int sched_set_thread_priority(HANDLE thread, int priority); extern "C" int sched_set_thread_priority(HANDLE thread, int priority);
#ifdef __x86_64__ #if __GNUC__ == 4 && __GNUC_MINOR__ >= 7
/* FIXME: Temporarily workaround gcc 4.8 bug. */ /* FIXME: Temporarily workaround gcc 4.7+ bug. */
static verifyable_object_state static verifyable_object_state
#else #else
static inline verifyable_object_state static inline verifyable_object_state
@ -122,8 +122,8 @@ __cygwin_lock_unlock (_LOCK_T *lock)
paranoid_printf ("threadcount %d. unlocked", MT_INTERFACE->threadcount); paranoid_printf ("threadcount %d. unlocked", MT_INTERFACE->threadcount);
} }
#ifdef __x86_64__ #if __GNUC__ == 4 && __GNUC_MINOR__ >= 7
/* FIXME: Temporarily workaround gcc 4.8 bug. */ /* FIXME: Temporarily workaround gcc 4.7+ bug. */
static verifyable_object_state static verifyable_object_state
#else #else
static inline verifyable_object_state static inline verifyable_object_state

View File

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

View File

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