[BOX32][WRAPPER] Added a few more 32bits symbols to libc

This commit is contained in:
ptitSeb 2025-04-12 18:47:34 +02:00
parent a89748e9e5
commit 56f58501ec
2 changed files with 11 additions and 3 deletions

View File

@ -3327,11 +3327,17 @@ EXPORT ptr_t my32_stderr = 0;
EXPORT int __libc_enable_secure = 1;
EXPORT ptr_t my32_tzname[2];
EXPORT long_t my32_timezone = 0;
EXPORT long_t my32___timezone = 0;
EXPORT void my32_tzset()
{
tzset();
my32_timezone = to_long(timezone); // this might not be usefull, and we can probably just redirect to the original symbol
my32___timezone = to_long(timezone);
my32_tzname[0] = to_cstring(tzname[0]);
my32_tzname[1] = to_cstring(tzname[1]);
}
EXPORT int my32___libc_single_threaded = 0;
@ -3387,6 +3393,8 @@ void libc32_net_init();
my32___progname_full = my32_program_invocation_name = box64->argv[0]; \
my32___progname = my32_program_invocation_short_name = \
strrchr(box64->argv[0], '/'); \
my32_tzname[0] = to_cstring(tzname[0]); \
my32_tzname[1] = to_cstring(tzname[1]); \
my32_stdin = to_ptrv(my__IO_2_1_stdin_); \
my32_stdout = to_ptrv(my__IO_2_1_stdout_); \
my32_stderr = to_ptrv(my__IO_2_1_stderr_);

View File

@ -104,7 +104,7 @@ GOWM(backtrace_symbols, pEEpi)
//GO(__backtrace_symbols_fd, vEpii)
//GOW(backtrace_symbols_fd, vEpii)
GO(basename, pEp)
//GOW(bcmp, iEppL)
GOW(bcmp, iEppL)
//GO(bcopy, vEppL)
// bdflush
GOW(bind, iEipu)
@ -1844,7 +1844,7 @@ GO(timerfd_create, iEii)
GO(timerfd_settime, iEiirLL_BLL_)
GOW(times, iEBllll_)
DATAM(timezone, 4)
//DATAB(__timezone, 4) // type B
DATAM(__timezone, 4) // type B
GO(tmpfile, pEv)
GO(tmpfile64, pEv)
GO(tmpnam, pEp)
@ -1878,7 +1878,7 @@ GO(truncate64, iESU)
// __ttyname_r_chk
// ttyslot
// twalk // Weak
//DATAV(tzname, 4)
DATAM(tzname, 4)
//DATA(__tzname, 4)
GOWM(tzset, vEv) //%%,noE
// ualarm