Re: [PHP-DEV] CVS Account Request

2001-06-30 Thread Dave Jones

CVS Account Request wrote:
>> Purpose: I would like cvs access so that I can check a bug fix
>> to the sybase_ct module. I need this bug fix to be
>> in the next release of PHP.
>
>  Just send a diff of your patch to [EMAIL PROTECTED]

In order to get a clean build of PHP on VMS, I have to modify 29 of the
original source files.  In about 1/3 of the files, the only changes
are to add a couple casts needed because the compiler feels obliged to 
warn you that 'char *' and 'unsigned char *' are different data types.

The separate diff files are available from:

http://www.er6.eng.ohio-state.edu/~jonesd/php/

It would save me some work if at least some of these patches could be
rolled into distribution tree.

A summary of the changes in these diff files follows:

   ext/standard/base64.c
Added casts to certain function calls to eliminate warnings where
original code uses types 'char *' and 'unsigned char *' interchangeably.

   ext/standard/basic_functions.c
Add '#ifdef's to conditionally compile several declarations that
refer to syslog (HAVE_SYSLOG_H) and sendmail (HAVE_SENDMAIL).

   ext/standard/credits.c
Give Dave Jones credit for the OpenVMS port.

   ext/standard/credits_sapi.h
Give Dave Jones credit for the OSU sapi.

   ext/standard/dl.c
Modify code to load shareable images via LIB$FIND_IMAGE_SYMBOL on VMS.

   ext/standard/exec.c
Fail, with error message, the passthru function on VMS (pipe 
incompatibilty).

Make main read loop in shell_exec() test for success of buffer
alloc/realloc rather than unconditionally attempting to use the
returned pointer.

Make the main read loop use fgets rather than fread for reading
from the pipe (bug in DECCRTL, fread won't detect end-of-data).
Since this increases the number of times through the read loop (once
for each line of output), change buffer allocation to only grow
the receiving buffer when less that PIPE_BUF bytes (the read size)
are left.

   ext/standard/file.c
Modify stat function to return dev and rdev as strings rather than
numbers and ino as three separate numbers (ino0, ino1, ino2).

   ext/standard/filestat.c
Make chgrp and chown follow the Windows behaviour, changing the
relevant "#ifndef WINDOWS" to "#if !defined(WINDOWS) && !defined(VMS)"

Skip groups check in php_stat function.

Modify php_stat function to return dev and rdev as strings rather than
numbers and ino as three separate numbers (ino0, ino1, ino2).

   ext/standard/flock_compat.c
Emulate flock() function on VMS.  Still under development, may work 
under VMS 7.3 if you enable default shared opens in the C runtime.

   main/fopen_wrappers.c
Modify fopen to include "rop=rah" (read-ahead record processing option)
DECC extension on VMS.

Modify fopen to use mode "r" instead of "rb" on VMS, allowing
standard VMS text files (VAR record format) to be correctly
read by the C runtime.  When "rb" is used, DECCRTL does not insert
the implied newline at the end of each record into the data stream,
making VAR format files appear to only have 1 line.

Modify getcwd call to use DECC extension that forces returned
directory string to use Unix syntax (/dev/dir).

   ext/standard/fsock.c
Modify test used for domain socket support.  Testing for existence
of AF_UNIX is inadequate since VMS header files define this but
don't define sockaddr_un structure.

   ext/standard/html.c
Added cast to php_escape_html call to eliminate warnings where
original code uses types 'char *' and 'unsigned char *' interchangeably.

   ext/standard/image.c
Added casts to certain function calls to eliminate warnings where
original code uses types 'char *' and 'unsigned char *' interchangeably.

   main/internal_functions_w32.c
Remove calendar and ftp modules as builtin internal functions.

   ext/standard/iptc.c
Added casts to certain function calls to eliminate warnings where
original code uses types 'char *' and 'unsigned char *' interchangeably.

   main/main.c
Added casts to certain function calls to eliminate warnings where
original code uses types 'char *' and 'unsigned char *' interchangeably.

   ext/standard/md5.c
Added casts to certain function calls to eliminate warnings where
original code uses types 'char *' and 'unsigned char *' interchangeably.

   ext/standard/microtime.c
Define a timezone struct on VMS since not defined by the header files.

Re: [PHP-DEV] 4.0.6

2001-05-08 Thread Dave Jones

>>it is not that odd because it may have treated it like whitespace - imagine
>>a long line script. now it may treat it not as whitespace and hence the
>>problem
>>
>>there is no big difference between whitespace and newline(s) in php, is it?

>Both today (4.0.6-dev) and earlier \r is treated as whitespace.
>However, in previous versions including 4.0.5 and 4.0.4pl1 "\r" would not 
>mark line endings such as end of // or # comments.
>So there is no way that I can think of that a script would have worked with 
>4.0.4pl1 and not with 4.0.5.
>Anyway, it doesn't really matter now because 4.0.6 should work.

And also line number don't get incremented if there are no line ends, so
all syntax errors are reported as being on line 1.

The issue might have never come up if the code used "r" mode for opens
rather that "rb", since the file are 'text' files.  On platforms that
don't used embedded newline characters as the record delimiters, the
implementation of fread is responsible for mapping the underlying file
format to cannonical form (i.e. \n's delimiting lines).

---
And also line number don't get incremented if there are no line ends, so
all syntax errors are reported as being on line 1.

The issue might have never come up if the code used "r" mode for opens
rather that "rb", since the file are 'text' files.  On platforms that
don't used embedded newline characters as the record delimiters, the
implementation of fread is responsible for mapping the underlying file
format to cannonical form (i.e. \n's delimiting lines).

---
David L. Jones   |  Phone:(614) 292-6929
Ohio State Unviversity   |  Internet:
1971 Neil Ave. Rm. 406   |   [EMAIL PROTECTED]
Columbus, OH 43210   |   [EMAIL PROTECTED]

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Porting to VMS, facing pedantic compiler

2001-05-06 Thread Dave Jones

I've been porting PHP to VMS for the past couple of weeks, how can I 
feed back some of my changes into the source tree so it's less work
to track the changes?  The fixes I'm interested in don't apply to
VMS per se, but rather cases where the compiler squawks about intermixing
signed and unsigned char pointers.  An example is at

   http://www.er6.eng.ohio-state.edu/~jonesd/php/diffs/html.c.diff

You can tell the compiler to not issue pointer mismatch warnings, but
that disables it for all types of pointers - not a good idea.

--
David L. Jones   |  Phone:(614) 292-6929
Ohio State Unviversity   |  Internet:
1971 Neil Ave. Rm. 406   |   [EMAIL PROTECTED]
Columbus, OH 43210   |   [EMAIL PROTECTED]

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]