about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2025-04-12 18:47:34 +0200
committerptitSeb <sebastien.chev@gmail.com>2025-04-12 18:47:34 +0200
commit56f58501ecf0c224322929122c085c6629f27d47 (patch)
tree4b945987c38d9fd8e68c9b1f284347b0ec4e6692 /src
parenta89748e9e5e2ea979ea9fb0c181040dc4096dadb (diff)
downloadbox64-56f58501ecf0c224322929122c085c6629f27d47.tar.gz
box64-56f58501ecf0c224322929122c085c6629f27d47.zip
[BOX32][WRAPPER] Added a few more 32bits symbols to libc
Diffstat (limited to 'src')
-rwxr-xr-xsrc/wrapped32/wrappedlibc.c8
-rwxr-xr-xsrc/wrapped32/wrappedlibc_private.h6
2 files changed, 11 insertions, 3 deletions
diff --git a/src/wrapped32/wrappedlibc.c b/src/wrapped32/wrappedlibc.c
index 2621face..6d9f473f 100755
--- a/src/wrapped32/wrappedlibc.c
+++ b/src/wrapped32/wrappedlibc.c
@@ -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_);
diff --git a/src/wrapped32/wrappedlibc_private.h b/src/wrapped32/wrappedlibc_private.h
index 616ff91a..b725b9b2 100755
--- a/src/wrapped32/wrappedlibc_private.h
+++ b/src/wrapped32/wrappedlibc_private.h
@@ -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