mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 22:02:27 +00:00
Get us closer to building busybox
This change undefines __linux__ and adds APIs like clock_settime(). The gosh darned getopt_long() API has been reintroduced, thanks to OpenBSD.
This commit is contained in:
parent
5ac522f0de
commit
0409096658
52 changed files with 914 additions and 37 deletions
6
third_party/quickjs/quickjs-libc.c
vendored
6
third_party/quickjs/quickjs-libc.c
vendored
|
@ -1045,7 +1045,7 @@ static JSValue js_std_file_tell(JSContext *ctx, JSValueConst this_val,
|
|||
int64_t pos;
|
||||
if (!f)
|
||||
return JS_EXCEPTION;
|
||||
#if defined(__linux__)
|
||||
#if defined(__linux__) || defined(__COSMOPOLITAN__)
|
||||
pos = ftello(f);
|
||||
#else
|
||||
pos = ftell(f);
|
||||
|
@ -1068,7 +1068,7 @@ static JSValue js_std_file_seek(JSContext *ctx, JSValueConst this_val,
|
|||
return JS_EXCEPTION;
|
||||
if (JS_ToInt32(ctx, &whence, argv[1]))
|
||||
return JS_EXCEPTION;
|
||||
#if defined(__linux__)
|
||||
#if defined(__linux__) || defined(__COSMOPOLITAN__)
|
||||
ret = fseeko(f, pos, whence);
|
||||
#else
|
||||
ret = fseek(f, pos, whence);
|
||||
|
@ -1938,7 +1938,7 @@ static JSValue js_os_signal(JSContext *ctx, JSValueConst this_val,
|
|||
return JS_UNDEFINED;
|
||||
}
|
||||
|
||||
#if defined(__linux__) || defined(__APPLE__)
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__COSMOPOLITAN__)
|
||||
static int64_t get_time_ms(void)
|
||||
{
|
||||
struct timespec ts;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue