slibc
|
00001 /* Copyright (C) 2011-2012 SBA Research gGmbh 00002 00003 This file is part of the Slibc Library. 00004 00005 The Slibc Library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 00010 The Slibc library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with the Slibc Library; if not, see 00017 <http://www.gnu.org/licenses/>. 00018 */ 00023 #include_next <time.h> 00024 00025 // Glibc headers often include time.h only to get some types 00026 // in that case the caller defined __need_TYPE (e.g. __need_time_t) 00027 // If time.h is included in a normal way, it will define the macro _TIME_H 00028 // (Let's hope that this macro name is portable) 00029 #if defined(_TIME_H) && !defined(SLIBC_TIME_H) 00030 #define SLIBC_TIME_H 00031 00032 // TR 24731-1 is not available if __STDC_WANT_LIB_EXT1__ equals 0 00033 #if (!defined(__STDC_WANT_LIB_EXT1__) || (__STDC_WANT_LIB_EXT1__ != 0)) 00034 00035 #include "./base_.h" 00036 #include "./errno.h" 00037 #include "./stddef.h" 00038 00039 SLIBC_BEGIN_DECLS 00040 00063 00064 errno_t asctime_s(char *s, rsize_t maxsize, const struct tm *timeptr); 00065 00066 00091 00092 errno_t ctime_s(char *s, rsize_t maxsize, const time_t *timer); 00093 00094 00109 00110 struct tm *gmtime_s(const time_t * restrict timer, struct tm * restrict result); 00111 00126 00127 struct tm *localtime_s(const time_t * restrict timer, struct tm * restrict result); 00128 00129 SLIBC_END_DECLS 00130 00131 #endif //#if (!defined(__STDC_WANT_LIB_EXT1__) || (__STDC_WANT_LIB_EXT1__ != 0)) 00132 00133 #endif