Commit 86767f4a authored by Marko Mäkelä's avatar Marko Mäkelä

Remove unused ut_get_year_month_day()

parent c83663e5
/*****************************************************************************
Copyright (c) 1994, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -343,15 +344,6 @@ void
ut_sprintf_timestamp_without_extra_chars(
/*=====================================*/
char* buf); /*!< in: buffer where to sprintf */
/**********************************************************//**
Returns current year, month, day. */
UNIV_INTERN
void
ut_get_year_month_day(
/*==================*/
ulint* year, /*!< out: current year */
ulint* month, /*!< out: month */
ulint* day); /*!< out: day */
#else /* UNIV_HOTBACKUP */
/*************************************************************//**
Runs an idle loop on CPU. The argument gives the desired delay
......
......@@ -344,43 +344,6 @@ ut_sprintf_timestamp_without_extra_chars(
cal_tm_ptr->tm_sec);
#endif
}
/**********************************************************//**
Returns current year, month, day. */
UNIV_INTERN
void
ut_get_year_month_day(
/*==================*/
ulint* year, /*!< out: current year */
ulint* month, /*!< out: month */
ulint* day) /*!< out: day */
{
#ifdef __WIN__
SYSTEMTIME cal_tm;
GetLocalTime(&cal_tm);
*year = (ulint) cal_tm.wYear;
*month = (ulint) cal_tm.wMonth;
*day = (ulint) cal_tm.wDay;
#else
struct tm* cal_tm_ptr;
time_t tm;
#ifdef HAVE_LOCALTIME_R
struct tm cal_tm;
time(&tm);
localtime_r(&tm, &cal_tm);
cal_tm_ptr = &cal_tm;
#else
time(&tm);
cal_tm_ptr = localtime(&tm);
#endif
*year = (ulint) cal_tm_ptr->tm_year + 1900;
*month = (ulint) cal_tm_ptr->tm_mon + 1;
*day = (ulint) cal_tm_ptr->tm_mday;
#endif
}
#endif /* UNIV_HOTBACKUP */
#ifndef UNIV_HOTBACKUP
......
/*****************************************************************************
Copyright (c) 1994, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -343,15 +344,6 @@ void
ut_sprintf_timestamp_without_extra_chars(
/*=====================================*/
char* buf); /*!< in: buffer where to sprintf */
/**********************************************************//**
Returns current year, month, day. */
UNIV_INTERN
void
ut_get_year_month_day(
/*==================*/
ulint* year, /*!< out: current year */
ulint* month, /*!< out: month */
ulint* day); /*!< out: day */
#else /* UNIV_HOTBACKUP */
/*************************************************************//**
Runs an idle loop on CPU. The argument gives the desired delay
......
......@@ -368,43 +368,6 @@ ut_sprintf_timestamp_without_extra_chars(
cal_tm_ptr->tm_sec);
#endif
}
/**********************************************************//**
Returns current year, month, day. */
UNIV_INTERN
void
ut_get_year_month_day(
/*==================*/
ulint* year, /*!< out: current year */
ulint* month, /*!< out: month */
ulint* day) /*!< out: day */
{
#ifdef __WIN__
SYSTEMTIME cal_tm;
GetLocalTime(&cal_tm);
*year = (ulint) cal_tm.wYear;
*month = (ulint) cal_tm.wMonth;
*day = (ulint) cal_tm.wDay;
#else
struct tm* cal_tm_ptr;
time_t tm;
#ifdef HAVE_LOCALTIME_R
struct tm cal_tm;
time(&tm);
localtime_r(&tm, &cal_tm);
cal_tm_ptr = &cal_tm;
#else
time(&tm);
cal_tm_ptr = localtime(&tm);
#endif
*year = (ulint) cal_tm_ptr->tm_year + 1900;
*month = (ulint) cal_tm_ptr->tm_mon + 1;
*day = (ulint) cal_tm_ptr->tm_mday;
#endif
}
#endif /* UNIV_HOTBACKUP */
#ifndef UNIV_HOTBACKUP
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment