Re: porting guidance needed for HP MPE/iX OS
| From: | Sascha Schumann | Date: | Fri, 18 Aug 2000 20:34:10 +0000 |
| Subject: | Re: porting guidance needed for HP MPE/iX OS | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-29528@lists.php.net to get a copy of this message | ||
> Now I'm making amends by porting PHP 4.0.1pl2. Most of the effort involved
> porting GNU libtool which hasn't really been used on MPE prior to my working on
> PHP4. Now I'm down to the final 3 libphp4.so unresolved external references
> for functions the MPE kernel lacks.
Which version of libtool did you port? The current HEAD CVS
or the ML branch?
> This time I want to be sure to submit my diffs back to php-dev, so I'd like to
> get some advice on how best to complete this port in a way that will make it
> easy for you to absorb my diffs. So on with my questions...
>
> The final unresolved externals are:
>
> 1) fsync (I have a non-kernel implementation of this)
> 2) ftruncate (I have a non-kernel implementation for this)
> 3) realpath (I lack an implementation for this)
>
> First question -- I see you have your own implementation of realpath in
> main/php_realpath.c in the form of php_realpath(). Instead of having other
> parts of your code call realpath(), why not call your own php_realpath()?
> Should I take this approach in my port?
We should use the OS function, if it exists. So, defining a
macro like PHP_REALPATH(path, resolved_path) conditionally
might be a good idea.
> Second question -- I need to add some #ifndef HAVE_xxxxx source for fsync() &
> ftruncate(). Where do you want me to do this? Inside an existing source file,
> or do you want me to create new generic files, i.e. need_fsync.c &
> need_ftruncate.c, or how about I create an mpe/ subdirectory to sit alongside
> win32/? Please enlighten me.
We currently have some compatibility code sitting in main and
some in win32. If it is general compatibility code, it should
go to main. Arch-dependent compat code deserves its own
directory.
- Sascha