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

Re: What would it take? (mintlibs)



On Wed, Jun 10, 1998 at 10:49:34PM -0400, Katherine L Ellis wrote:
> Hi, I was porting some app, and hm a simple call wasn't there.
> fchmod() that is.
> What would it take to make fchmod() (unix)= Fchmod() (gemdos) that we
> already have?
> thanks.

This is not so easy.  The fchmod function expects a file descriptor
as its first argument whereas chmod (resp. Fchmod) act upon a filename 
argument and neither the library nor the kernel remember the name of a 
file once you have opened it.

I don't see a way to retrieve the filename from the file descriptor.

Whenever I encountered fchmod in foreign sources I changed the sources
instead.  BTW, is fchmod() portable at all?  IMHO this call doesn't
really fit into the layout of an average Unix filesystem.

Ciao

Guido
-- 
http://stud.uni-sb.de/~gufl0000
mailto:gufl0000@stud.uni-sb.de