#define UTMPFILE "/etc/utmp"
-#ifdef USG
+#ifdef __USG
struct utmp {
char ut_name[8];
char ut_id[4];
struct utmp {
char ut_line[8];
char ut_name[8];
-#ifdef BSD4_2
+#ifdef __BSD4_2
char ut_host[16];
#endif
long ut_time;
return d - (d - first) % 7;
}
+dysize(y)
+{
+ /* compatibility */
+ return YEARSIZE(y);
+}
+
extern struct tm *gmtime();
struct tm *
#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
*/
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;
}
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;
-#ifdef USG
+#ifdef __USG
/* system V, so no /etc/ttys file. In this case, scan the
/etc/utmp file
*/
register char *tp, *p;
int fd;
int retval = 1;
-#ifdef USG
+#ifdef __USG
struct utmp buf;
#else
char buf[32];
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
-#ifdef BSD4_2
+#ifdef __BSD4_2
struct timeval {
long tv_sec, tv_usec;
};
int tz_minuteswest, tz_dsttime;
};
#else
-#ifndef USG
+#ifndef __USG
#include <sys/types.h>
struct timeb
{
#endif
#endif
-#ifdef USG
+#ifdef __USG
long timezone = -1 * 60;
int daylight = 1;
char *tzname[] = {"MET", "MDT",};
tzset()
{
-#ifdef BSD4_2
+#ifdef __BSD4_2
struct timeval tval;
struct timezone tzon;
__timezone = tzon.tz_minuteswest * 60L;
__daylight = tzon.tz_dsttime;
#else
-#ifndef USG
+#ifndef __USG
struct timeb time;
ftime(&time);
strncpy(__tzname[1], p, 3);
}
}
-#ifdef USG
+#ifdef __USG
timezone = __timezone;
daylight = __daylight;
tzname[0] = __tzname[0];