Merge pull request #6408 from dearblue/c++

This commit is contained in:
Yukihiro "Matz" Matsumoto
2024-11-06 13:31:42 +09:00
committed by GitHub
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -90,7 +90,8 @@ flock(int fd, int operation)
DWORD flags;
flags = ((operation & LOCK_NB) ? LOCKFILE_FAIL_IMMEDIATELY : 0)
| ((operation & LOCK_SH) ? LOCKFILE_EXCLUSIVE_LOCK : 0);
OVERLAPPED ov = (OVERLAPPED){0};
static const OVERLAPPED zero_ov = {0};
OVERLAPPED ov = zero_ov;
return LockFileEx(h, flags, 0, 0xffffffff, 0xffffffff, &ov) ? 0 : -1;
}
#endif
+1 -1
View File
@@ -81,7 +81,7 @@ dump_float(mrb_state *mrb, uint8_t *buf, mrb_float f)
union {
double f;
char s[sizeof(double)];
} u = {.f = (double)f};
} u = {(double)f};
if (littleendian) {
memcpy(buf, u.s, sizeof(double));