Skip to content
Snippets Groups Projects
Commit c9fbfbd9 authored by Redirect \"Slash\" NIL's avatar Redirect \"Slash\" NIL Committed by David Brownell
Browse files

jim-eventloop for MinGW-w64

Use JIM_WIDE_MODIFIER for the sscanf format, and apply it for MINGW32 as
well as other Windows environments.  (Microsoft doesn't conform to the
C99 standard, and uses "%I64d" not "%lld" for "long long".)

NB: __MINGW32__ should work on both w32 and w64,.
parent 05d67169
Branches
No related tags found
No related merge requests found
...@@ -498,7 +498,7 @@ static int JimELAfterCommand(Jim_Interp *interp, int argc, ...@@ -498,7 +498,7 @@ static int JimELAfterCommand(Jim_Interp *interp, int argc,
int tlen ; int tlen ;
jim_wide remain = 0; jim_wide remain = 0;
const char *tok = Jim_GetString(argv[2], &tlen); const char *tok = Jim_GetString(argv[2], &tlen);
if (sscanf(tok,"after#%lld",&id) == 1) { if (sscanf(tok,"after#%" JIM_WIDE_MODIFIER, &id) == 1) {
remain = Jim_DeleteTimeHandler(interp, id); remain = Jim_DeleteTimeHandler(interp, id);
if (remain > -2) { if (remain > -2) {
Jim_SetResult(interp, Jim_NewIntObj(interp, remain)); Jim_SetResult(interp, Jim_NewIntObj(interp, remain));
......
...@@ -120,7 +120,7 @@ extern "C" { ...@@ -120,7 +120,7 @@ extern "C" {
* ---------------------------------------------------------------------------*/ * ---------------------------------------------------------------------------*/
#ifdef HAVE_LONG_LONG_INT #ifdef HAVE_LONG_LONG_INT
# if defined(_MSC_VER) || defined(__MSVCRT__) # if defined(_MSC_VER) || defined(__MSVCRT__) || defined(__MINGW32__)
# define JIM_WIDE_MODIFIER "I64d" # define JIM_WIDE_MODIFIER "I64d"
# else # else
# define JIM_WIDE_MODIFIER "lld" # define JIM_WIDE_MODIFIER "lld"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment