LibM LibC: add fixes for Lua port.

This commit is contained in:
Mustafa Ali CAN 2019-05-29 07:20:04 -04:00 committed by Andreas Kling
parent 5fa8858dfb
commit 3ffb2ad4e0
Notes: sideshowbarker 2024-07-19 13:51:04 +09:00
4 changed files with 41 additions and 1 deletions

View file

@ -22,6 +22,8 @@ __BEGIN_DECLS
#define _IOLBF 1
#define _IONBF 2
#define L_tmpnam 256
struct __STDIO_FILE {
int fd;
int eof;

View file

@ -95,5 +95,30 @@ double fabs(double value)
{
return value < 0 ? -value : value;
}
double log2(double )
{
ASSERT_NOT_REACHED();
}
float log2f(float ){
ASSERT_NOT_REACHED();
}
long double log2l(long double ){
ASSERT_NOT_REACHED();
}
double frexp(double , int *){
ASSERT_NOT_REACHED();
}
float frexpf(float , int *){
ASSERT_NOT_REACHED();
}
long double frexpl(long double , int *){
ASSERT_NOT_REACHED();
}
}

View file

@ -53,4 +53,12 @@ float ldexpf(float, int exp);
double pow(double x, double y);
double log2(double);
float log2f(float);
long double log2l(long double);
double frexp(double, int *);
float frexpf(float, int *);
long double frexpl(long double, int *);
__END_DECLS

View file

@ -1,11 +1,16 @@
#!/bin/sh
PORT_DIR=lua
MAKEOPTS='generic'
INSTALLOPTS="INSTALL_TOP=$SERENITY_ROOT/Root/"
function fetch() {
run_fetch_web "http://www.lua.org/ftp/lua-5.3.5.tar.gz"
run_patch lua.patch -p1
}
function configure() {
run_export_env CC i686-pc-serenity-gcc
}
function run_make() {
run_command make $MAKEOPTS "$@"
}