__USG and __BSD4_2 introduced, dysize added
authorceriel <none@none>
Tue, 10 Mar 1987 15:07:26 +0000 (15:07 +0000)
committerceriel <none@none>
Tue, 10 Mar 1987 15:07:26 +0000 (15:07 +0000)
lang/cem/libcc/gen/getlogin.c
lang/cem/libcc/gen/localtime.c
lang/cem/libcc/gen/readdir.c
lang/cem/libcc/gen/ttyslot.c
lang/cem/libcc/gen/tzset.c

index 5fb25f4..040a991 100644 (file)
@@ -1,6 +1,6 @@
 #define UTMPFILE "/etc/utmp"
 
-#ifdef USG
+#ifdef __USG
 struct utmp {
        char ut_name[8];
        char ut_id[4];
@@ -17,7 +17,7 @@ struct utmp {
 struct utmp {
        char    ut_line[8];
        char    ut_name[8];
-#ifdef BSD4_2
+#ifdef __BSD4_2
        char    ut_host[16];
 #endif
        long    ut_time;
index b8e205f..36c5a2a 100644 (file)
@@ -16,6 +16,12 @@ last_sunday(d, t)
        return d - (d - first) % 7;
 }
 
+dysize(y)
+{
+       /* compatibility */
+       return YEARSIZE(y);
+}
+
 extern struct tm *gmtime();
 
 struct tm *
index fb8ea60..b791038 100644 (file)
@@ -1,7 +1,7 @@
 #include <sys/types.h>
 #include <sys/dir.h>
 
-#ifndef BSD4_2
+#ifndef __BSD4_2
 /*
  * read an old stlye directory entry and present it as a new one
  */
@@ -32,7 +32,7 @@ register DIR *dirp;
                                dirp->dd_size = 0;
                                return NULL;
                        }
-#ifdef BSD4_2
+#ifdef __BSD4_2
                        if (! ((struct direct *) dirp->dd_buf)->d_ino) {
                                dirp->dd_loc += ((struct direct *)dirp->dd_buf)->d_reclen;
                        }
@@ -43,7 +43,7 @@ register DIR *dirp;
                        continue;
                }
                dp = (struct olddirect *) (dirp->dd_buf + dirp->dd_loc);
-#ifndef BSD4_2
+#ifndef __BSD4_2
                dirp->dd_loc += sizeof (struct olddirect);
                if (dp->od_ino == 0)
                        continue;
index d9969e0..bfa9933 100644 (file)
@@ -1,4 +1,4 @@
-#ifdef USG
+#ifdef __USG
 /*     system V, so no /etc/ttys file. In this case, scan the
        /etc/utmp file
 */
@@ -27,7 +27,7 @@ ttyslot()
        register char *tp, *p;
        int fd;
        int retval = 1;
-#ifdef USG
+#ifdef __USG
        struct utmp buf;
 #else
        char buf[32];
@@ -40,7 +40,7 @@ ttyslot()
        else
                p++;
        if ((fd = open(FILENAME, 0)) < 0) return 0;
-#ifdef USG
+#ifdef __USG
        while (read(fd, (char *) &buf, sizeof(buf)) == sizeof(buf)) {
                /* processes associated with a terminal ...
                   unfortunately we cannot use the include file because
index 04a85f8..6121241 100644 (file)
@@ -1,4 +1,4 @@
-#ifdef BSD4_2
+#ifdef __BSD4_2
 struct timeval {
        long tv_sec, tv_usec;
 };
@@ -6,7 +6,7 @@ struct timezone {
        int tz_minuteswest, tz_dsttime;
 };
 #else
-#ifndef USG
+#ifndef __USG
 #include <sys/types.h>
 struct timeb
 {
@@ -18,7 +18,7 @@ struct timeb
 #endif
 #endif
 
-#ifdef USG
+#ifdef __USG
 long   timezone = -1 * 60;
 int    daylight = 1;
 char   *tzname[] = {"MET", "MDT",};
@@ -30,7 +30,7 @@ char *__tzname[] = {"MET", "MDT", };
 
 tzset()
 {
-#ifdef BSD4_2
+#ifdef __BSD4_2
        struct timeval tval;
        struct timezone tzon;
 
@@ -38,7 +38,7 @@ tzset()
        __timezone = tzon.tz_minuteswest * 60L;
        __daylight = tzon.tz_dsttime;
 #else
-#ifndef USG
+#ifndef __USG
        struct timeb time;
 
        ftime(&time);
@@ -70,7 +70,7 @@ tzset()
                strncpy(__tzname[1], p, 3);
        }
        }
-#ifdef USG
+#ifdef __USG
        timezone = __timezone;
        daylight = __daylight;
        tzname[0] = __tzname[0];