summaryrefslogtreecommitdiff
path: root/LibC
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-02-27 00:02:01 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-02-27 00:02:01 +0100
commite421c10735cd4b14afd2ddd2738617bec4c3a8c3 (patch)
treee71d59b1449677ec60f7b0fb6c8e3c654a71ee90 /LibC
parent424368034b21dbd363e1e8662069bb4dd2de6f4b (diff)
downloadserenity-e421c10735cd4b14afd2ddd2738617bec4c3a8c3.zip
More compat work towards porting vim.
It now builds and runs in the small-featureset configuration. :^)
Diffstat (limited to 'LibC')
-rw-r--r--LibC/stdint.h4
-rw-r--r--LibC/stdlib.cpp10
2 files changed, 13 insertions, 1 deletions
diff --git a/LibC/stdint.h b/LibC/stdint.h
index ad56feaded..e5f84a5b79 100644
--- a/LibC/stdint.h
+++ b/LibC/stdint.h
@@ -50,12 +50,16 @@ typedef __INTMAX_TYPE__ intmax_t;
#define INT8_MIN (-128)
#define INT16_MIN (-32767-1)
#define INT32_MIN (-2147483647-1)
+#define INT64_MIN (-9223372036854775807LL-1LL)
#define INT8_MAX (127)
#define INT16_MAX (32767)
#define INT32_MAX (2147483647)
+#define INT64_MAX (9223372036854775807LL)
#define UINT8_MAX (255)
#define UINT16_MAX (65535)
#define UINT32_MAX (4294967295U)
+#define UINT64_MAX (18446744073709551615ULL)
+
#define INT64_C(x) x##LL
#define UINT64_C(x) x##ULL
diff --git a/LibC/stdlib.cpp b/LibC/stdlib.cpp
index 37078f4986..8d0b9aa153 100644
--- a/LibC/stdlib.cpp
+++ b/LibC/stdlib.cpp
@@ -33,7 +33,7 @@ struct MallocFooter {
uint32_t xorcheck;
};
-#define CHUNK_SIZE 16
+#define CHUNK_SIZE 32
#define POOL_SIZE 4 * 1048576
static const size_t malloc_budget = POOL_SIZE;
@@ -250,6 +250,14 @@ int putenv(char* new_var)
return 0;
}
+double strtod(const char* str, char** endptr)
+{
+ (void)str;
+ (void)endptr;
+ dbgprintf("LibC: strtod: '%s'\n", str);
+ assert(false);
+}
+
double atof(const char* str)
{
dbgprintf("LibC: atof: '%s'\n", str);