delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/03/21/11:03:12

Date: Sun, 21 Mar 1999 10:41:48 -0500
Message-Id: <199903211541.KAA04612@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp-workers AT delorie DOT com
In-reply-to: <20bthnlzod.fsf@Sky.inp.nsk.su> (message from Michael Bukin on 21
Mar 1999 19:50:26 +0600)
Subject: Re: Question about porting strategy.
References: <20bthnlzod DOT fsf AT Sky DOT inp DOT nsk DOT su>
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> 1.  This package uses fchown and fchmod routines, how should I emulate
> these correctly (or how to obtain file name from handle)?  Right now I
> just call chown and chmod on "/dev/null".  I think DOS will restrict
> accesses to already opened files and these functions are not that
> useful for DOS anyway.

You can just stub them out with a function that does nothing and
returns success.  The only thing you can change in dos is the write
bit anyway.

> 2.  There are tests for S_ISLNK and S_ISSOCK and also for S_IFLNK and
> S_IFSOCK.  I recall that it was suggested just to define missing
> symbols if they are not already defined.  Is it correct?  And maybe
> these defines should be added in DJGPP anyway?  I know that there is
> no such functionality, but libc calls just will not return those
> values and it can be used for some tweaking with FSEXT (I'm not sure
> about it).

Don't add them.  Properly ported code will use the existence of those
macros to determine if things like symlink() or socket() will work,
and in general, they don't work in DJGPP.

> 3.  This is not a problem, but just an idea.  How feasible is it to
> add support for per program env file.  Then each package can be

Pretty easy, I think.  After parsing djgpp.env, use some variable
(DJENV?) to load a second file.  You know the name of the program, as
djgpp.env uses it already.

Go ahead and try it.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019