]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
sys_clock_.c: File renamed from system_clock_.c.
authorPhilippe De Muyter <phdm@info.ucl.ac.be>
Wed, 1 Oct 1997 07:43:22 +0000 (09:43 +0200)
committerJeff Law <law@gcc.gnu.org>
Wed, 1 Oct 1997 07:43:22 +0000 (01:43 -0600)
        * libU77/sys_clock_.c: File renamed from system_clock_.c.
        libU77/Makefile.in, Makefile.in : Reference sys_clock_.*, not
        system_clock_.*.
        * libU77/dtime_.c (clk_tck): Try also HZ macro.
        * libU77/access.c (G77_access_0): Check malloc return value against 0,
        not NULL.
        libU77/getlog_.c, libU77/ttynam_.c, libU77/chdir_.c: Ditto.
        libU77/chmod_.c, libU77/rename_.c: Ditto.

From-SVN: r15821

12 files changed:
gcc/f/runtime/ChangeLog.egcs
gcc/f/runtime/Makefile.in
gcc/f/runtime/libU77/Makefile.in
gcc/f/runtime/libU77/access_.c
gcc/f/runtime/libU77/chdir_.c
gcc/f/runtime/libU77/chmod_.c
gcc/f/runtime/libU77/dtime_.c
gcc/f/runtime/libU77/etime_.c
gcc/f/runtime/libU77/getlog_.c
gcc/f/runtime/libU77/rename_.c
gcc/f/runtime/libU77/sys_clock_.c [moved from gcc/f/runtime/libU77/system_clock_.c with 98% similarity]
gcc/f/runtime/libU77/ttynam_.c

index 0627d937acfc3497f149af11460116e42d3b09a0..5523b1e19a96475c4d1d15eaad56166b58af322b 100644 (file)
@@ -1,3 +1,14 @@
+Wed Oct  1 01:46:16 1997  Philippe De Muyter  <phdm@info.ucl.ac.be>
+
+       * libU77/sys_clock_.c: File renamed from system_clock_.c.
+       libU77/Makefile.in, Makefile.in : Reference sys_clock_.*, not
+       system_clock_.*.
+       * libU77/dtime_.c (clk_tck): Try also HZ macro.
+       * libU77/access.c (G77_access_0): Check malloc return value against 0,
+       not NULL.
+       libU77/getlog_.c, libU77/ttynam_.c, libU77/chdir_.c: Ditto.
+       libU77/chmod_.c, libU77/rename_.c: Ditto.
+
 1997-09-19  Dave Love  <d.love@dl.ac.uk>
 
        * libU77/dtime_.c (G77_dtime_0): Fix types in HAVE_GETRUSAGE case
index 5e019e55f5b69a17810691781c25462779bd769f..53275b918e39daffe4184aae78e899a70fefac8d 100644 (file)
@@ -131,7 +131,7 @@ UOBJ =  libU77/VersionU.o libU77/gerror_.o libU77/perror_.o libU77/ierrno_.o \
        libU77/vxtidate_.o libU77/gmtime_.o libU77/fdate_.o libU77/secnds_.o \
        libU77/bes.o libU77/dbes.o libU77/chdir_.o libU77/chmod_.o \
        libU77/lnblnk_.o libU77/hostnm_.o libU77/rename_.o libU77/fgetc_.o \
-       libU77/fputc_.o libU77/umask_.o libU77/system_clock_.o libU77/date_.o \
+       libU77/fputc_.o libU77/umask_.o libU77/sys_clock_.o libU77/date_.o \
        libU77/second_.o libU77/flush1_.o libU77/alarm_.o libU77/mclock_.o \
        libU77/symlnk_.o
 
index 2e6846b23deade38301de7c269943e6e214f4a94..c307bedfa38630858fc5f894809d27719fe4f972 100644 (file)
@@ -58,7 +58,7 @@ OBJS =  VersionU.o gerror_.o perror_.o ierrno_.o itime_.o time_.o \
         vxttime_.o vxtidate_.o gmtime_.o fdate_.o secnds_.o \
        bes.o dbes.o \
        chdir_.o chmod_.o lnblnk_.o hostnm_.o rename_.o fgetc_.o fputc_.o \
-        umask_.o system_clock_.o date_.o second_.o flush1_.o mclock_.o \
+        umask_.o sys_clock_.o date_.o second_.o flush1_.o mclock_.o \
        alarm_.o
 SRCS =  Version.c gerror_.c perror_.c ierrno_.c itime_.c time_.c \
        unlink_.c fnum_.c getpid_.c getuid_.c getgid_.c kill_.c rand_.c \
@@ -68,7 +68,7 @@ SRCS =  Version.c gerror_.c perror_.c ierrno_.c itime_.c time_.c \
         vxttime_.c vxtidate_.c gmtime_.c fdate_.c secnds_.c \
        bes.c dbes.c \
        chdir_.c chmod_.c lnblnk_.c hostnm_.c rename_.c fgetc_.c fputc_.c \
-       umask_.c system_clock_.c date_.c second_.c flush1_.c mclock_.c \
+       umask_.c sys_clock_.c date_.c second_.c flush1_.c mclock_.c \
        alarm_.c
 
 F2C_H = ../../../include/f2c.h
@@ -146,7 +146,7 @@ hostnm_.o: hostnm_.c
 rename_.o: rename_.c
 fputc_.o: fputc_.c
 fgetc_.o: fgetc_.c
-system_clock_.o: system_clock_.c
+sys_clock_.o: sys_clock_.c
 umask_.o: umask_.c
 flush1_.o: flush1_.c
 mclock_.o: mclock_.c
