locale.c: Silence unused variable compiler warning

On some systems this was unused.  Now that we have C99, we can move the
declaration and some #ifdef's and not declare it unless it is going to
be used.
This commit is contained in:
Karl Williamson 2025-11-09 13:41:59 -07:00 committed by Karl Williamson
parent 4122b31e04
commit a003be9e73

View File

@ -8363,20 +8363,22 @@ S_ints_to_tm(pTHX_ struct tm * mytm,
mytm->tm_year = year;
struct tm * which_tm = mytm;
struct tm aux_tm;
#ifndef HAS_MKTIME
mini_mktime(mytm);
#else
# if defined(HAS_TM_TM_GMTOFF) || defined(HAS_TM_TM_ZONE)
# define ALWAYS_RUN_MKTIME
struct tm aux_tm;
# endif
/* On platforms that have either of these two fields, we have to run the
* libc mktime() in order to set them, as mini_mktime() doesn't deal with
* them. [perl #18238] */
# if defined(HAS_TM_TM_GMTOFF) || defined(HAS_TM_TM_ZONE)
# define ALWAYS_RUN_MKTIME
# endif
/* When isdst is 0, it means to consider daylight savings time as never
* being in effect. Many libc implementations of mktime() do not allow