[1631] in Athena Bugs

home help back first fref pref prev next nref lref last post

kuang breaks on ultrix 2.2

daemon@ATHENA.MIT.EDU (geer@ATHENA.MIT.EDU)
Thu Jan 12 10:51:05 1989

From: <geer@ATHENA.MIT.EDU>
To: bugs@ATHENA.MIT.EDU
Date: Thu, 12 Jan 89 10:50:28 EST

------- Forwarded Message

Date: Tue, 3 Jan 89 14:54:22 est
From: Michael S. Drooker <miked@deslab.MIT.EDU>
Site: MIT General Research Lab, Cambridge Mass.
To: geer@ATHENA.MIT.EDU
Subject: kuang

Hi Dan,

I have gotten "kuang" from watchmaker directory. I found that it would
not compile directly on our ULTRIX 2.2 system. The problem is in
filewriters.c which produces the following compilation error:

cc -g filewriters.c -o filewriters
filewriters.c: 28: S_GWRITE redefined
filewriters.c: 58: S_IWRITE: macro recursion
filewriters.c: 65: S_IWRITE: macro recursion
*** Error code 1

Stop.

This seems to be caused by the definition of S_GWRITE in
filewriters.c:

..............................extracts from filewriters.c
#include	<stdio.h>
#include	<sys/types.h>
#include	<sys/stat.h>
#include	<grp.h>
#include	<pwd.h>

/* I had to delete this define to get compilation on ULTRIX 2.2
   problem is "recursive"  definition - see /usr/include/sys/stat.h */

/*#define	S_GWRITE	(S_IWRITE >> 3)	   /* Group write access. */

#define	S_OWRITE	(S_IWRITE >> 6)	   /* Other write access. */


line 58...	if (S_GWRITE & (buf.st_mode))  {

line 65...	if (S_OWRITE & buf.st_mode)  {
..................

I suspect that my /usr/include/sys/stat.h is different from the one
running on the ATHENA workstations.

.........................extracts from /usr/include/sys/stat.h

#define	S_GWRITE 0000200	/* write permission, owner */
...
#define	S_IREAD	S_GREAD
...
#define	S_IWRITE	S_GWRITE
.................

Elimination of the define in filewriters.c permitted compilation and
execution, but I don't know how it affected the logic of the program.

Mike D.

------- End of Forwarded Message


home help back first fref pref prev next nref lref last post