index 1699ef065f2fb98c31312c4c14e36fc1ab7ee2a7..fefdebb0d8dcb87b7df2b8ed4abc93930b5c10f6 100644 (file)
@@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA.  */
 #if HAVE_STDLIB_H
 #  include <stdlib.h>
 #else
-#  include <stdio.h>           /* for NULL */
+#  include <stdio.h>
 #endif
 
 #include <errno.h>
@@ -62,7 +62,7 @@ integer G77_access_0 (const char *name, const char *mode, ftnlen Lname, ftnlen L
   int amode, i;
 
   buff = malloc (Lname+1);
-  if (buff == NULL) return -1;
+  if (!buff) return -1;
   g_char (name, Lname, buff);
   amode = 0;
   for (i=0;i<Lmode;i++) {
index 500be54fbe6d95e4fe2369822413f42fe3a1e767..9bd53fb95d7f86c76dc66789aba6a1080ad21d07 100644 (file)
@@ -49,7 +49,7 @@ integer G77_chdir_0 (const char *name, const ftnlen Lname)
   int i;
 
   buff = malloc (Lname+1);
-  if (buff == NULL) return -1;
+  if (!buff) return -1;
   g_char (name, Lname, buff);
   i = chdir (buff);
   free (buff);
index 9797b80f3f5f6be0de2e74d564243e1839845077..7ca05b7604d0608fb33699dece96c40dff9531cf 100644 (file)
@@ -29,7 +29,7 @@ Boston, MA 02111-1307, USA.  */
 #if HAVE_STDLIB_H
 #  include <stdlib.h>
 #else
-#  include <stdio.h>           /* for NULL */
+#  include <stdio.h>
 #endif
 
 #include "f2c.h"
@@ -62,7 +62,7 @@ integer G77_chmod_0 (/* const */ char *name, /* const */ char *mode, const ftnle
   char chmod_path [] = CHMOD_PATH;
   l = strlen (chmod_path);
   buff = malloc (Lname+Lmode+l+3+13+1);
-  if (buff == NULL) return -1;
+  if (!buff) return -1;
   ii[0] = l; a[0] = chmod_path;
   ii[1] = 1; a[1] = " ";
   ii[2] = Lmode; a[2] = mode;
index 9569db3fae016257ec785674eb1fdde36125132e..dfc3fde34cf0777dc1f45c1c0a5fbc65fd2bc651 100644 (file)
@@ -22,7 +22,9 @@ Boston, MA 02111-1307, USA.  */
 #if HAVE_UNISTD_H
 #  include <unistd.h>
 #endif
+#include <sys/types.h>
 #include <sys/times.h>
+#include <sys/param.h>
 #if HAVE_GETRUSAGE
 #  include <sys/time.h>
 #  include <sys/resource.h>
@@ -70,6 +72,8 @@ double G77_dtime_0 (real tarray[2])
   if (! clk_tck) clk_tck = CLOCKS_PER_SECOND;
 #  elif defined CLK_TCK
   if (! clk_tck) clk_tck = CLK_TCK;
+#  elif defined HZ
+  if (! clk_tck) clk_tck = HZ;
 #  elif defined HAVE_GETRUSAGE
 #  else
   #error Dont know clock tick length
index fa6ccfb0d4d4e10359014cd92d98910f16ab78aa..625d3d06d2a9a5af4899ff48fae098f61c2d10d8 100644 (file)
@@ -66,6 +66,8 @@ double G77_etime_0 (real tarray[2])
   if (! clk_tck) clk_tck = CLOCKS_PER_SECOND;
 #  elif defined CLK_TCK
   if (! clk_tck) clk_tck = CLK_TCK;
+#  elif defined HZ
+  if (! clk_tck) clk_tck = HZ;
 #  elif defined HAVE_GETRUSAGE
 #  else
   #error Dont know clock tick length
index a2c5f20f28b0b9f18174b5169e8ff91e637b2c3a..1c2f7db1ce1962a8246891f469f9a484ef49ae73 100644 (file)
@@ -19,6 +19,7 @@ Boston, MA 02111-1307, USA.  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
+#include <sys/types.h>
 #if HAVE_STDLIB_H
 #  include <stdlib.h>
 #else
index e8a4bf6523c4244447c18aeb7362b567b53d4550..9583001c42184e7452f1c44041018ac18ec4aa67 100644 (file)
@@ -19,6 +19,9 @@ Boston, MA 02111-1307, USA.  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
+#if HAVE_UNISTD_H
+#  include <unistd.h>
+#endif
 #if HAVE_STDLIB_H
 #  include <stdlib.h>
 #endif
similarity index 98%
rename from gcc/f/runtime/libU77/system_clock_.c
rename to gcc/f/runtime/libU77/sys_clock_.c
index d5cbaac0608aad4bfa0668e35dbd550a384eb249..5644d497906f1bde2d57f374a2398f791ee57e03 100644 (file)
@@ -51,6 +51,8 @@ int G77_system_clock_0 (integer *count, integer *count_rate, integer *count_max)
   *count_rate = CLOCKS_PER_SECOND;
 #elif defined CLK_TCK
   *count_rate = CLK_TCK;
+#elif defined HZ
+  *count_rate = HZ;
 #else
   #error Dont know clock tick length
 #endif
index f69aa43f564c09b6ab3aac639b637a834e4ffbb1..12b50191fe382c1a51cade9b1410cde4dab19b42 100644 (file)
@@ -19,6 +19,7 @@ Boston, MA 02111-1307, USA.  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
+#include <sys/types.h>
 #if STDC_HEADERS
 #  include <stdlib.h>
 #endif