From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2210) id 18E523834E5A; Mon, 6 Jun 2022 16:06:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 18E523834E5A Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Ken Brown To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: remove most occurrences of __stdcall and __cdecl X-Act-Checkin: newlib-cygwin X-Git-Author: Ken Brown X-Git-Refname: refs/heads/master X-Git-Oldrev: cb4b4548c828d3975266571190d67650d374339d X-Git-Newrev: 30c5411d0717483a9ad892f6f0a2f92a1ffd7c84 Message-Id: <20220606160601.18E523834E5A@sourceware.org> Date: Mon, 6 Jun 2022 16:06:01 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jun 2022 16:06:01 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D30c5411d071= 7483a9ad892f6f0a2f92a1ffd7c84 commit 30c5411d0717483a9ad892f6f0a2f92a1ffd7c84 Author: Ken Brown Date: Mon Jun 6 12:00:45 2022 -0400 Cygwin: remove most occurrences of __stdcall and __cdecl =20 These have no effect on x86_64. Retain a few occurrences of __cdecl in files imported from other sources. =20 Also retain all occurrences of WINAPI, even though the latter is simply a macro that expands to __stdcall. Most of these occurrences are associated with Windows API functions, and removing them might make the code confusing instead of simpler. Diff: --- winsup/cygwin/cygerrno.h | 2 +- winsup/cygwin/cygheap.cc | 8 ++--- winsup/cygwin/cygheap.h | 4 +-- winsup/cygwin/dcrt0.cc | 12 ++++---- winsup/cygwin/debug.cc | 10 +++--- winsup/cygwin/dll_init.cc | 2 +- winsup/cygwin/dtable.cc | 2 +- winsup/cygwin/environ.cc | 6 ++-- winsup/cygwin/exceptions.cc | 6 ++-- winsup/cygwin/fhandler.cc | 10 +++--- winsup/cygwin/fhandler.h | 52 ++++++++++++++++------------= ---- winsup/cygwin/fhandler_clipboard.cc | 2 +- winsup/cygwin/fhandler_console.cc | 4 +-- winsup/cygwin/fhandler_disk_file.cc | 2 +- winsup/cygwin/fhandler_dsp.cc | 4 +-- winsup/cygwin/fhandler_procsys.cc | 2 +- winsup/cygwin/fhandler_random.cc | 2 +- winsup/cygwin/fhandler_signalfd.cc | 2 +- winsup/cygwin/fhandler_socket_unix.cc | 6 ++-- winsup/cygwin/fhandler_timerfd.cc | 2 +- winsup/cygwin/fhandler_tty.cc | 4 +-- winsup/cygwin/fhandler_virtual.cc | 2 +- winsup/cygwin/fhandler_windows.cc | 2 +- winsup/cygwin/fhandler_zero.cc | 2 +- winsup/cygwin/fork.cc | 10 +++--- winsup/cygwin/include/cygwin/time.h | 6 ++-- winsup/cygwin/include/sys/ioctl.h | 2 +- winsup/cygwin/lib/_cygwin_crt0_common.cc | 2 +- winsup/cygwin/lib/crt0.h | 2 +- winsup/cygwin/mmap.cc | 2 +- winsup/cygwin/mount.cc | 4 +-- winsup/cygwin/ntea.cc | 4 +-- winsup/cygwin/pinfo.cc | 2 +- winsup/cygwin/pinfo.h | 10 +++--- winsup/cygwin/resource.cc | 4 +-- winsup/cygwin/shared.cc | 10 +++--- winsup/cygwin/shared_info.h | 10 +++--- winsup/cygwin/shm.cc | 2 +- winsup/cygwin/sigproc.h | 2 +- winsup/cygwin/strace.cc | 2 +- winsup/cygwin/strfuncs.cc | 10 +++--- winsup/cygwin/string.h | 8 ++--- winsup/cygwin/times.cc | 16 +++++----- winsup/cygwin/tty.cc | 4 +-- winsup/cygwin/tty.h | 6 ++-- winsup/cygwin/winsup.h | 20 ++++++------ winsup/utils/kill.cc | 2 +- winsup/utils/mingw/strace.cc | 2 +- winsup/utils/ps.cc | 2 +- 49 files changed, 147 insertions(+), 147 deletions(-) diff --git a/winsup/cygwin/cygerrno.h b/winsup/cygwin/cygerrno.h index b982bc27d..940bfa5e0 100644 --- a/winsup/cygwin/cygerrno.h +++ b/winsup/cygwin/cygerrno.h @@ -45,7 +45,7 @@ void __set_winsock_errno (const char *fn, int ln); #define set_winsock_errno() __set_winsock_errno (__FUNCTION__, __LINE__) =20 #define get_errno() (errno) -extern "C" void __stdcall set_sig_errno (int e); +extern "C" void set_sig_errno (int e); =20 class save_errno { diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index e05bfbc48..65f95c924 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -69,11 +69,11 @@ static NO_COPY uint32_t nthreads; =20 extern "C" { static void _cfree (void *); -static void *__stdcall _csbrk (int); +static void *_csbrk (int); } =20 /* Called by fork or spawn to reallocate cygwin heap */ -void __stdcall +void cygheap_fixup_in_child (bool execed) { cygheap_max =3D cygheap =3D (init_cygheap *) _cygheap_start; @@ -239,7 +239,7 @@ init_cygheap::init_installation_root () } } =20 -void __stdcall +void cygheap_init () { cygheap_protect.init ("cygheap_protect"); @@ -293,7 +293,7 @@ setup_cygheap () #define somekinda_printf malloc_printf #endif =20 -static void *__stdcall +static void * _csbrk (int sbs) { void *prebrk =3D cygheap_max; diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h index 528c61ed6..7f36c5837 100644 --- a/winsup/cygwin/cygheap.h +++ b/winsup/cygwin/cygheap.h @@ -719,7 +719,7 @@ class cygheap_fdenum : public cygheap_fdmanip } }; =20 -void __stdcall cygheap_fixup_in_child (bool); -void __stdcall cygheap_init (); +void cygheap_fixup_in_child (bool); +void cygheap_init (); void setup_cygheap (); extern char _cygheap_start[] __attribute__((section(".idata"))); diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 9cc436cda..c460e15a0 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -61,7 +61,7 @@ do_global_dtors () } } =20 -static void __stdcall +static void do_global_ctors (void (**in_pfunc)(), int force) { if (!force && in_forkee) @@ -84,7 +84,7 @@ do_global_ctors (void (**in_pfunc)(), int force) * A \@file is replaced with @file so that echo \@foo would print * @foo and not the contents of foo. */ -static bool __stdcall +static bool insert_file (char *name, char *&cmd) { HANDLE f; @@ -203,7 +203,7 @@ quoted (char *cmd, int winshell) && isalpha ((s)[2]) \ && strchr ((s) + 3, '\\'))) =20 -static int __stdcall +static int globify (char *word, char **&argv, int &argc, int &argvlen) { if (*word !=3D '~' && strpbrk (word, "?*[\"\'(){}") =3D=3D NULL) @@ -290,7 +290,7 @@ globify (char *word, char **&argv, int &argc, int &argv= len) =20 /* Build argv, argc from string passed from Windows. */ =20 -static void __stdcall +static void build_argv (char *cmd, char **&argv, int &argc, int winshell) { int argvlen =3D 0; @@ -365,7 +365,7 @@ build_argv (char *cmd, char **&argv, int &argc, int win= shell) } =20 /* sanity and sync check */ -void __stdcall +void check_sanity_and_sync (per_process *p) { /* Sanity check to make sure developers didn't change the per_process = */ @@ -1013,7 +1013,7 @@ __cygwin_exit_return: \n\ "); } =20 -extern "C" void __stdcall +extern "C" void _dll_crt0 () { /* Starting with Windows 10 rel 1511, the main stack of an application is diff --git a/winsup/cygwin/debug.cc b/winsup/cygwin/debug.cc index f21a8c518..efa101ba7 100644 --- a/winsup/cygwin/debug.cc +++ b/winsup/cygwin/debug.cc @@ -38,7 +38,7 @@ class lock_debug =20 muto NO_COPY lock_debug::locker; =20 -static bool __stdcall mark_closed (const char *, int, HANDLE, const char *= , bool); +static bool mark_closed (const char *, int, HANDLE, const char *, bool); =20 void debug_init () @@ -47,7 +47,7 @@ debug_init () } =20 /* Find a registered handle in the linked list of handles. */ -static handle_list * __stdcall +static handle_list * find_handle (HANDLE h) { handle_list *hl; @@ -87,7 +87,7 @@ setclexec (HANDLE oh, HANDLE nh, bool not_inheriting) } =20 /* Create a new handle record */ -static handle_list * __stdcall +static handle_list * newh () { handle_list *hl; @@ -155,7 +155,7 @@ add_handle (const char *func, int ln, HANDLE h, const c= har *name, bool inh) debug_printf ("protecting handle '%s'(%p), inherited flag %d", hl->name,= hl->h, hl->inherited); } =20 -static void __stdcall +static void delete_handle (handle_list *hl) { handle_list *hnuke =3D hl->next; @@ -176,7 +176,7 @@ debug_fixup_after_fork_exec () delete_handle (hl); // removes hl->next } =20 -static bool __stdcall +static bool mark_closed (const char *func, int ln, HANDLE h, const char *name, bool fo= rce) { handle_list *hl; diff --git a/winsup/cygwin/dll_init.cc b/winsup/cygwin/dll_init.cc index 649af1153..b486eaa1f 100644 --- a/winsup/cygwin/dll_init.cc +++ b/winsup/cygwin/dll_init.cc @@ -25,7 +25,7 @@ details. */ #include #include =20 -extern void __stdcall check_sanity_and_sync (per_process *); +extern void check_sanity_and_sync (per_process *); =20 #define fabort fork_info->abort =20 diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index 474c470a6..6b2394814 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -58,7 +58,7 @@ dtable_init () cygheap->fdtab.extend (NOFILE_INCR, 0); } =20 -void __stdcall +void set_std_handle (int fd) { fhandler_base *fh =3D cygheap->fdtab[fd]; diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index ab593ab64..ca60bd8d4 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -169,7 +169,7 @@ strbrk(char *&buf) =20 /* Parse a string of the form "something=3Dstuff somethingelse=3Dmore-stuf= f", silently ignoring unknown "somethings". */ -static void __stdcall +static void parse_options (const char *inbuf) { int istrue; @@ -562,7 +562,7 @@ secure_getenv (const char *name) } =20 /* Return number of environment entries, including terminating NULL. */ -static int __stdcall +static int envsize (const char * const *in_envp) { const char * const *envp; @@ -578,7 +578,7 @@ envsize (const char * const *in_envp) /* Takes similar arguments to setenv except that overwrite is either -1, 0, or 1. 0 or 1 signify that the function should perform similarly to setenv. Otherwise putenv is assumed. */ -static int __stdcall +static int _addenv (const char *name, const char *value, int overwrite) { int issetenv =3D overwrite >=3D 0; diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index b8d46504d..dd4f0f075 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -756,7 +756,7 @@ exception::handle (EXCEPTION_RECORD *e, exception_list = *frame, CONTEXT *in, attempts to block unblockable signals will be silently ignored. This is counter to what appears to be documented in some UNIX man pages, e.g. Linux. */ -int __stdcall +int handle_sigsuspend (sigset_t tempmask) { sigset_t oldmask =3D _my_tls.sigmask; // Remember for restoration @@ -868,7 +868,7 @@ _cygtls::interrupt_setup (siginfo_t& si, void *handler,= struct sigaction& siga) signal_arrived, si.si_signo); } =20 -extern "C" void __stdcall +extern "C" void set_sig_errno (int e) { *_my_tls.errno_addr =3D e; @@ -1093,7 +1093,7 @@ ctrl_c_handler (DWORD type) } =20 /* Function used by low level sig wrappers. */ -extern "C" void __stdcall +extern "C" void set_process_mask (sigset_t newmask) { set_signal_mask (_my_tls.sigmask, newmask); diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 88507357b..5671fea3c 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -142,7 +142,7 @@ char *fhandler_base::get_proc_fd_name (char *buf) =20 /* Detect if we are sitting at EOF for conditions where Windows returns an error but UNIX doesn't. */ -int __stdcall +int is_at_eof (HANDLE h) { IO_STATUS_BLOCK io; @@ -871,7 +871,7 @@ out: debug_printf ("returning %d, %s mode", len, rbinary () ? "binary" : "tex= t"); } =20 -ssize_t __stdcall +ssize_t fhandler_base::write (const void *ptr, size_t len) { ssize_t res; @@ -967,7 +967,7 @@ fhandler_base::write (const void *ptr, size_t len) return res; } =20 -ssize_t __stdcall +ssize_t fhandler_base::readv (const struct iovec *const iov, const int iovcnt, ssize_t tot) { @@ -1024,7 +1024,7 @@ fhandler_base::readv (const struct iovec *const iov, = const int iovcnt, return len; } =20 -ssize_t __stdcall +ssize_t fhandler_base::writev (const struct iovec *const iov, const int iovcnt, ssize_t tot) { @@ -1501,7 +1501,7 @@ fhandler_dev_null::fhandler_dev_null () : { } =20 -ssize_t __stdcall +ssize_t fhandler_dev_null::write (const void *ptr, size_t len) { /* Shortcut. This also fixes a problem with the NUL device on 64 bit: diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index a2a4ec150..dfad07f72 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -404,9 +404,9 @@ public: virtual int fcntl (int cmd, intptr_t); virtual char const *ttyname () { return get_name (); } virtual void 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 =3D -1); - virtual ssize_t __stdcall writev (const struct iovec *, int iovcnt, ssiz= e_t tot =3D -1); + virtual ssize_t write (const void *ptr, size_t len); + virtual ssize_t readv (const struct iovec *, int iovcnt, ssize_t tot =3D= -1); + virtual ssize_t writev (const struct iovec *, int iovcnt, ssize_t tot = =3D -1); virtual ssize_t pread (void *, size_t, off_t, void *aio =3D NULL); virtual ssize_t pwrite (void *, size_t, off_t, void *aio =3D NULL); virtual off_t lseek (off_t offset, int whence); @@ -593,14 +593,14 @@ class fhandler_socket: public fhandler_base struct sockaddr *from, int *fromlen) =3D 0; virtual ssize_t recvmsg (struct msghdr *msg, int flags) =3D 0; virtual void read (void *ptr, size_t& len) =3D 0; - virtual ssize_t __stdcall readv (const struct iovec *, int iovcnt, + virtual ssize_t readv (const struct iovec *, int iovcnt, ssize_t tot =3D -1) =3D 0; =20 virtual ssize_t sendto (const void *ptr, size_t len, int flags, const struct sockaddr *to, int tolen) =3D 0; virtual ssize_t sendmsg (const struct msghdr *msg, int flags) =3D 0; - virtual ssize_t __stdcall write (const void *ptr, size_t len) =3D 0; - virtual ssize_t __stdcall writev (const struct iovec *, int iovcnt, ssiz= e_t tot =3D -1) =3D 0; + virtual ssize_t write (const void *ptr, size_t len) =3D 0; + virtual ssize_t writev (const struct iovec *, int iovcnt, ssize_t tot = =3D -1) =3D 0; virtual int setsockopt (int level, int optname, const void *optval, __socklen_t optlen) =3D 0; virtual int getsockopt (int level, int optname, const void *optval, @@ -712,9 +712,9 @@ class fhandler_socket_wsock: public fhandler_socket struct sockaddr *from, int *fromlen); ssize_t recvmsg (struct msghdr *msg, int flags); void read (void *ptr, size_t& len); - ssize_t __stdcall readv (const struct iovec *, int iovcnt, ssize_t tot = =3D -1); - ssize_t __stdcall write (const void *ptr, size_t len); - ssize_t __stdcall writev (const struct iovec *, int iovcnt, ssize_t tot = =3D -1); + ssize_t readv (const struct iovec *, int iovcnt, ssize_t tot =3D -1); + ssize_t write (const void *ptr, size_t len); + ssize_t writev (const struct iovec *, int iovcnt, ssize_t tot =3D -1); int shutdown (int how); int close (); =20 @@ -1121,14 +1121,14 @@ class fhandler_socket_unix : public fhandler_socket ssize_t recvfrom (void *ptr, size_t len, int flags, struct sockaddr *from, int *fromlen); void read (void *ptr, size_t& len); - ssize_t __stdcall readv (const struct iovec *const iov, int iovcnt, + ssize_t readv (const struct iovec *const iov, int iovcnt, ssize_t tot =3D -1); =20 ssize_t sendmsg (const struct msghdr *msg, int flags); ssize_t sendto (const void *ptr, size_t len, int flags, const struct sockaddr *to, int tolen); - ssize_t __stdcall write (const void *ptr, size_t len); - ssize_t __stdcall writev (const struct iovec *const iov, int iovcnt, + ssize_t write (const void *ptr, size_t len); + ssize_t writev (const struct iovec *const iov, int iovcnt, ssize_t tot =3D -1); int setsockopt (int level, int optname, const void *optval, __socklen_t optlen); @@ -2202,7 +2202,7 @@ private: int dup (fhandler_base *, int); =20 void read (void *ptr, size_t& len); - ssize_t __stdcall write (const void *ptr, size_t len); + ssize_t write (const void *ptr, size_t len); void doecho (const void *str, DWORD len); int close (); static bool exists () @@ -2386,7 +2386,7 @@ class fhandler_pty_slave: public fhandler_pty_common =20 int open (int flags, mode_t mode =3D 0); bool open_setup (int flags); - ssize_t __stdcall write (const void *ptr, size_t len); + ssize_t write (const void *ptr, size_t len); void read (void *ptr, size_t& len); int init (HANDLE, DWORD, mode_t); =20 @@ -2501,7 +2501,7 @@ public: int accept_input (); int open (int flags, mode_t mode =3D 0); bool open_setup (int flags); - ssize_t __stdcall write (const void *ptr, size_t len); + ssize_t write (const void *ptr, size_t len); void read (void *ptr, size_t& len); int close (); void cleanup (); @@ -2571,14 +2571,14 @@ class fhandler_dev_null: public fhandler_base return fh; } =20 - ssize_t __stdcall write (const void *ptr, size_t len); + ssize_t write (const void *ptr, size_t len); }; =20 class fhandler_dev_zero: public fhandler_base { public: fhandler_dev_zero (); - ssize_t __stdcall write (const void *ptr, size_t len); + ssize_t write (const void *ptr, size_t len); void read (void *ptr, size_t& len); off_t lseek (off_t, int) { return 0; } =20 @@ -2617,7 +2617,7 @@ class fhandler_dev_random: public fhandler_base int pseudo_read (void *ptr, size_t len); =20 public: - ssize_t __stdcall write (const void *ptr, size_t len); + ssize_t write (const void *ptr, size_t len); void read (void *ptr, size_t& len); off_t lseek (off_t, int) { return 0; } =20 @@ -2652,7 +2652,7 @@ class fhandler_dev_clipboard: public fhandler_base fhandler_dev_clipboard (); int is_windows () { return 1; } int fstat (struct stat *buf); - ssize_t __stdcall write (const void *ptr, size_t len); + ssize_t write (const void *ptr, size_t len); void read (void *ptr, size_t& len); off_t lseek (off_t offset, int whence); int close (); @@ -2688,7 +2688,7 @@ class fhandler_windows: public fhandler_base int is_windows () { return 1; } HWND get_hwnd () { return hWnd_; } int open (int flags, mode_t mode =3D 0); - ssize_t __stdcall write (const void *ptr, size_t len); + ssize_t write (const void *ptr, size_t len); void read (void *ptr, size_t& len); int ioctl (unsigned int cmd, void *); off_t lseek (off_t, int) { return 0; } @@ -2734,7 +2734,7 @@ class fhandler_dev_dsp: public fhandler_base fhandler_dev_dsp *base () const {return (fhandler_dev_dsp *)archetype;} =20 int open (int, mode_t mode =3D 0); - ssize_t __stdcall write (const void *, size_t); + ssize_t write (const void *, size_t); void read (void *, size_t&); int ioctl (unsigned int, void *); int close (); @@ -2742,7 +2742,7 @@ class fhandler_dev_dsp: public fhandler_base void fixup_after_exec (); =20 private: - ssize_t __stdcall _write (const void *, size_t); + ssize_t _write (const void *, size_t); void _read (void *, size_t&); int _ioctl (unsigned int, void *); void _fixup_after_fork (HANDLE); @@ -2789,7 +2789,7 @@ class fhandler_virtual : public fhandler_base void seekdir (DIR *, long); void rewinddir (DIR *); int closedir (DIR *); - ssize_t __stdcall write (const void *ptr, size_t len); + ssize_t write (const void *ptr, size_t len); void read (void *ptr, size_t& len); off_t lseek (off_t, int); int dup (fhandler_base *child, int); @@ -2867,7 +2867,7 @@ class fhandler_procsys: public fhandler_virtual int open (int flags, mode_t mode =3D 0); int close (); void read (void *ptr, size_t& len); - ssize_t __stdcall write (const void *ptr, size_t len); + ssize_t write (const void *ptr, size_t len); int fstat (struct stat *buf); bool fill_filebuf (); =20 @@ -3122,7 +3122,7 @@ class fhandler_signalfd : public fhandler_base int signalfd (const sigset_t *mask, int flags); int fstat (struct stat *buf); void read (void *ptr, size_t& len); - ssize_t __stdcall write (const void *, size_t); + ssize_t write (const void *, size_t); =20 int poll (); inline sigset_t get_sigset () const { return sigset; } @@ -3167,7 +3167,7 @@ class fhandler_timerfd : public fhandler_base =20 int fstat (struct stat *buf); void read (void *ptr, size_t& len); - ssize_t __stdcall write (const void *, size_t); + ssize_t write (const void *, size_t); int dup (fhandler_base *child, int); int ioctl (unsigned int, void *); int close (); diff --git a/winsup/cygwin/fhandler_clipboard.cc b/winsup/cygwin/fhandler_c= lipboard.cc index ae6de4551..4886968b2 100644 --- a/winsup/cygwin/fhandler_clipboard.cc +++ b/winsup/cygwin/fhandler_clipboard.cc @@ -121,7 +121,7 @@ fhandler_dev_clipboard::set_clipboard (const void *buf,= size_t len) } =20 /* FIXME: arbitrary seeking is not handled */ -ssize_t __stdcall +ssize_t fhandler_dev_clipboard::write (const void *buf, size_t len) { /* write to our membuffer */ diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_con= sole.cc index 45b786dd5..52239c2f9 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -3311,7 +3311,7 @@ do_print: return found + trunc_buf.len; } =20 -ssize_t __stdcall +ssize_t fhandler_console::write (const void *vsrc, size_t len) { bg_check_types bg =3D bg_check (SIGTTOU); @@ -3778,7 +3778,7 @@ fhandler_console::set_close_on_exec (bool val) close_on_exec (val); } =20 -void __stdcall +void set_console_title (char *title) { wchar_t buf[TITLESIZE + 1]; diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_d= isk_file.cc index f7728e36e..22d8aba83 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -1578,7 +1578,7 @@ fhandler_disk_file::pread (void *buf, size_t count, o= ff_t offset, void *aio) Windows mandatory locking semantics disallow to use another HANDLE. */ if (rbinary () && !mandatory_locking ()) { - extern int __stdcall is_at_eof (HANDLE h); + extern int is_at_eof (HANDLE h); NTSTATUS status; IO_STATUS_BLOCK io; LARGE_INTEGER off =3D { QuadPart:offset }; diff --git a/winsup/cygwin/fhandler_dsp.cc b/winsup/cygwin/fhandler_dsp.cc index 4d4824b56..c37bedea5 100644 --- a/winsup/cygwin/fhandler_dsp.cc +++ b/winsup/cygwin/fhandler_dsp.cc @@ -1020,7 +1020,7 @@ fhandler_dev_dsp::fhandler_dev_dsp (): dev ().parse (FH_OSS_DSP); } =20 -ssize_t __stdcall +ssize_t fhandler_dev_dsp::write (const void *ptr, size_t len) { return base ()->_write (ptr, len); @@ -1093,7 +1093,7 @@ fhandler_dev_dsp::open (int flags, mode_t) #define IS_WRITE() ((get_flags() & O_ACCMODE) !=3D O_RDONLY) #define IS_READ() ((get_flags() & O_ACCMODE) !=3D O_WRONLY) =20 -ssize_t __stdcall +ssize_t fhandler_dev_dsp::_write (const void *ptr, size_t len) { debug_printf ("ptr=3D%p len=3D%ld", ptr, len); diff --git a/winsup/cygwin/fhandler_procsys.cc b/winsup/cygwin/fhandler_pro= csys.cc index a5fd85f43..cd1d35984 100644 --- a/winsup/cygwin/fhandler_procsys.cc +++ b/winsup/cygwin/fhandler_procsys.cc @@ -432,7 +432,7 @@ fhandler_procsys::read (void *ptr, size_t& len) fhandler_base::raw_read (ptr, len); } =20 -ssize_t __stdcall +ssize_t fhandler_procsys::write (const void *ptr, size_t len) { return fhandler_base::raw_write (ptr, len); diff --git a/winsup/cygwin/fhandler_random.cc b/winsup/cygwin/fhandler_rand= om.cc index c0f37b55e..495e3a94b 100644 --- a/winsup/cygwin/fhandler_random.cc +++ b/winsup/cygwin/fhandler_random.cc @@ -36,7 +36,7 @@ fhandler_dev_random::pseudo_write (const void *ptr, size_= t len) return len; } =20 -ssize_t __stdcall +ssize_t fhandler_dev_random::write (const void *ptr, size_t len) { if (!len) diff --git a/winsup/cygwin/fhandler_signalfd.cc b/winsup/cygwin/fhandler_si= gnalfd.cc index 97305515f..bdd8bc93e 100644 --- a/winsup/cygwin/fhandler_signalfd.cc +++ b/winsup/cygwin/fhandler_signalfd.cc @@ -140,7 +140,7 @@ fhandler_signalfd::read (void *ptr, size_t& len) return; } =20 -ssize_t __stdcall +ssize_t fhandler_signalfd::write (const void *, size_t) { set_errno (EINVAL); diff --git a/winsup/cygwin/fhandler_socket_unix.cc b/winsup/cygwin/fhandler= _socket_unix.cc index 55e0432b6..b63f50c64 100644 --- a/winsup/cygwin/fhandler_socket_unix.cc +++ b/winsup/cygwin/fhandler_socket_unix.cc @@ -1911,7 +1911,7 @@ fhandler_socket_unix::read (void *ptr, size_t& len) len =3D recvmsg (&msg, 0); } =20 -ssize_t __stdcall +ssize_t fhandler_socket_unix::readv (const struct iovec *const iov, int iovcnt, ssize_t tot) { @@ -1953,7 +1953,7 @@ fhandler_socket_unix::sendto (const void *in_ptr, siz= e_t len, int flags, return sendmsg (&msg, flags); } =20 -ssize_t __stdcall +ssize_t fhandler_socket_unix::write (const void *ptr, size_t len) { struct iovec iov; @@ -1971,7 +1971,7 @@ fhandler_socket_unix::write (const void *ptr, size_t = len) return sendmsg (&msg, 0); } =20 -ssize_t __stdcall +ssize_t fhandler_socket_unix::writev (const struct iovec *const iov, int iovcnt, ssize_t tot) { diff --git a/winsup/cygwin/fhandler_timerfd.cc b/winsup/cygwin/fhandler_tim= erfd.cc index 6bc4e0d68..9269494db 100644 --- a/winsup/cygwin/fhandler_timerfd.cc +++ b/winsup/cygwin/fhandler_timerfd.cc @@ -143,7 +143,7 @@ fhandler_timerfd::read (void *ptr, size_t& len) return; } =20 -ssize_t __stdcall +ssize_t fhandler_timerfd::write (const void *, size_t) { set_errno (EINVAL); diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index e3f774a6b..a7e25ba83 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1241,7 +1241,7 @@ fhandler_pty_slave::reset_switch_to_nat_pipe (void) ReleaseMutex (pipe_sw_mutex); } =20 -ssize_t __stdcall +ssize_t fhandler_pty_slave::write (const void *ptr, size_t len) { ssize_t towrite =3D len; @@ -2171,7 +2171,7 @@ fhandler_pty_master::close () return 0; } =20 -ssize_t __stdcall +ssize_t fhandler_pty_master::write (const void *ptr, size_t len) { ssize_t ret; diff --git a/winsup/cygwin/fhandler_virtual.cc b/winsup/cygwin/fhandler_vir= tual.cc index bdd454d1c..21ff4f35e 100644 --- a/winsup/cygwin/fhandler_virtual.cc +++ b/winsup/cygwin/fhandler_virtual.cc @@ -202,7 +202,7 @@ fhandler_virtual::read (void *ptr, size_t& len) position +=3D len; } =20 -ssize_t __stdcall +ssize_t fhandler_virtual::write (const void *ptr, size_t len) { set_errno (EACCES); diff --git a/winsup/cygwin/fhandler_windows.cc b/winsup/cygwin/fhandler_win= dows.cc index 947cfd5a0..90ab48daa 100644 --- a/winsup/cygwin/fhandler_windows.cc +++ b/winsup/cygwin/fhandler_windows.cc @@ -54,7 +54,7 @@ fhandler_windows::open (int flags, mode_t mode) return fhandler_base::open ((flags & ~O_TEXT) | O_BINARY, mode); } =20 -ssize_t __stdcall +ssize_t fhandler_windows::write (const void *buf, size_t) { MSG *ptr =3D (MSG *) buf; diff --git a/winsup/cygwin/fhandler_zero.cc b/winsup/cygwin/fhandler_zero.cc index 563768574..9d8fe004d 100644 --- a/winsup/cygwin/fhandler_zero.cc +++ b/winsup/cygwin/fhandler_zero.cc @@ -19,7 +19,7 @@ fhandler_dev_zero::fhandler_dev_zero () { } =20 -ssize_t __stdcall +ssize_t fhandler_dev_zero::write (const void *, size_t len) { if (get_device () =3D=3D FH_FULL) diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index 65f3e051b..012819b61 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -44,8 +44,8 @@ class frok int child_pid; int this_errno; HANDLE hchild; - int __stdcall parent (volatile char * volatile here); - int __stdcall child (volatile char * volatile here); + int parent (volatile char * volatile here); + int child (volatile char * volatile here); bool error (const char *fmt, ...); friend int dofork (void **proc, bool *with_forkables); }; @@ -59,7 +59,7 @@ resume_child (HANDLE forker_finished) } =20 /* Notify parent that it is time for the next step. */ -static void __stdcall +static void sync_with_parent (const char *s, bool hang_self) { debug_printf ("signalling parent: %s", s); @@ -131,7 +131,7 @@ child_info::prefork (bool detached) } } =20 -int __stdcall +int frok::child (volatile char * volatile here) { HANDLE& hParent =3D ch.parent; @@ -202,7 +202,7 @@ frok::child (volatile char * volatile here) return 0; } =20 -int __stdcall +int frok::parent (volatile char * volatile stack_here) { HANDLE forker_finished; diff --git a/winsup/cygwin/include/cygwin/time.h b/winsup/cygwin/include/cy= gwin/time.h index a1080a1c0..d7f9d3f75 100644 --- a/winsup/cygwin/include/cygwin/time.h +++ b/winsup/cygwin/include/cygwin/time.h @@ -14,11 +14,11 @@ extern "C" #endif =20 /* Not defined in main time.h */ -int __cdecl clock_setres (clockid_t, struct timespec *); +int clock_setres (clockid_t, struct timespec *); =20 /* GNU extensions. */ -time_t __cdecl timelocal (struct tm *); -time_t __cdecl timegm (struct tm *); +time_t timelocal (struct tm *); +time_t timegm (struct tm *); =20 #define TIMER_RELTIME 0 /* For compatibility with HP/UX, Solaris, others?= */ =20 diff --git a/winsup/cygwin/include/sys/ioctl.h b/winsup/cygwin/include/sys/= ioctl.h index 4c7121471..6289e7da7 100644 --- a/winsup/cygwin/include/sys/ioctl.h +++ b/winsup/cygwin/include/sys/ioctl.h @@ -61,7 +61,7 @@ __BEGIN_DECLS # define _IOWR _LINUX_IOWR #endif /*__USE_LINUX_IOCTL_DEFS */ =20 -int __cdecl ioctl (int __fd, int __cmd, ...); +int ioctl (int __fd, int __cmd, ...); =20 __END_DECLS #endif diff --git a/winsup/cygwin/lib/_cygwin_crt0_common.cc b/winsup/cygwin/lib/_= cygwin_crt0_common.cc index 365015011..d356a50fb 100644 --- a/winsup/cygwin/lib/_cygwin_crt0_common.cc +++ b/winsup/cygwin/lib/_cygwin_crt0_common.cc @@ -72,7 +72,7 @@ struct per_process_cxx_malloc __cygwin_cxx_malloc =3D /* Set up pointers to various pieces so the dll can then use them, and then jump to the dll. */ =20 -int __stdcall +int _cygwin_crt0_common (MainFunc f, per_process *u) { per_process *newu =3D (per_process *) cygwin_internal (CW_USER_DATA); diff --git a/winsup/cygwin/lib/crt0.h b/winsup/cygwin/lib/crt0.h index c551de78f..e599b4493 100644 --- a/winsup/cygwin/lib/crt0.h +++ b/winsup/cygwin/lib/crt0.h @@ -13,7 +13,7 @@ extern "C" { #include "winlean.h" struct per_process; typedef int (*MainFunc) (int argc, char *argv[], char **env); -int __stdcall _cygwin_crt0_common (MainFunc, struct per_process *); +int _cygwin_crt0_common (MainFunc, struct per_process *); PVOID dll_dllcrt0 (HMODULE, struct per_process *); =20 #ifdef __cplusplus diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index 948eeec1f..0c70d66f0 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -1774,7 +1774,7 @@ fhandler_disk_file::fixup_mmap_after_fork (HANDLE h, = int prot, int flags, none of the mapped areas are in our address space. We need to iterate through the map, doing the MapViewOfFile calls. */ =20 -int __stdcall +int fixup_mmaps_after_fork (HANDLE parent) { /* Iterate over maps */ diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc index 5eb028980..389f62fad 100644 --- a/winsup/cygwin/mount.cc +++ b/winsup/cygwin/mount.cc @@ -47,7 +47,7 @@ int NO_COPY mount_info::root_idx =3D -1; This function is only used to test for valid input strings. The later normalization drops the native prefixes. */ =20 -static inline bool __stdcall +static inline bool is_native_path (const char *path) { return isdirsep (path[0]) @@ -57,7 +57,7 @@ is_native_path (const char *path) && isalpha (path[4]); } =20 -static inline bool __stdcall +static inline bool is_unc_share (const char *path) { const char *p; diff --git a/winsup/cygwin/ntea.cc b/winsup/cygwin/ntea.cc index 5094cf324..a400fcb2b 100644 --- a/winsup/cygwin/ntea.cc +++ b/winsup/cygwin/ntea.cc @@ -364,7 +364,7 @@ write_ea (HANDLE hdl, path_conv &pc, const char *name, = const char *value, return ret; } =20 -static ssize_t __stdcall +static ssize_t getxattr_worker (path_conv &pc, const char *name, void *value, size_t size) { int res =3D -1; @@ -468,7 +468,7 @@ flistxattr (int fd, char *list, size_t size) return res; } =20 -static int __stdcall +static int setxattr_worker (path_conv &pc, const char *name, const void *value, size_t size, int flags) { diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index a54dac89b..832a3e6bc 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -82,7 +82,7 @@ pinfo::thisproc (HANDLE h) =20 /* Initialize the process table entry for the current task. This is not called for forked tasks, only execed ones. */ -void __stdcall +void pinfo_init (char **envp, int envc) { if (envp) diff --git a/winsup/cygwin/pinfo.h b/winsup/cygwin/pinfo.h index 86ba64bb6..7e4170341 100644 --- a/winsup/cygwin/pinfo.h +++ b/winsup/cygwin/pinfo.h @@ -254,7 +254,7 @@ public: pid_t create_cygwin_pid (); pid_t cygwin_pid (DWORD); =20 -void __stdcall pinfo_init (char **, int); +void pinfo_init (char **, int); extern pinfo myself; =20 /* Helper class to allow convenient setting and unsetting a process_state @@ -291,9 +291,9 @@ public: #define myctty() myself->__ctty () =20 /* For mmaps across fork(). */ -int __stdcall fixup_mmaps_after_fork (HANDLE parent); +int fixup_mmaps_after_fork (HANDLE parent); /* for shm areas across fork (). */ -int __stdcall fixup_shms_after_fork (); +int fixup_shms_after_fork (); =20 -void __stdcall fill_rusage (struct rusage *, HANDLE); -void __stdcall add_rusage (struct rusage *, struct rusage *); +void fill_rusage (struct rusage *, HANDLE); +void add_rusage (struct rusage *, struct rusage *); diff --git a/winsup/cygwin/resource.cc b/winsup/cygwin/resource.cc index 21e85bd18..aafc2b0b1 100644 --- a/winsup/cygwin/resource.cc +++ b/winsup/cygwin/resource.cc @@ -37,7 +37,7 @@ add_timeval (struct timeval *tv1, struct timeval *tv2) } =20 /* add rusage values of r2 to r1 */ -void __stdcall +void add_rusage (struct rusage *r1, struct rusage *r2) { add_timeval (&r1->ru_utime, &r2->ru_utime); @@ -59,7 +59,7 @@ add_rusage (struct rusage *r1, struct rusage *r2) } =20 /* FIXME: what about other fields? */ -void __stdcall +void fill_rusage (struct rusage *r, HANDLE h) { KERNEL_USER_TIMES kut; diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc index c939e0d0f..c549f5e26 100644 --- a/winsup/cygwin/shared.cc +++ b/winsup/cygwin/shared.cc @@ -95,14 +95,14 @@ get_session_parent_dir () return session_parent_dir; } =20 -char * __stdcall +char * shared_name (char *ret_buf, const char *str, int num) { __small_sprintf (ret_buf, "%s.%d", str, num); return ret_buf; } =20 -WCHAR * __stdcall +WCHAR * shared_name (WCHAR *ret_buf, const WCHAR *str, int num) { __small_swprintf (ret_buf, L"%W.%d", str, num); @@ -135,14 +135,14 @@ static ptrdiff_t offsets[] =3D =20 #define off_addr(x) ((void *)((caddr_t) cygwin_hmodule + offsets[x])) =20 -void * __stdcall +void * open_shared (const WCHAR *name, int n, HANDLE& shared_h, DWORD size, shared_locations m, PSECURITY_ATTRIBUTES psa, DWORD access) { return open_shared (name, n, shared_h, size, &m, psa, access); } =20 -void * __stdcall +void * open_shared (const WCHAR *name, int n, HANDLE& shared_h, DWORD size, shared_locations *m, PSECURITY_ATTRIBUTES psa, DWORD access) { @@ -276,7 +276,7 @@ user_info::create (bool reinit) user_shared->initialize (); } =20 -void __stdcall +void shared_destroy () { ForceCloseHandle (cygwin_shared_h); diff --git a/winsup/cygwin/shared_info.h b/winsup/cygwin/shared_info.h index 83a1fd187..6c53ec0b8 100644 --- a/winsup/cygwin/shared_info.h +++ b/winsup/cygwin/shared_info.h @@ -77,7 +77,7 @@ enum shared_locations }; =20 void memory_init (); -void __stdcall shared_destroy (); +void shared_destroy (); =20 #define shared_align_past(p) \ ((char *) (system_info.dwAllocationGranularity * \ @@ -86,12 +86,12 @@ void __stdcall shared_destroy (); =20 HANDLE get_shared_parent_dir (); HANDLE get_session_parent_dir (); -char *__stdcall shared_name (char *, const char *, int); -WCHAR *__stdcall shared_name (WCHAR *, const WCHAR *, int); -void *__stdcall open_shared (const WCHAR *, int, HANDLE&, DWORD, +char *shared_name (char *, const char *, int); +WCHAR *shared_name (WCHAR *, const WCHAR *, int); +void *open_shared (const WCHAR *, int, HANDLE&, DWORD, shared_locations, PSECURITY_ATTRIBUTES =3D &sec_all, DWORD =3D FILE_MAP_READ | FILE_MAP_WRITE); -void *__stdcall open_shared (const WCHAR *, int, HANDLE&, DWORD, +void *open_shared (const WCHAR *, int, HANDLE&, DWORD, shared_locations *, PSECURITY_ATTRIBUTES =3D &sec_all, DWORD =3D FILE_MAP_READ | FILE_MAP_WRITE); extern void user_shared_create (bool reinit); diff --git a/winsup/cygwin/shm.cc b/winsup/cygwin/shm.cc index af079ad86..88d3c0a48 100644 --- a/winsup/cygwin/shm.cc +++ b/winsup/cygwin/shm.cc @@ -117,7 +117,7 @@ static NO_COPY muto shm_guard; #define SLIST_LOCK() (shm_guard.init ("shm_guard")->acquire ()) #define SLIST_UNLOCK() (shm_guard.release ()) =20 -int __stdcall +int fixup_shms_after_fork () { if (!SLIST_FIRST (&sph_list)) diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h index f2d7e3168..7aca80595 100644 --- a/winsup/cygwin/sigproc.h +++ b/winsup/cygwin/sigproc.h @@ -64,7 +64,7 @@ int handle_sigprocmask (int sig, const sigset_t *set, =20 void sig_clear (int); void sig_set_pending (int); -int __stdcall handle_sigsuspend (sigset_t); +int handle_sigsuspend (sigset_t); =20 int proc_subproc (DWORD, uintptr_t); =20 diff --git a/winsup/cygwin/strace.cc b/winsup/cygwin/strace.cc index 35f8a59ae..a1a55d1ec 100644 --- a/winsup/cygwin/strace.cc +++ b/winsup/cygwin/strace.cc @@ -90,7 +90,7 @@ strace::microseconds () return (int) (clk->strace_usecs () - process_start); } =20 -static int __stdcall +static int getfunc (char *in_dst, const char *func) { const char *p; diff --git a/winsup/cygwin/strfuncs.cc b/winsup/cygwin/strfuncs.cc index f68fcb76f..9a97b3a24 100644 --- a/winsup/cygwin/strfuncs.cc +++ b/winsup/cygwin/strfuncs.cc @@ -671,7 +671,7 @@ sys_mbstowcs_alloc (wchar_t **dst_p, int type, const ch= ar *src, size_t nms) /* Copy string, until c or is encountered. NUL-terminate the destination string (s1). Return pointer to terminating byte in dst string. */ -char * __stdcall +char * strccpy (char *__restrict s1, const char **__restrict s2, char c) { while (**s2 && **s2 !=3D c) @@ -738,7 +738,7 @@ const char isalpha_array[] =3D { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0= , 0 }; =20 -extern "C" int __stdcall +extern "C" int cygwin_wcscasecmp (const wchar_t *ws, const wchar_t *wt) { UNICODE_STRING us, ut; @@ -748,7 +748,7 @@ cygwin_wcscasecmp (const wchar_t *ws, const wchar_t *wt) return RtlCompareUnicodeString (&us, &ut, TRUE); } =20 -extern "C" int __stdcall +extern "C" int cygwin_wcsncasecmp (const wchar_t *ws, const wchar_t *wt, size_t n) { UNICODE_STRING us, ut; @@ -763,7 +763,7 @@ cygwin_wcsncasecmp (const wchar_t *ws, const wchar_t *= wt, size_t n) return RtlCompareUnicodeString (&us, &ut, TRUE); } =20 -extern "C" int __stdcall +extern "C" int cygwin_strcasecmp (const char *cs, const char *ct) { UNICODE_STRING us, ut; @@ -782,7 +782,7 @@ cygwin_strcasecmp (const char *cs, const char *ct) return RtlCompareUnicodeString (&us, &ut, TRUE); } =20 -extern "C" int __stdcall +extern "C" int cygwin_strncasecmp (const char *cs, const char *ct, size_t n) { UNICODE_STRING us, ut; diff --git a/winsup/cygwin/string.h b/winsup/cygwin/string.h index 384314442..ec9a030a0 100644 --- a/winsup/cygwin/string.h +++ b/winsup/cygwin/string.h @@ -17,7 +17,7 @@ extern "C" { =20 #undef strchrnul #define strchrnul cygwin_strchrnul -static inline __stdcall char * +static inline char * strchrnul (const char *s, int c) { while (*s !=3D (char) c && *s !=3D 0) @@ -68,11 +68,11 @@ ascii_strncasematch (const char *cs, const char *ct, si= ze_t n) =20 #undef strcasecmp #define strcasecmp cygwin_strcasecmp -int __stdcall cygwin_strcasecmp (const char *, const char *); +int cygwin_strcasecmp (const char *, const char *); =20 #undef strncasecmp #define strncasecmp cygwin_strncasecmp -int __stdcall cygwin_strncasecmp (const char *, const char *, size_t); +int cygwin_strncasecmp (const char *, const char *, size_t); =20 #define strcasematch(s1,s2) (!cygwin_strcasecmp ((s1),(s2))) #define strncasematch(s1,s2,n) (!cygwin_strncasecmp ((s1),(s2),(n))) @@ -82,7 +82,7 @@ char *strupr (char *); =20 #endif /* __INSIDE_CYGWIN__ */ =20 -char *__stdcall strccpy (char *__restrict s1, const char **__restrict s2, +char *strccpy (char *__restrict s1, const char **__restrict s2, char c); =20 #ifdef __cplusplus diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc index 60b29b323..4ab432925 100644 --- a/winsup/cygwin/times.cc +++ b/winsup/cygwin/times.cc @@ -35,7 +35,7 @@ get_system_time (PLARGE_INTEGER systime) } =20 /* Cygwin internal */ -static uint64_t __stdcall +static uint64_t __to_clock_t (PLARGE_INTEGER src, int flag) { uint64_t total =3D src->QuadPart; @@ -154,7 +154,7 @@ timezone (void) } =20 /* Cygwin internal */ -void __stdcall +void totimeval (struct timeval *dst, PLARGE_INTEGER src, int sub, int flag) { int64_t x =3D __to_clock_t (src, flag); @@ -194,7 +194,7 @@ gettimeofday (struct timeval *__restrict tv, void *__re= strict tzvp) EXPORT_ALIAS (gettimeofday, _gettimeofday) =20 /* Cygwin internal */ -void __stdcall +void timespec_to_filetime (const struct timespec *time_in, PLARGE_INTEGER out) { if (time_in->tv_nsec =3D=3D UTIME_OMIT) @@ -205,7 +205,7 @@ timespec_to_filetime (const struct timespec *time_in, P= LARGE_INTEGER out) } =20 /* Cygwin internal */ -void __stdcall +void timeval_to_filetime (const struct timeval *time_in, PLARGE_INTEGER out) { out->QuadPart =3D time_in->tv_sec * NS100PERSEC @@ -230,7 +230,7 @@ timeval_to_ms (const struct timeval *time_in, DWORD &ms) } =20 /* Cygwin internal */ -static timeval __stdcall +static timeval time_t_to_timeval (time_t in) { timeval res; @@ -265,7 +265,7 @@ timeval_to_timespec (const struct timeval *tvp, struct = timespec *tmp) =20 /* Cygwin internal */ /* Convert a Win32 time to "UNIX" format. */ -time_t __stdcall +time_t to_time_t (PLARGE_INTEGER ptr) { /* A file time is the number of 100ns since jan 1 1601 @@ -285,7 +285,7 @@ to_time_t (PLARGE_INTEGER ptr) =20 /* Cygwin internal */ /* Convert a Win32 time to "UNIX" timestruc_t format. */ -void __stdcall +void to_timestruc_t (PLARGE_INTEGER ptr, timestruc_t *out) { /* A file time is the number of 100ns since jan 1 1601 @@ -309,7 +309,7 @@ to_timestruc_t (PLARGE_INTEGER ptr, timestruc_t *out) =20 /* Cygwin internal */ /* Get the current time as a "UNIX" timestruc_t format. */ -void __stdcall +void time_as_timestruc_t (timestruc_t * out) { LARGE_INTEGER systime; diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc index 2959fe2ab..a862a444e 100644 --- a/winsup/cygwin/tty.cc +++ b/winsup/cygwin/tty.cc @@ -63,7 +63,7 @@ ttyslot (void) return device::minor (myself->ctty); } =20 -void __stdcall +void tty_list::init_session () { char mutex_name[MAX_PATH]; @@ -75,7 +75,7 @@ tty_list::init_session () ProtectHandle (mutex); } =20 -void __stdcall +void tty::init_session () { if (!myself->cygstarted && NOTSTATE (myself, PID_CYGPARENT)) diff --git a/winsup/cygwin/tty.h b/winsup/cygwin/tty.h index c4f2b5dd7..3d0ea0c68 100644 --- a/winsup/cygwin/tty.h +++ b/winsup/cygwin/tty.h @@ -169,8 +169,8 @@ public: bool exists (); bool not_allocated (HANDLE&, HANDLE&); void set_master_ctl_closed () {master_pid =3D -1;} - static void __stdcall create_master (int); - static void __stdcall init_session (); + static void create_master (int); + static void init_session (); void wait_fwd (); bool pty_input_state_eq (xfer_dir x) { return pty_input_state =3D=3D x; } bool nat_fg (pid_t pgid); @@ -192,7 +192,7 @@ public: void init (); tty_min *get_cttyp (); int attach (int n); - static void __stdcall init_session (); + static void init_session (); friend class lock_ttys; }; =20 diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h index 4147dcebf..43dfbf46f 100644 --- a/winsup/cygwin/winsup.h +++ b/winsup/cygwin/winsup.h @@ -147,7 +147,7 @@ extern int cygserver_running; class per_process; /* cygwin .dll initialization */ void dll_crt0 (per_process *) __asm__ (_SYMSTR (dll_crt0__FP11per_process)= ); -extern "C" void __stdcall _dll_crt0 (); +extern "C" void _dll_crt0 (); void dll_crt0_1 (void *); void dll_dllcrt0_1 (void *); =20 @@ -182,8 +182,8 @@ const char *find_first_notloaded_dll (class path_conv &= ); =20 /**************************** Miscellaneous ******************************/ =20 -void __stdcall set_std_handle (int); -int __stdcall stat_dev (DWORD, int, unsigned long, struct stat *); +void set_std_handle (int); +int stat_dev (DWORD, int, unsigned long, struct stat *); =20 ino_t hash_path_name (ino_t hash, PUNICODE_STRING name); ino_t hash_path_name (ino_t hash, PCWSTR name); @@ -194,16 +194,16 @@ void *hook_or_detect_cygwin (const char *, const void= *, WORD&, HANDLE h =3D NULL) void *hook_api (const char *mname, const char *name, const void *fn); =20 /* Time related */ -void __stdcall totimeval (struct timeval *, PLARGE_INTEGER, int, int); -time_t __stdcall to_time_t (PLARGE_INTEGER); -void __stdcall to_timestruc_t (PLARGE_INTEGER, timestruc_t *); -void __stdcall time_as_timestruc_t (timestruc_t *); -void __stdcall timeval_to_filetime (const struct timeval *, PLARGE_INTEGER= ); -void __stdcall timespec_to_filetime (const struct timespec *, PLARGE_INTEG= ER); +void totimeval (struct timeval *, PLARGE_INTEGER, int, int); +time_t to_time_t (PLARGE_INTEGER); +void to_timestruc_t (PLARGE_INTEGER, timestruc_t *); +void time_as_timestruc_t (timestruc_t *); +void timeval_to_filetime (const struct timeval *, PLARGE_INTEGER); +void timespec_to_filetime (const struct timespec *, PLARGE_INTEGER); bool timeval_to_ms (const struct timeval *, DWORD &); =20 /* Console related */ -void __stdcall set_console_title (char *); +void set_console_title (char *); void init_console_handler (bool); =20 extern bool wsock_started; diff --git a/winsup/utils/kill.cc b/winsup/utils/kill.cc index d0fb54737..04c9774eb 100644 --- a/winsup/utils/kill.cc +++ b/winsup/utils/kill.cc @@ -154,7 +154,7 @@ get_debug_priv (void) CloseHandle (tok); } =20 -static void __stdcall +static void forcekill (pid_t pid, DWORD winpid, int sig, int wait) { DWORD dwpid; diff --git a/winsup/utils/mingw/strace.cc b/winsup/utils/mingw/strace.cc index 2731fd391..f7e7b8fd0 100644 --- a/winsup/utils/mingw/strace.cc +++ b/winsup/utils/mingw/strace.cc @@ -437,7 +437,7 @@ syst (long long t) return &st; } =20 -static void __stdcall +static void handle_output_debug_string (DWORD id, LPVOID p, unsigned mask, FILE *ofile) { int len; diff --git a/winsup/utils/ps.cc b/winsup/utils/ps.cc index dbcacbab4..982183c5d 100644 --- a/winsup/utils/ps.cc +++ b/winsup/utils/ps.cc @@ -68,7 +68,7 @@ start_time (external_pinfo *child) #define NSPERSEC 10000000LL =20 /* Convert a Win32 time to "UNIX" format. */ -long __stdcall +long to_time_t (FILETIME *ptr) { /* A file time is the number of 100ns since jan 1 1601