Delete most undocumented New Technology APIs

This change removes LIBC_KERNELBASE which is legacy code from the
initial import which was generated off a script that resolved the
delegated references, on Windows 10. All the important stuff here
should have long since been filed under kernel32.dll for windows7

Many FooA functions that were never assigned an arity are removed
because we almost never use the ASCII versions of WIN32 functions
therefore it's not worth having them slowing down the build. Some
other functions that overlap uncomfortably with libc are gone too

If something you need was removed, file an issue we'll restore it
This commit is contained in:
Justine Tunney 2022-04-11 23:35:48 -07:00
parent 183b3ed6a2
commit a157940ba6
1379 changed files with 4304 additions and 8337 deletions

View file

@ -22,6 +22,7 @@
#include "libc/errno.h"
#include "libc/fmt/fmt.h"
#include "libc/log/internal.h"
#include "libc/macros.internal.h"
#include "libc/nt/events.h"
#include "libc/nt/runtime.h"
#include "libc/runtime/valist.h"
@ -43,7 +44,7 @@
* for the first time.
*/
static int log_facility = -1;
static char log_ident[32];
static char16_t log_ident[32];
static int log_opt;
static int log_mask;
static uint16_t log_id; /* Used for Windows EvtID */
@ -73,7 +74,7 @@ forceinline int is_lost_conn(int e) {
static void __openlog() {
if (IsWindows()) {
log_fd = RegisterEventSourceA(NULL, log_ident);
log_fd = RegisterEventSource(NULL, log_ident);
} else {
log_fd = socket(AF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC, 0);
if (log_fd >= 0) {
@ -134,8 +135,8 @@ void vsyslog(int priority, const char *message, va_list ap) {
*/
l = snprintf(buf, sizeof(buf), "<%d>%s ", priority, timebuf);
hlen = l;
l += snprintf(buf + l, sizeof(buf) - l, "%s%s%.0d%s: ", log_ident, "[" + !pid,
pid, "]" + !pid);
l += snprintf(buf + l, sizeof(buf) - l, "%hs%s%.0d%s: ", log_ident,
"[" + !pid, pid, "]" + !pid);
errno = errno_save;
/* Append user message */
@ -280,9 +281,7 @@ void openlog(const char *ident, int opt, int facility) {
if (!ident) {
ident = program_invocation_short_name;
}
n = strnlen(ident, sizeof(log_ident) - 1);
memcpy(log_ident, ident, n);
log_ident[n] = 0;
tprecode8to16(log_ident, ARRAYLEN(log_ident), ident);
log_opt = opt;
log_facility = facility;
log_id = 0;