Repository navigation
Fix time_t typedef redefinition in tu_timer.cpp - #25
Conversation
Avoid redefining time_t on Windows (_WIN32), WebAssembly/Emscripten (__EMSCRIPTEN__), or platforms where _TIME_T_DEFINED / __time_t_defined are set. This resolves MSVC C3646/C2039 errors on Windows and type redefinition errors on WebAssembly. Co-authored-by: ClausValcaTD <193546948+ClausValcaTD@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Include system <time.h> before the time_t typedef check so system headers declare time_t on Windows, Emscripten, macOS, and Linux platforms. Fixes time_t unknown type errors on MSVC and WebAssembly. Co-authored-by: ClausValcaTD <193546948+ClausValcaTD@users.noreply.github.com>
Include system <time.h> and <sys/time.h> before the time_t guard block to ensure time_t is declared by standard headers across Windows, WebAssembly/Emscripten, macOS, and Linux. Populate struct timeb members in ftime() to prevent uninitialized garbage time values causing runtime assertion/SIGTRAP crashes. Co-authored-by: ClausValcaTD <193546948+ClausValcaTD@users.noreply.github.com>
Include system <time.h> and <sys/time.h> in tu_timer.cpp so system definitions for time_t are available on Windows, Emscripten, macOS, and Linux. Populate struct timeb in ftime() and fallback s_start_time in get_ticks() to prevent uninitialized memory arithmetic crashes. Co-authored-by: ClausValcaTD <193546948+ClausValcaTD@users.noreply.github.com>
Fixes time_t typedef redefinition in third_party/gameswf/base/tu_timer.cpp to prevent build failures on MSVC (Windows) and Emscripten (WebAssembly).
PR created automatically by Jules for task 16965233988673410312 started by @ClausValcaTD