Cygwin: drop all usages of WINAPI

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2022-08-04 21:16:32 +02:00
parent 73aefcb5c2
commit b28edc7b86
29 changed files with 93 additions and 94 deletions

View File

@ -21,7 +21,7 @@ details. */
is not easy to understand. In all other case, use the ntdll.dll
equivalent. */
BOOL WINAPI
BOOL
RevertToSelf ()
{
HANDLE tok = NULL;
@ -31,7 +31,7 @@ RevertToSelf ()
DEFAULT_NTSTATUS_TO_BOOL_RETURN
}
BOOL WINAPI
BOOL
DuplicateTokenEx (HANDLE tok, DWORD access, LPSECURITY_ATTRIBUTES sec_attr,
SECURITY_IMPERSONATION_LEVEL level, TOKEN_TYPE type,
PHANDLE new_tok)
@ -46,7 +46,7 @@ DuplicateTokenEx (HANDLE tok, DWORD access, LPSECURITY_ATTRIBUTES sec_attr,
DEFAULT_NTSTATUS_TO_BOOL_RETURN
}
BOOL WINAPI
BOOL
ImpersonateLoggedOnUser (HANDLE tok)
{
NTSTATUS status;
@ -86,7 +86,7 @@ ImpersonateLoggedOnUser (HANDLE tok)
DEFAULT_NTSTATUS_TO_BOOL_RETURN
}
BOOL WINAPI
BOOL
ImpersonateNamedPipeClient (HANDLE pipe)
{
IO_STATUS_BLOCK io;

View File

@ -200,7 +200,7 @@ aionotify (struct aiocb *aio)
}
}
static DWORD WINAPI __attribute__ ((noreturn))
static DWORD __attribute__ ((noreturn))
aiowaiter (void *unused)
{ /* One instance, called on its own cygthread; runs until program exits */
struct aiocb *aio;
@ -327,7 +327,7 @@ asyncwrite (struct aiocb *aio)
}
/* Have to forward ref because of chicken v. egg situation */
static DWORD WINAPI __attribute__ ((noreturn)) aioworker (void *);
static DWORD __attribute__ ((noreturn)) aioworker (void *);
static void
aioinit (void)
@ -400,7 +400,7 @@ aioqueue (struct aiocb *aio)
return 0;
}
static DWORD WINAPI __attribute__ ((noreturn))
static DWORD __attribute__ ((noreturn))
aioworker (void *unused)
{ /* Multiple instances; called on own cygthreads; runs 'til program exits */
struct aiocb *aio;

View File

@ -52,7 +52,7 @@ cygthread::callfunc (bool issimplestub)
/* Initial stub called by cygthread constructor. Performs initial
per-thread initialization and loops waiting for another thread function
to execute. */
DWORD WINAPI
DWORD
cygthread::stub (VOID *arg)
{
cygthread *info = (cygthread *) arg;
@ -122,7 +122,7 @@ cygthread::stub (VOID *arg)
/* Overflow stub called by cygthread constructor. Calls specified function
and then exits the thread. */
DWORD WINAPI
DWORD
cygthread::simplestub (VOID *arg)
{
cygthread *info = (cygthread *) arg;

View File

@ -7,7 +7,7 @@ details. */
#ifndef _CYGTHREAD_H
#define _CYGTHREAD_H
typedef void WINAPI (*LPVOID_THREAD_START_ROUTINE) (void *) __attribute__((noreturn)); // Input queue thread
typedef void (*LPVOID_THREAD_START_ROUTINE) (void *) __attribute__((noreturn)); // Input queue thread
class cygthread
{
@ -32,8 +32,8 @@ class cygthread
static void CALLBACK async_create (ULONG_PTR);
public:
bool terminate_thread ();
static DWORD WINAPI stub (VOID *);
static DWORD WINAPI simplestub (VOID *);
static DWORD stub (VOID *);
static DWORD simplestub (VOID *);
static DWORD main_thread_id;
static const char *name (DWORD = 0);
void callfunc (bool) __attribute__ ((noinline, ));

View File

@ -55,7 +55,7 @@ PWCHAR debugger_command;
extern uint8_t _sigbe;
extern uint8_t _sigdelayed_end;
static BOOL WINAPI ctrl_c_handler (DWORD);
static BOOL ctrl_c_handler (DWORD);
static const struct
{
@ -528,7 +528,7 @@ exception::myfault (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT *in,
TODO: What we do here is to handle only __try/__except blocks in Cygwin.
"Normal" exceptions will simply exit the process. Still, better
than nothing... */
LONG WINAPI
LONG
myfault_altstack_handler (EXCEPTION_POINTERS *exc)
{
_cygtls& me = _my_tls;
@ -976,7 +976,7 @@ has_visible_window_station ()
}
/* Keyboard interrupt handler. */
static BOOL WINAPI
static BOOL
ctrl_c_handler (DWORD type)
{
static bool saw_close;
@ -1207,7 +1207,7 @@ set_signal_mask (sigset_t& setmask, sigset_t newmask)
}
DWORD WINAPI
DWORD
dumpstack_overflow_wrapper (PVOID arg)
{
cygwin_exception *exc = (cygwin_exception *) arg;

View File

@ -198,7 +198,7 @@ console_unit::console_unit (HWND me0):
api_fatal ("console device allocation failure - too many consoles in use, max consoles is 32");
}
static DWORD WINAPI
static DWORD
cons_master_thread (VOID *arg)
{
fhandler_console *fh = (fhandler_console *) arg;
@ -3988,7 +3988,7 @@ DEF_HOOK (CreateProcessW);
DEF_HOOK (ContinueDebugEvent);
DEF_HOOK (GetProcAddress); /* Hooked for ConEmu cygwin connector */
static BOOL WINAPI
static BOOL
CreateProcessA_Hooked
(LPCSTR n, LPSTR c, LPSECURITY_ATTRIBUTES pa, LPSECURITY_ATTRIBUTES ta,
BOOL inh, DWORD f, LPVOID e, LPCSTR d,
@ -4003,7 +4003,7 @@ CreateProcessA_Hooked
return CreateProcessA_Orig (n, c, pa, ta, inh, f, e, d, si, pi);
}
static BOOL WINAPI
static BOOL
CreateProcessW_Hooked
(LPCWSTR n, LPWSTR c, LPSECURITY_ATTRIBUTES pa, LPSECURITY_ATTRIBUTES ta,
BOOL inh, DWORD f, LPVOID e, LPCWSTR d,
@ -4018,7 +4018,7 @@ CreateProcessW_Hooked
return CreateProcessW_Orig (n, c, pa, ta, inh, f, e, d, si, pi);
}
static BOOL WINAPI
static BOOL
ContinueDebugEvent_Hooked
(DWORD p, DWORD t, DWORD s)
{
@ -4029,7 +4029,7 @@ ContinueDebugEvent_Hooked
}
/* Hooked for ConEmu cygwin connector */
static FARPROC WINAPI
static FARPROC
GetProcAddress_Hooked (HMODULE h, LPCSTR n)
{
if (strcmp(n, "RequestTermConnector") == 0)

View File

@ -446,7 +446,7 @@ fhandler_fifo::update_shared_handlers ()
return 0;
}
static DWORD WINAPI
static DWORD
fifo_reader_thread (LPVOID param)
{
fhandler_fifo *fh = (fhandler_fifo *) param;

View File

@ -63,7 +63,7 @@ wnet_dbg_out (const char *func, DWORD ndi_ret)
debug_printf ("WNetGetLastError failed: %u", gle_ret);
}
static DWORD WINAPI
static DWORD
thread_netdrive (void *arg)
{
netdriveinf *ndi = (netdriveinf *) arg;

View File

@ -928,7 +928,7 @@ struct conn_wait_info_t
};
/* Just hop to the wait_pipe_thread method. */
DWORD WINAPI
DWORD
connect_wait_func (LPVOID param)
{
conn_wait_info_t *wait_info = (conn_wait_info_t *) param;

View File

@ -268,7 +268,7 @@ atexit_func (void)
DEF_HOOK (CreateProcessA);
DEF_HOOK (CreateProcessW);
static BOOL WINAPI
static BOOL
CreateProcessA_Hooked
(LPCSTR n, LPSTR c, LPSECURITY_ATTRIBUTES pa, LPSECURITY_ATTRIBUTES ta,
BOOL inh, DWORD f, LPVOID e, LPCSTR d,
@ -307,7 +307,7 @@ CreateProcessA_Hooked
return ret;
}
static BOOL WINAPI
static BOOL
CreateProcessW_Hooked
(LPCWSTR n, LPWSTR c, LPSECURITY_ATTRIBUTES pa, LPSECURITY_ATTRIBUTES ta,
BOOL inh, DWORD f, LPVOID e, LPCWSTR d,
@ -2666,7 +2666,7 @@ reply:
return 0;
}
static DWORD WINAPI
static DWORD
pty_master_thread (VOID *arg)
{
fhandler_pty_master::master_thread_param_t p;
@ -2873,7 +2873,7 @@ fhandler_pty_master::pty_master_fwd_thread (const master_fwd_thread_param_t *p)
return 0;
}
static DWORD WINAPI
static DWORD
pty_master_fwd_thread (VOID *arg)
{
fhandler_pty_master::master_fwd_thread_param_t p;

View File

@ -642,7 +642,7 @@ lockf_t::create_lock_obj_attr (lockfattr_t *attr, ULONG flags, void *sd_buf)
return &attr->attr;
}
DWORD WINAPI
DWORD
create_lock_in_parent (PVOID param)
{
HANDLE lf_obj;
@ -721,7 +721,7 @@ err:
return 1;
}
DWORD WINAPI
DWORD
delete_lock_in_parent (PVOID param)
{
inode_t *node, *next_node;
@ -1870,7 +1870,7 @@ struct lock_parms {
NTSTATUS status;
};
static DWORD WINAPI
static DWORD
blocking_lock_thr (LPVOID param)
{
struct lock_parms *lp = (struct lock_parms *) param;

View File

@ -22,7 +22,7 @@ details. */
#define DECLARE_CYGWIN_DLL(Entry) \
\
CDECL_BEGIN \
int WINAPI Entry (HINSTANCE h, DWORD reason, void *ptr); \
int Entry (HINSTANCE h, DWORD reason, void *ptr); \
typedef int (*mainfunc) (int, char **, char **); \
extern PVOID cygwin_attach_dll (HMODULE, mainfunc); \
extern void cygwin_detach_dll (PVOID); \
@ -42,7 +42,7 @@ static int __dllMain (int a __attribute__ ((__unused__)), \
\
static PVOID dll_index; \
\
int WINAPI _cygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \
int _cygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \
{ \
int ret; \
ret = 1; \

View File

@ -19,7 +19,7 @@ unsigned threadfunc_ix[8];
static bool dll_finished_loading;
#define OLDFUNC_OFFSET -1
static void WINAPI
static void
threadfunc_fe (VOID *arg)
{
_cygtls::call ((DWORD (*) (void *, void *)) TlsGetValue (_my_oldfunc), arg);
@ -70,7 +70,7 @@ void dll_crt0_0 ();
need the alloca'd space in the DLL_PROCESS_ATTACH case below... */
void *alloca_dummy;
extern "C" BOOL WINAPI
extern "C" BOOL
dll_entry (HANDLE h, DWORD reason, void *static_load)
{
BOOL test_stack_marker;

View File

@ -22,7 +22,7 @@ details. */
/* Implement CreateEvent/OpenEvent so that named objects are always created in
Cygwin shared object namespace. */
HANDLE WINAPI
HANDLE
CreateEventW (LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset,
BOOL bInitialState, LPCWSTR lpName)
{
@ -57,7 +57,7 @@ CreateEventW (LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset,
return evt;
}
HANDLE WINAPI
HANDLE
CreateEventA (LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset,
BOOL bInitialState, LPCSTR lpName)
{
@ -72,7 +72,7 @@ CreateEventA (LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset,
lpName ? name : NULL);
}
HANDLE WINAPI
HANDLE
OpenEventW (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpName)
{
HANDLE evt;
@ -100,7 +100,7 @@ OpenEventW (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpName)
return evt;
}
HANDLE WINAPI
HANDLE
OpenEventA (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName)
{
WCHAR name[MAX_PATH];
@ -116,7 +116,7 @@ OpenEventA (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName)
/* Implement CreateMutex/OpenMutex so that named objects are always created in
Cygwin shared object namespace. */
HANDLE WINAPI
HANDLE
CreateMutexW (LPSECURITY_ATTRIBUTES lpMutexAttributes, BOOL bInitialOwner,
LPCWSTR lpName)
{
@ -148,7 +148,7 @@ CreateMutexW (LPSECURITY_ATTRIBUTES lpMutexAttributes, BOOL bInitialOwner,
return mtx;
}
HANDLE WINAPI
HANDLE
CreateMutexA (LPSECURITY_ATTRIBUTES lpMutexAttributes, BOOL bInitialOwner,
LPCSTR lpName)
{
@ -162,7 +162,7 @@ CreateMutexA (LPSECURITY_ATTRIBUTES lpMutexAttributes, BOOL bInitialOwner,
return CreateMutexW (lpMutexAttributes, bInitialOwner, lpName ? name : NULL);
}
HANDLE WINAPI
HANDLE
OpenMutexW (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpName)
{
HANDLE mtx;
@ -190,7 +190,7 @@ OpenMutexW (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpName)
return mtx;
}
HANDLE WINAPI
HANDLE
OpenMutexA (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName)
{
WCHAR name[MAX_PATH];
@ -206,7 +206,7 @@ OpenMutexA (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName)
/* Implement CreateSemaphore/OpenSemaphore so that named objects are always
created in Cygwin shared object namespace. */
HANDLE WINAPI
HANDLE
CreateSemaphoreW (LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
LONG lInitialCount, LONG lMaximumCount, LPCWSTR lpName)
{
@ -240,7 +240,7 @@ CreateSemaphoreW (LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
return sem;
}
HANDLE WINAPI
HANDLE
CreateSemaphoreA (LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
LONG lInitialCount, LONG lMaximumCount, LPCSTR lpName)
{
@ -255,7 +255,7 @@ CreateSemaphoreA (LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
lpName ? name : NULL);
}
HANDLE WINAPI
HANDLE
OpenSemaphoreW (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpName)
{
HANDLE sem;
@ -283,7 +283,7 @@ OpenSemaphoreW (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpName)
return sem;
}
HANDLE WINAPI
HANDLE
OpenSemaphoreA (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName)
{
WCHAR name[MAX_PATH];
@ -299,7 +299,7 @@ OpenSemaphoreA (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName)
/* Implement CreateFileMapping/OpenFileMapping so that named objects are always
created in Cygwin shared object namespace. */
HANDLE WINAPI
HANDLE
CreateFileMappingW (HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes,
DWORD flProtect, DWORD dwMaximumSizeHigh,
DWORD dwMaximumSizeLow, LPCWSTR lpName)
@ -354,7 +354,7 @@ CreateFileMappingW (HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes,
return sect;
}
HANDLE WINAPI
HANDLE
CreateFileMappingA (HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes,
DWORD flProtect, DWORD dwMaximumSizeHigh,
DWORD dwMaximumSizeLow, LPCSTR lpName)
@ -370,7 +370,7 @@ CreateFileMappingA (HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes,
dwMaximumSizeLow, lpName ? name : NULL);
}
HANDLE WINAPI
HANDLE
OpenFileMappingW (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpName)
{
HANDLE sect;
@ -398,7 +398,7 @@ OpenFileMappingW (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpName)
return sect;
}
HANDLE WINAPI
HANDLE
OpenFileMappingA (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName)
{
WCHAR name[MAX_PATH];
@ -433,7 +433,7 @@ ucmd ()
/* Cygwin replacement for GetCommandLineW. Returns a concatenated wide string
representing the argv list, constructed using roughly the same mechanism as
child_info_spawn::worker */
extern "C" LPWSTR WINAPI
extern "C" LPWSTR
cygwin_GetCommandLineW (void)
{
return ucmd ()->Buffer;
@ -442,7 +442,7 @@ cygwin_GetCommandLineW (void)
/* Cygwin replacement for GetCommandLineA. Returns a concatenated string
representing the argv list, constructed using roughly the same mechanism
as child_info_spawn::worker */
extern "C" LPSTR WINAPI
extern "C" LPSTR
cygwin_GetCommandLineA (void)
{
static ANSI_STRING cmd;

View File

@ -208,7 +208,7 @@ cyg_ldap::connect_non_ssl (PCWSTR domain)
return ret;
}
static DWORD WINAPI
static DWORD
ldap_init_thr (LPVOID param)
{
cyg_ldap_init *cl = (cyg_ldap_init *) param;
@ -251,7 +251,7 @@ cyg_ldap::search_s (PWCHAR base, ULONG scope, PWCHAR filter, PWCHAR *attrs)
return ret;
}
static DWORD WINAPI
static DWORD
ldap_search_thr (LPVOID param)
{
cyg_ldap_search *cl = (cyg_ldap_search *) param;
@ -293,7 +293,7 @@ cyg_ldap::next_page_s ()
return ret;
}
static DWORD WINAPI
static DWORD
ldap_next_page_thr (LPVOID param)
{
cyg_ldap_next_page *cl = (cyg_ldap_next_page *) param;

View File

@ -19,7 +19,7 @@ details. */
#include "mmap_alloc.h"
/* not yet prototyped in w32api */
extern "C" HRESULT WINAPI SetThreadDescription (HANDLE hThread, PCWSTR lpThreadDescription);
extern "C" HRESULT SetThreadDescription (HANDLE hThread, PCWSTR lpThreadDescription);
/* Get handle count of an object. */
ULONG
@ -202,7 +202,7 @@ nice_to_winprio (int &nice)
/* Minimal overlapped pipe I/O implementation for signal and commune stuff. */
BOOL WINAPI
BOOL
CreatePipeOverlapped (PHANDLE hr, PHANDLE hw, LPSECURITY_ATTRIBUTES sa)
{
int ret = fhandler_pipe::create (sa, hr, hw, 0, NULL,
@ -212,7 +212,7 @@ CreatePipeOverlapped (PHANDLE hr, PHANDLE hw, LPSECURITY_ATTRIBUTES sa)
return ret == 0;
}
BOOL WINAPI
BOOL
ReadPipeOverlapped (HANDLE h, PVOID buf, DWORD len, LPDWORD ret_len,
DWORD timeout)
{
@ -232,7 +232,7 @@ ReadPipeOverlapped (HANDLE h, PVOID buf, DWORD len, LPDWORD ret_len,
return ret;
}
BOOL WINAPI
BOOL
WritePipeOverlapped (HANDLE h, LPCVOID buf, DWORD len, LPDWORD ret_len,
DWORD timeout)
{
@ -376,7 +376,7 @@ struct pthread_wrapper_arg
ULONG guardsize;
};
DWORD WINAPI
DWORD
pthread_wrapper (PVOID arg)
{
/* Just plain paranoia. */
@ -601,7 +601,7 @@ create_new_main_thread_stack (PVOID &allocationbase)
return ((PBYTE) allocationbase + stacksize - 16);
}
HANDLE WINAPI
HANDLE
CygwinCreateThread (LPTHREAD_START_ROUTINE thread_func, PVOID thread_arg,
PVOID stackaddr, ULONG stacksize, ULONG guardsize,
DWORD creation_flags, LPDWORD thread_id)

View File

@ -49,12 +49,12 @@ DWORD nice_to_winprio (int &);
bool create_pipe (PHANDLE, PHANDLE, LPSECURITY_ATTRIBUTES, DWORD);
BOOL WINAPI CreatePipeOverlapped (PHANDLE read_handle, PHANDLE write_handle,
LPSECURITY_ATTRIBUTES sa);
BOOL WINAPI ReadPipeOverlapped (HANDLE h, PVOID buf, DWORD len,
LPDWORD ret_len, DWORD timeout);
BOOL WINAPI WritePipeOverlapped (HANDLE h, LPCVOID buf, DWORD len,
LPDWORD ret_len, DWORD timeout);
BOOL CreatePipeOverlapped (PHANDLE read_handle, PHANDLE write_handle,
LPSECURITY_ATTRIBUTES sa);
BOOL ReadPipeOverlapped (HANDLE h, PVOID buf, DWORD len,
LPDWORD ret_len, DWORD timeout);
BOOL WritePipeOverlapped (HANDLE h, LPCVOID buf, DWORD len,
LPDWORD ret_len, DWORD timeout);
/* class for per-line reading using native functions. The caller provides
the file as an POBJECT_ATTRIBUTES, and the buffer space. */
@ -110,12 +110,11 @@ ssize_t check_iovec (const struct iovec *, int, bool);
extern PVOID create_new_main_thread_stack (PVOID &allocationbase);
extern "C" DWORD WINAPI pthread_wrapper (PVOID arg);
extern "C" HANDLE WINAPI CygwinCreateThread (LPTHREAD_START_ROUTINE thread_func,
PVOID thread_arg, PVOID stackaddr,
ULONG stacksize, ULONG guardsize,
DWORD creation_flags,
LPDWORD thread_id);
extern "C" DWORD pthread_wrapper (PVOID arg);
extern "C" HANDLE CygwinCreateThread (LPTHREAD_START_ROUTINE thread_func,
PVOID thread_arg, PVOID stackaddr,
ULONG stacksize, ULONG guardsize,
DWORD creation_flags, LPDWORD thread_id);
void SetThreadName (DWORD dwThreadID, const char* threadName);

View File

@ -1522,7 +1522,7 @@ extern "C"
PVOID, ULONG, PULONG);
NTSTATUS NTAPI NtQuerySystemInformation (SYSTEM_INFORMATION_CLASS,
PVOID, ULONG, PULONG);
NTSTATUS WINAPI NtQuerySystemTime (PLARGE_INTEGER);
NTSTATUS NTAPI NtQuerySystemTime (PLARGE_INTEGER);
NTSTATUS NTAPI NtQuerySecurityObject (HANDLE, SECURITY_INFORMATION,
PSECURITY_DESCRIPTOR, ULONG, PULONG);
NTSTATUS NTAPI NtQuerySymbolicLinkObject (HANDLE, PUNICODE_STRING, PULONG);

View File

@ -597,7 +597,7 @@ _pinfo::alive ()
return !!h;
}
DWORD WINAPI
DWORD
commune_process (void *arg)
{
siginfo_t& si = *((siginfo_t *) arg);
@ -1234,7 +1234,7 @@ _pinfo::environ (size_t& n)
is received on the pipe, it is assumed that the cygwin pid has exited.
Otherwise, various "signals" can be sent to the parent to inform the
parent to perform a certain action. */
static DWORD WINAPI
static DWORD
proc_waiter (void *arg)
{
pinfo vchild = *(pinfo *) arg;

View File

@ -131,7 +131,7 @@ public:
friend class pinfo_minimal;
};
DWORD WINAPI commune_process (void *);
DWORD commune_process (void *);
enum parent_alerter
{

View File

@ -228,7 +228,7 @@ out:
return 0;
}
static DWORD WINAPI
static DWORD
timer_thread (VOID *x)
{
timer_tracker *tt = ((timer_tracker *) x);

View File

@ -153,7 +153,7 @@ profile_on (struct profinfo *p)
return -1;
}
p->profthr = CreateThread (0, 0, (DWORD (WINAPI *)(LPVOID)) profthr_func,
p->profthr = CreateThread (0, 0, (DWORD (*)(LPVOID)) profthr_func,
(void *) p, 0, &thrid);
if (!p->profthr)

View File

@ -770,7 +770,7 @@ out:
static int start_thread_pipe (select_record *me, select_stuff *stuff);
static DWORD WINAPI
static DWORD
thread_pipe (void *arg)
{
select_pipe_info *pi = (select_pipe_info *) arg;
@ -973,7 +973,7 @@ out:
static int start_thread_fifo (select_record *me, select_stuff *stuff);
static DWORD WINAPI
static DWORD
thread_fifo (void *arg)
{
select_fifo_info *pi = (select_fifo_info *) arg;
@ -1161,7 +1161,7 @@ verify_console (select_record *me, fd_set *rfds, fd_set *wfds,
static int console_startup (select_record *me, select_stuff *stuff);
static DWORD WINAPI
static DWORD
thread_console (void *arg)
{
select_console_info *ci = (select_console_info *) arg;
@ -1397,7 +1397,7 @@ out:
static int pty_slave_startup (select_record *me, select_stuff *stuff);
static DWORD WINAPI
static DWORD
thread_pty_slave (void *arg)
{
select_pipe_info *pi = (select_pipe_info *) arg;
@ -1773,7 +1773,7 @@ peek_socket (select_record *me, bool)
static int start_thread_socket (select_record *, select_stuff *);
static DWORD WINAPI
static DWORD
thread_socket (void *arg)
{
select_socket_info *si = (select_socket_info *) arg;

View File

@ -100,7 +100,7 @@ static int checkstate (waitq *);
static __inline__ bool get_proc_lock (DWORD, DWORD);
static int remove_proc (int);
static bool stopped_or_terminated (waitq *, _pinfo *);
static void WINAPI wait_sig (VOID *arg);
static void wait_sig (VOID *arg);
/* wait_sig bookkeeping */
@ -116,7 +116,7 @@ public:
void clear (int sig) {sigs[sig].si.si_signo = 0;}
void clear (_cygtls *tls);
friend void sig_dispatch_pending (bool);
friend void WINAPI wait_sig (VOID *arg);
friend void wait_sig (VOID *arg);
};
Static pending_signals sigq;
@ -1313,7 +1313,7 @@ pending_signals::add (sigpacket& pack)
/* Process signals by waiting for signal data to arrive in a pipe.
Set a completion event if one was specified. */
static void WINAPI
static void
wait_sig (VOID *)
{
_sig_tls = &_my_tls;

View File

@ -1989,7 +1989,7 @@ pthread_spinlock::unlock ()
return result;
}
DWORD WINAPI
DWORD
pthread::thread_init_wrapper (void *arg)
{
exception protect;

View File

@ -430,7 +430,7 @@ public:
virtual void pop_cleanup_handler (int const execute);
static pthread* self ();
static DWORD WINAPI thread_init_wrapper (void *);
static DWORD thread_init_wrapper (void *);
virtual unsigned long getsequence_np();

View File

@ -225,7 +225,7 @@ canceled:
return 0;
}
static DWORD WINAPI
static DWORD
timerfd_thread (VOID *arg)
{
timerfd_tracker *tt = ((timerfd_tracker *) arg);

View File

@ -52,7 +52,7 @@ process_window_events (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
/* Handle windows events. Inherits ownership of the wininfo lock */
DWORD WINAPI
DWORD
wininfo::winthread ()
{
MSG msg;
@ -92,7 +92,7 @@ wininfo::winthread ()
return 0;
}
static DWORD WINAPI
static DWORD
winthread (VOID *arg)
{
return ((wininfo *) arg)->winthread ();

View File

@ -16,7 +16,7 @@ public:
int process (HWND, UINT, WPARAM, LPARAM);
void lock ();
void release ();
DWORD WINAPI winthread ();
DWORD winthread ();
};
extern wininfo winmsg;