mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-01 03:53:33 +00:00
8da931a7f6
This program popped up on Hacker News recently. It's the only modern compiler I've ever seen that doesn't have dependencies and is easily modified. So I added all of the missing GNU extensions I like to use which means it might be possible soon to build on non-Linux and have third party not vendor gcc binaries.
19 lines
990 B
C
19 lines
990 B
C
#if 0
|
|
/*─────────────────────────────────────────────────────────────────╗
|
|
│ To the extent possible under law, Justine Tunney has waived │
|
|
│ all copyright and related or neighboring rights to this file, │
|
|
│ as it is written in the following disclaimers: │
|
|
│ • http://unlicense.org/ │
|
|
│ • http://creativecommons.org/publicdomain/zero/1.0/ │
|
|
╚─────────────────────────────────────────────────────────────────*/
|
|
#endif
|
|
#include "third_party/gdtoa/gdtoa.h"
|
|
|
|
/**
|
|
* Converts string to long double.
|
|
*/
|
|
long double strtold(const char *s, char **endptr) {
|
|
long double x;
|
|
strtorx(s, endptr, FPI_Round_near, &x);
|
|
return x;
|
|
}
|