From: ceriel Date: Tue, 10 Mar 1987 15:07:26 +0000 (+0000) Subject: __USG and __BSD4_2 introduced, dysize added X-Git-Tag: release-5-5~4447 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=76fea1fbcae10ba1ed690075d0f973dddd7699c8;p=ack.git __USG and __BSD4_2 introduced, dysize added --- diff --git a/lang/cem/libcc/gen/getlogin.c b/lang/cem/libcc/gen/getlogin.c index 5fb25f42d..040a9914c 100644 --- a/lang/cem/libcc/gen/getlogin.c +++ b/lang/cem/libcc/gen/getlogin.c @@ -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; diff --git a/lang/cem/libcc/gen/localtime.c b/lang/cem/libcc/gen/localtime.c index b8e205ff4..36c5a2a6f 100644 --- a/lang/cem/libcc/gen/localtime.c +++ b/lang/cem/libcc/gen/localtime.c @@ -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 * diff --git a/lang/cem/libcc/gen/readdir.c b/lang/cem/libcc/gen/readdir.c index fb8ea6034..b791038a6 100644 --- a/lang/cem/libcc/gen/readdir.c +++ b/lang/cem/libcc/gen/readdir.c @@ -1,7 +1,7 @@ #include #include -#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; diff --git a/lang/cem/libcc/gen/ttyslot.c b/lang/cem/libcc/gen/ttyslot.c index d9969e073..bfa9933c0 100644 --- a/lang/cem/libcc/gen/ttyslot.c +++ b/lang/cem/libcc/gen/ttyslot.c @@ -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 diff --git a/lang/cem/libcc/gen/tzset.c b/lang/cem/libcc/gen/tzset.c index 04a85f814..6121241f3 100644 --- a/lang/cem/libcc/gen/tzset.c +++ b/lang/cem/libcc/gen/tzset.c @@ -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 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];