Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Noah Lee Gibbs <noah@trout.res.cmu.edu>
Subject: Kernel Bug?
Date: Sun, 18 Feb 1996 10:27:28 -0500	[thread overview]
Message-ID: <5089c8e9bc1450e9daa3c49c15181680.axp-list@archive.invalid> (raw)

I have a 1.3.43 kernel, so this may be fixed, but I don't have time
to upgrade and check a new version right now.  I did check against an
older 1.1.XX Intel kernel, where this problem does not occur.

	Looking at the kernel, this seems to be because time.h defines
time_t to be a long (or unsigned long, I forget) while asm/stat.h defines
it to be an unsigned int for both new_stat and old_stat.  I include the code
that I found this bug with below.

From Mindy (CMU's Dylan bytecode interpreter), file comp/dump.c:

void dump_setup_output(char *source, FILE *file)
{
	struct stat buf;
	time_t tv;
	int statres;

/* ---- Snip! ---- */

	statres = stat(source, &buf);
	if(statres >= 0)
		fprintf(File, "# last modified on %s", ctime(&buf.st_mtime));
/* ---- Et cetera ---- */

The 1.1.XX intel kernel has no problem with this.  However, my 1.3.43 with
GCC 2.7.0 warns "passing arg 1 of ctime from incompatible pointer type".

                 reply	other threads:[~1996-02-18 15:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox