OSDN Git Service

* acinclude.m4 (LIBGFOR_CHECK_ATTRIBUTE_VISIBILITY): New.
[pf3gnuchains/gcc-fork.git] / libgfortran / intrinsics / cpu_time.c
index 887debc..58f2253 100644 (file)
@@ -101,29 +101,43 @@ __cpu_time_1 (long *sec, long *usec)
 #endif  /* HAVE_GETRUSAGE */
 }
 
-#undef CPU_TIME
-#define CPU_TIME(KIND)                                         \
-void prefix(cpu_time_##KIND) (GFC_REAL_##KIND *__time)         \
-{                                                              \
-  long sec, usec;                                              \
-  __cpu_time_1 (&sec, &usec);                                  \
-  *__time = (GFC_REAL_##KIND) sec +                            \
-               ((GFC_REAL_##KIND) usec) * 1.e-6;               \
+extern void cpu_time_4 (GFC_REAL_4 *);
+iexport_proto(cpu_time_4);
+
+void cpu_time_4 (GFC_REAL_4 *time)
+{
+  long sec, usec;
+  __cpu_time_1 (&sec, &usec);
+  *time = sec + usec * (GFC_REAL_4)1.e-6;
 }
+iexport(cpu_time_4);
 
-CPU_TIME(4)
-CPU_TIME(8)
+extern void cpu_time_8 (GFC_REAL_8 *);
+export_proto(cpu_time_8);
+
+void cpu_time_8 (GFC_REAL_8 *time)
+{
+  long sec, usec;
+  __cpu_time_1 (&sec, &usec);
+  *time = sec + usec * (GFC_REAL_8)1.e-6;
+}
+
+extern void second_sub (GFC_REAL_4 *);
+export_proto(second_sub);
 
 void
-prefix(second_sub) (GFC_REAL_4 *s)
+second_sub (GFC_REAL_4 *s)
 {
-  prefix(cpu_time_4)(s);
+  cpu_time_4 (s);
 }
 
+extern GFC_REAL_4 second (void);
+export_proto(second);
+
 GFC_REAL_4
-prefix(second) (void)
+second (void)
 {
   GFC_REAL_4 s;
-  prefix(cpu_time_4)(&s);
+  cpu_time_4 (&s);
   return s;
 }