diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2018-01-03 17:39:24 -0700 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2018-01-03 17:39:24 -0700 |
commit | a6c1ed4716cf02626ea035beb6dd4a921642ba80 (patch) | |
tree | ef582c1b52819e27bdd16097ec03b69799d04ede /newlib/libc/time/gmtime.c | |
parent | f6c9a624fa8a6878a7fb2b02f55e4990a20feb59 (diff) |
Use libc from agbcc instead of standalone newlib\nYou must have AGBCC commit 80d029caec189587f8b9294b6c8a5a489b8f5f88 in order to compile pmd_red.gbalibc
Diffstat (limited to 'newlib/libc/time/gmtime.c')
-rw-r--r-- | newlib/libc/time/gmtime.c | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/newlib/libc/time/gmtime.c b/newlib/libc/time/gmtime.c deleted file mode 100644 index 4f5bbe4..0000000 --- a/newlib/libc/time/gmtime.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * gmtime.c - * Original Author: G. Haley - * - * Converts the calendar time pointed to by tim_p into a broken-down time - * expressed as Greenwich Mean Time (GMT). Returns a pointer to a structure - * containing the broken-down time, or a null pointer if GMT is not - * available. - */ - -/* -FUNCTION -<<gmtime>>---convert time to UTC traditional form - -INDEX - gmtime - -ANSI_SYNOPSIS - #include <time.h> - struct tm *gmtime(const time_t *<[clock]>); - struct tm *gmtime_r(const time_t *<[clock]>, struct tm *<[res]>); - -TRAD_SYNOPSIS - #include <time.h> - struct tm *gmtime(<[clock]>) - const time_t *<[clock]>; - struct tm *gmtime_r(<[clock]>, <[res]>) - const time_t *<[clock]>; - struct tm *<[res]>; - -DESCRIPTION -<<gmtime>> assumes the time at <[clock]> represents a local time. -<<gmtime>> converts it to UTC (Universal Coordinated Time, also known in some -countries as GMT, Greenwich Mean time), then converts the -representation from the arithmetic representation to -the traditional representation defined by <<struct tm>>. - -<<gmtime>> constructs the traditional time representation in static -storage; each call to <<gmtime>> or <<localtime>> will overwrite the -information generated by previous calls to either function. - -RETURNS -A pointer to the traditional time representation (<<struct tm>>). - -PORTABILITY -ANSI C requires <<gmtime>>. - -<<gmtime>> requires no supporting OS subroutines. -*/ - -#include <stdlib.h> -#include <time.h> - -#define _GMT_OFFSET 0 - -#ifndef _REENT_ONLY - -struct tm * -_DEFUN (gmtime, (tim_p), - _CONST time_t * tim_p) -{ - time_t tim = *tim_p + _GMT_OFFSET; - - return (localtime (&tim)); -} - -#endif |