aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/intrinsics/date_and_time.c
diff options
context:
space:
mode:
authorJanne Blomqvist <jb@gcc.gnu.org>2011-11-09 20:25:58 +0200
committerJanne Blomqvist <jb@gcc.gnu.org>2011-11-09 20:25:58 +0200
commit745443787599147145baf2c0cdfe8ef463944a9c (patch)
tree8b9c2e9bcc9e893681a7abd25852a18d141f8f6d /libgfortran/intrinsics/date_and_time.c
parent4b6245331eca422062484f2f92f3bd8b4f868804 (diff)
downloadgcc-745443787599147145baf2c0cdfe8ef463944a9c.zip
gcc-745443787599147145baf2c0cdfe8ef463944a9c.tar.gz
gcc-745443787599147145baf2c0cdfe8ef463944a9c.tar.bz2
Configure cleanup.
2011-11-09 Janne Blomqvist <jb@gcc.gnu.org> * configure.ac (AC_STDC_HEADERS): Remove. (AC_HEADER_TIME): Remove. (AC_HAVE_HEADERS, AC_CHECK_HEADERS): Move into a single invocation of AC_CHECK_HEADERS_ONCE, don't check for presence of C89 headers. (AC_CHECK_MEMBERS): Use single invocation. (AC_CHECK_FUNCS): Move into single invocation of AC_CHEC_FUNCS_ONCE, don't check for presence of C89 functions. * config.h.in: Regenerate. * configure: Regenerate. * intrinsics/clock.c: Include time.h. (mclock): Assume clock() is present. (mclock8): Likewise. * intrinsics/ctime.c (strctime): Assume strftime is present. (fdate): Assume time() is present. (fdate_sub): Likewise. (ctime): Likewise. * intrinsics/date_and_time.c: Don't provide abs macro. (HAVE_NO_DATE_TIME): Remove code related to macro which is never set. * intrinsics/execute_command_line.c: Assume stdlib.h is present. * intrinsics/exit.c: Likewise. * intrinsics/extends_type_of.c: Likewise. * intrinsics/gerror.c: Assume strerror() is present. * intrinsics/kill.c: Assume signal.h is present. * intrinsics/malloc.c: Assume stdlib.h is present. * intrinsics/move_alloc.c: Likewise. * intrinsics/perror.c: Assume perror() is present. * intrinsics/signal.c: Assume signal.h is present. * intrinsics/stat.c: Assume stdlib.h is present. * intrinsics/system.c: Likewise. * intrinsics/time.c: Include time.h, assume time() is present. * intrinsics/time_1.h: Conditionally include sys/time.h, unconditionally time.h. (gf_cputime): Do division in double, fallback using clock(). (gf_gettime): Assume time() is present. * intrinsics/umask.c: Assume stdlib.h is present. * runtime/backtrace.c: Likewise. * runtime/compile_options.c: Assume signal.h is present, assume C89 signals are present. * runtime/error.c: Assume signal.h and stdlib.h are present. From-SVN: r181227
Diffstat (limited to 'libgfortran/intrinsics/date_and_time.c')
-rw-r--r--libgfortran/intrinsics/date_and_time.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/libgfortran/intrinsics/date_and_time.c b/libgfortran/intrinsics/date_and_time.c
index fa51d5f..3c38636 100644
--- a/libgfortran/intrinsics/date_and_time.c
+++ b/libgfortran/intrinsics/date_and_time.c
@@ -31,10 +31,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "time_1.h"
-#ifndef abs
-#define abs(x) ((x)>=0 ? (x) : -(x))
-#endif
-
/* If the re-entrant version of gmtime is not available, provide a
fallback implementation. On some targets where the _r version is
@@ -143,7 +139,6 @@ date_and_time (char *__date, char *__time, char *__zone,
char zone[ZONE_LEN + 1];
GFC_INTEGER_4 values[VALUES_SIZE];
-#ifndef HAVE_NO_DATE_TIME
time_t lt;
struct tm local_time;
struct tm UTC_time;
@@ -193,21 +188,6 @@ date_and_time (char *__date, char *__time, char *__zone,
for (i = 0; i < VALUES_SIZE; i++)
values[i] = - GFC_INTEGER_4_HUGE;
}
-#else /* if defined HAVE_NO_DATE_TIME */
- /* We really have *nothing* to return, so return blanks and HUGE(0). */
-
- memset (date, ' ', DATE_LEN);
- date[DATE_LEN] = '\0';
-
- memset (timec, ' ', TIME_LEN);
- timec[TIME_LEN] = '\0';
-
- memset (zone, ' ', ZONE_LEN);
- zone[ZONE_LEN] = '\0';
-
- for (i = 0; i < VALUES_SIZE; i++)
- values[i] = - GFC_INTEGER_4_HUGE;
-#endif /* HAVE_NO_DATE_TIME */
/* Copy the values into the arguments. */
if (__values)
@@ -321,7 +301,6 @@ secnds (GFC_REAL_4 *x)
static void
itime0 (int x[3])
{
-#ifndef HAVE_NO_DATE_TIME
time_t lt;
struct tm local_time;
@@ -335,9 +314,6 @@ itime0 (int x[3])
x[1] = local_time.tm_min;
x[2] = local_time.tm_sec;
}
-#else
- x[0] = x[1] = x[2] = -1;
-#endif
}
extern void itime_i4 (gfc_array_i4 *);
@@ -403,7 +379,6 @@ itime_i8 (gfc_array_i8 *__values)
static void
idate0 (int x[3])
{
-#ifndef HAVE_NO_DATE_TIME
time_t lt;
struct tm local_time;
@@ -417,9 +392,6 @@ idate0 (int x[3])
x[1] = 1 + local_time.tm_mon;
x[2] = 1900 + local_time.tm_year;
}
-#else
- x[0] = x[1] = x[2] = -1;
-#endif
}
extern void idate_i4 (gfc_array_i4 *);