mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-14 06:59:10 +00:00
Implement syslog (#136)
This commit is contained in:
parent
83abd68029
commit
6682013d12
50 changed files with 535 additions and 89 deletions
|
@ -1,2 +1,15 @@
|
|||
.include "o/libc/nt/codegen.inc"
|
||||
.imp advapi32,__imp_DeregisterEventSource,DeregisterEventSource,1239
|
||||
|
||||
.text.windows
|
||||
DeregisterEventSource:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
mov %rdi,%rcx
|
||||
sub $32,%rsp
|
||||
call *__imp_DeregisterEventSource(%rip)
|
||||
leave
|
||||
ret
|
||||
.endfn DeregisterEventSource,globl
|
||||
.previous
|
||||
|
|
|
@ -1,2 +1,12 @@
|
|||
.include "o/libc/nt/codegen.inc"
|
||||
.imp advapi32,__imp_RegisterEventSourceA,RegisterEventSourceA,1686
|
||||
|
||||
.text.windows
|
||||
RegisterEventSourceA:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
mov __imp_RegisterEventSourceA(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
.endfn RegisterEventSourceA,globl
|
||||
.previous
|
||||
|
|
|
@ -1,2 +1,12 @@
|
|||
.include "o/libc/nt/codegen.inc"
|
||||
.imp advapi32,__imp_RegisterEventSourceW,RegisterEventSourceW,1687
|
||||
|
||||
.text.windows
|
||||
RegisterEventSource:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
mov __imp_RegisterEventSourceW(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
.endfn RegisterEventSource,globl
|
||||
.previous
|
||||
|
|
|
@ -1,2 +1,12 @@
|
|||
.include "o/libc/nt/codegen.inc"
|
||||
.imp advapi32,__imp_ReportEventA,ReportEventA,1704
|
||||
|
||||
.text.windows
|
||||
ReportEventA:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
mov __imp_ReportEventA(%rip),%rax
|
||||
jmp __sysv2nt10
|
||||
.endfn ReportEventA,globl
|
||||
.previous
|
||||
|
|
|
@ -1,2 +1,12 @@
|
|||
.include "o/libc/nt/codegen.inc"
|
||||
.imp advapi32,__imp_ReportEventW,ReportEventW,1705
|
||||
|
||||
.text.windows
|
||||
ReportEvent:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
mov __imp_ReportEventW(%rip),%rax
|
||||
jmp __sysv2nt10
|
||||
.endfn ReportEvent,globl
|
||||
.previous
|
||||
|
|
|
@ -39,6 +39,19 @@ bool32 GetCursorPos(struct NtPoint *lpPoint);
|
|||
int64_t SendMessage(int64_t hWnd, uint32_t Msg, uint64_t wParam,
|
||||
int64_t lParam);
|
||||
|
||||
#define EVENTLOG_SUCCESS 0x00000000
|
||||
#define EVENTLOG_ERROR_TYPE 0x00000001
|
||||
#define EVENTLOG_WARNING_TYPE 0x00000002
|
||||
#define EVENTLOG_INFORMATION_TYPE 0x00000004
|
||||
#define EVENTLOG_AUDIT_SUCCESS 0x00000008
|
||||
#define EVENTLOG_AUDIT_FAILURE 0x00000010
|
||||
|
||||
int32_t ReportEventA(int64_t handle, uint16_t wType, uint16_t wCategory,
|
||||
uint32_t dwEventID, const char *lpUserId, uint16_t wNumStrings,
|
||||
uint32_t dwDataSize, const char **lpStrings, void **lpRawData);
|
||||
int64_t RegisterEventSourceA(const char *lpUNCServerName, const char *lpSourceName);
|
||||
int32_t DeregisterEventSource(uint64_t handle);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_EVENTS_H_ */
|
||||
|
|
|
@ -1214,7 +1214,7 @@ imp 'DeleteUmsThreadContext' DeleteUmsThreadContext kernel32 284
|
|||
imp 'DeleteVolumeMountPointA' DeleteVolumeMountPointA kernel32 285
|
||||
imp 'DeleteVolumeMountPoint' DeleteVolumeMountPointW kernel32 0 # KernelBase
|
||||
imp 'DequeueUmsCompletionListItems' DequeueUmsCompletionListItems kernel32 287
|
||||
imp 'DeregisterEventSource' DeregisterEventSource advapi32 1239
|
||||
imp 'DeregisterEventSource' DeregisterEventSource advapi32 1239 1
|
||||
imp 'DeregisterShellHookWindow' DeregisterShellHookWindow user32 1682
|
||||
imp 'DeriveCapabilitySidsFromName' DeriveCapabilitySidsFromName KernelBase 263
|
||||
imp 'DescribePixelFormat' DescribePixelFormat gdi32 1388
|
||||
|
@ -4652,8 +4652,8 @@ imp 'RegisterDManipHook' RegisterDManipHook user32 2254
|
|||
imp 'RegisterDeviceNotificationA' RegisterDeviceNotificationA user32 2255
|
||||
imp 'RegisterDeviceNotification' RegisterDeviceNotificationW user32 2256
|
||||
imp 'RegisterErrorReportingDialog' RegisterErrorReportingDialog user32 2257
|
||||
imp 'RegisterEventSourceA' RegisterEventSourceA advapi32 1686
|
||||
imp 'RegisterEventSource' RegisterEventSourceW advapi32 1687
|
||||
imp 'RegisterEventSourceA' RegisterEventSourceA advapi32 1686 2
|
||||
imp 'RegisterEventSource' RegisterEventSourceW advapi32 1687 2
|
||||
imp 'RegisterFrostWindow' RegisterFrostWindow user32 2258
|
||||
imp 'RegisterGPNotificationInternal' RegisterGPNotificationInternal KernelBase 1385
|
||||
imp 'RegisterGhostWindow' RegisterGhostWindow user32 2259
|
||||
|
@ -4737,8 +4737,8 @@ imp 'ReplacePartitionUnit' ReplacePartitionUnit kernel32 1217
|
|||
imp 'ReplaceTextA' ReplaceTextA comdlg32 124 1
|
||||
imp 'ReplaceText' ReplaceTextW comdlg32 125 1
|
||||
imp 'ReplyMessage' ReplyMessage user32 2288
|
||||
imp 'ReportEventA' ReportEventA advapi32 1704
|
||||
imp 'ReportEvent' ReportEventW advapi32 1705
|
||||
imp 'ReportEventA' ReportEventA advapi32 1704 9
|
||||
imp 'ReportEvent' ReportEventW advapi32 1705 9
|
||||
imp 'ReportInertia' ReportInertia user32 2551
|
||||
imp 'RequestDeviceWakeup' RequestDeviceWakeup kernel32 1218
|
||||
imp 'RequestWakeupLatency' RequestWakeupLatency kernel32 1219
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue