[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inquiring cttys



Juergen Lock <nox@jelal.north.de> writes:

|> 	volatile struct stat sb;

|> 	*(short *)&sb = fd;	/* -1 for /dev/tty */
|> 	if (r = Fcntl(procf, &sb, PFSTAT))
|> 		error ...
|> 	find device...

|> (volatile seems necessary because of the gcc Fcntl binding(?), can this be
|> fixed?)

This should not be necessary with newer gcc's, where the pseudo
register "memory" can be specified as being clobbered in the asm spec.
I think this is taken care of in the current MiNTlibs.

Andreas.
-- 
----------------------------------------------------------------------
Andreas Schwab                                  "And now for something
schwab@ls5.informatik.uni-dortmund.de            completely different"