mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
Make small fixes
This commit is contained in:
parent
80308079ec
commit
ab38f0823d
5 changed files with 7 additions and 6 deletions
|
@ -32,10 +32,7 @@ __msabi extern typeof(CloseHandle) *const __imp_CloseHandle;
|
||||||
textwindows bool32 CloseHandle(int64_t hObject) {
|
textwindows bool32 CloseHandle(int64_t hObject) {
|
||||||
bool32 ok;
|
bool32 ok;
|
||||||
ok = __imp_CloseHandle(hObject);
|
ok = __imp_CloseHandle(hObject);
|
||||||
if (!ok) {
|
if (!ok) __winerr();
|
||||||
__winerr();
|
|
||||||
if (weaken(__die)) weaken(__die)();
|
|
||||||
}
|
|
||||||
NTTRACE("CloseHandle(%ld) → %hhhd% m", hObject, ok);
|
NTTRACE("CloseHandle(%ld) → %hhhd% m", hObject, ok);
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
* both the newly created socket and the server one
|
* both the newly created socket and the server one
|
||||||
* @return client fd which needs close(), or -1 w/ errno
|
* @return client fd which needs close(), or -1 w/ errno
|
||||||
* @asyncsignalsafe
|
* @asyncsignalsafe
|
||||||
|
* @restartable (unless SO_RCVTIMEO)
|
||||||
*/
|
*/
|
||||||
int accept4(int fd, void *out_addr, uint32_t *inout_addrsize, int flags) {
|
int accept4(int fd, void *out_addr, uint32_t *inout_addrsize, int flags) {
|
||||||
int rc;
|
int rc;
|
||||||
|
|
|
@ -199,7 +199,7 @@ TEST(mprotect, testFileMap_canChangeToExecWhileOpenInRdwrMode) {
|
||||||
|
|
||||||
TEST(mprotect, testBadProt_failsEinval) {
|
TEST(mprotect, testBadProt_failsEinval) {
|
||||||
volatile char *p = gc(memalign(PAGESIZE, PAGESIZE));
|
volatile char *p = gc(memalign(PAGESIZE, PAGESIZE));
|
||||||
EXPECT_EQ(-1, mprotect(p, 0, -1));
|
EXPECT_EQ(-1, mprotect(p, 9999, -1));
|
||||||
EXPECT_EQ(EINVAL, errno);
|
EXPECT_EQ(EINVAL, errno);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -199,6 +199,9 @@ void FixupUndefOpTestFlags(char w, int h, uint64_t x, uint64_t y,
|
||||||
if (y != 0 && y != 1) {
|
if (y != 0 && y != 1) {
|
||||||
*flags = SetFlag(*flags, FLAGS_OF, GetFlag(goldenflags, FLAGS_OF));
|
*flags = SetFlag(*flags, FLAGS_OF, GetFlag(goldenflags, FLAGS_OF));
|
||||||
}
|
}
|
||||||
|
if (y >= w) {
|
||||||
|
*flags = SetFlag(*flags, FLAGS_CF, GetFlag(goldenflags, FLAGS_CF));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(bsu, test) {
|
TEST(bsu, test) {
|
||||||
|
|
|
@ -7093,7 +7093,7 @@ void RedBean(int argc, char *argv[]) {
|
||||||
isinitialized = true;
|
isinitialized = true;
|
||||||
CallSimpleHookIfDefined("OnServerStart");
|
CallSimpleHookIfDefined("OnServerStart");
|
||||||
#ifdef STATIC
|
#ifdef STATIC
|
||||||
EventLoop();
|
EventLoop(-1, HEARTBEAT);
|
||||||
#else
|
#else
|
||||||
if (!IsWindows() && isatty(0)) {
|
if (!IsWindows() && isatty(0)) {
|
||||||
ReplEventLoop();
|
ReplEventLoop();
|
||||||
|
|
Loading…
Reference in a new issue