summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorkonstantin@mysql.com <>2004-08-05 14:16:43 -0700
committerkonstantin@mysql.com <>2004-08-05 14:16:43 -0700
commit403b91798a7865717d9b6b296e39a2c6c7238213 (patch)
tree9397442b1136ff001e87120f0c52fde79df7dbc5 /include
parent7c6a4ce7bc7eb9e9b57bcd1907f3403dfa68966d (diff)
downloadmariadb-git-403b91798a7865717d9b6b296e39a2c6c7238213.tar.gz
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.
Diffstat (limited to 'include')
-rw-r--r--include/my_time.h9
-rw-r--r--include/mysql_time.h18
2 files changed, 17 insertions, 10 deletions
diff --git a/include/my_time.h b/include/my_time.h
index 1212f0533e2..1c549ced6b0 100644
--- a/include/my_time.h
+++ b/include/my_time.h
@@ -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 */
diff --git a/include/mysql_time.h b/include/mysql_time.h
index 32da27ba33e..ec67d60dea5 100644
--- a/include/mysql_time.h
+++ b/include/mysql_time.h
@@ -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_ */