mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
Cleanup in mysql_time.h/my_time.h headers. The first is used in mysql.h,
the second is for the rest of time declarations in mysys. include/my_time.h: New declarations moved from mysql_time.h include/mysql_time.h: New declarations moved to my_time.h. sql/tztime.cc: Enforcing Monty's approach to header files. sql/tztime.h: Enforcing Monty's approach to header files: everything is included in one place.
This commit is contained in:
parent
61528cf2d8
commit
9919574acf
4 changed files with 18 additions and 12 deletions
|
@ -28,6 +28,15 @@ C_MODE_START
|
|||
|
||||
extern ulonglong log_10_int[20];
|
||||
|
||||
/*
|
||||
Portable time_t replacement.
|
||||
Should be signed and hold seconds for 1902-2038 range.
|
||||
*/
|
||||
typedef long my_time_t;
|
||||
|
||||
#define MY_TIME_T_MAX LONG_MAX
|
||||
#define MY_TIME_T_MIN LONG_MIN
|
||||
|
||||
#define YY_PART_YEAR 70
|
||||
|
||||
/* Flags to str_to_datetime */
|
||||
|
|
|
@ -17,7 +17,14 @@
|
|||
#ifndef _mysql_time_h_
|
||||
#define _mysql_time_h_
|
||||
|
||||
/* Time declarations shared between server and client library */
|
||||
/*
|
||||
Time declarations shared between the server and client API:
|
||||
you should not add anything to this header unless it's used
|
||||
(and hence should be visible) in mysql.h.
|
||||
If you're looking for a place to add new time-related declaration,
|
||||
it's most likely my_time.h. See also "C API Handling of Date
|
||||
and Time Values" chapter in documentation.
|
||||
*/
|
||||
|
||||
enum enum_mysql_timestamp_type
|
||||
{
|
||||
|
@ -34,13 +41,4 @@ typedef struct st_mysql_time
|
|||
enum enum_mysql_timestamp_type time_type;
|
||||
} MYSQL_TIME;
|
||||
|
||||
|
||||
/*
|
||||
Portable time_t replacement.
|
||||
Should be signed and hold seconds for 1902-2038 range.
|
||||
*/
|
||||
typedef long my_time_t;
|
||||
#define MY_TIME_T_MAX LONG_MAX
|
||||
#define MY_TIME_T_MIN LONG_MIN
|
||||
|
||||
#endif /* _mysql_time_h_ */
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "mysql_priv.h"
|
||||
#else
|
||||
#include <my_global.h>
|
||||
#include <my_time.h>
|
||||
#include "tztime.h"
|
||||
#include <my_sys.h>
|
||||
#endif
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
#pragma interface /* gcc class interface */
|
||||
#endif
|
||||
|
||||
#include <mysql_time.h>
|
||||
|
||||
#if !defined(TESTTIME) && !defined(TZINFO2SQL)
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue