#21248 [NEW]: first find PQescapeBytea then use it

2002-12-28 Thread phoemix
From: [EMAIL PROTECTED]
Operating system: Linux2.4
PHP version:  4.3.0
PHP Bug Type: PostgreSQL related
Bug description:  first find PQescapeBytea then use it

the postgresql module compiles for php, perfectly.
but PQescapeBytea and PQescapeString is not available on all system, I
don't know why, it's libpq's fault.
php is linked dynamically with libpq, and PQescapeBytea is used by php. So
apache cannot load the php module, due to an unresolved
symbol(PQescapeBytea).
if PQescapeBytea doesn't available on a system php should use an own
implementation.
-- 
Edit bug report at http://bugs.php.net/?id=21248&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21248&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=21248&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=21248&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21248&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=21248&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=21248&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=21248&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=21248&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=21248&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=21248&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21248&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=21248&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=21248&r=isapi




#21248 [WFx->Opn]: first find PQescapeBytea then use it

2003-01-05 Thread phoemix
 ID:   21248
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Won't fix
+Status:   Open
 Bug Type: PostgreSQL related
 Operating System: Linux2.4
 PHP Version:  4.3.0
 Assigned To:  yohgaki
 New Comment:

you missunderstood the problem.
i wasn't talking about php's own pg_* "interface", functions
i was talking about a symbol(excacly PQexcapeString) which php uses, as
a shared library and also as a static library for apache, but on some
hosts(I, Gergely Czuczy, don't know why) libpq is not containing this
symbol. this means when you try to compile apache or load the php
module you get an unresolved symbol. and this means you are unable to
load the PHP, which means PHP is absolutely, surely unusable.


Previous Comments:


[2003-01-05 05:13:59] [EMAIL PROTECTED]

I would not like to add php own libpq function clone for following
reasons.

 - Users are supposed to use libpq that matches backend
 - There is no use of pg_(un)escape_bytea function prior to 7.2
 - Users should be able to use addslashes() to escape strings. (Only a
little inefficient and does not work for certain encodings. But these
problematic encodings do not work with PHP anyway)

Extream case is PostgreSQL 7.3.x. It cannot even connect to older
versions of backends. Use the libpq that comes from backend.
(Use the same major/minor version at least. You may use different patch
level releases between client and backend)

Since bytea is almost useless without unescape function, I added
pg_unescape_bytea() using locally implemented unescape bytea function
for 7.2 users and it's available from 4.3.0.
(The unescape function is more efficient than original version, too :)
 




[2002-12-28 10:19:11] [EMAIL PROTECTED]

the postgresql module compiles for php, perfectly.
but PQescapeBytea and PQescapeString is not available on all system, I
don't know why, it's libpq's fault.
php is linked dynamically with libpq, and PQescapeBytea is used by php.
So apache cannot load the php module, due to an unresolved
symbol(PQescapeBytea).
if PQescapeBytea doesn't available on a system php should use an own
implementation.




-- 
Edit this bug report at http://bugs.php.net/?id=21248&edit=1




#30155 [NEW]: make the header files ISO C99 and ISO C++ compatible

2004-09-19 Thread phoemix at harmless dot hu
From: phoemix at harmless dot hu
Operating system: *
PHP version:  5.0.1
PHP Bug Type: Feature/Change Request
Bug description:  make the header files ISO C99 and ISO C++ compatible

Description:

try to write an extension in C++ using the ISO C99 standard, gcc 3.3 or
later is a good choice for compiler.

Reproduce code:
---
standard skeleton extension code as a C++ code

Expected result:

build properly

Actual result:
--
1) use "const char **(*aliases)" instead of "const char *(*aliases)[]"
In file included from /usr/src/php-5.0.1/Zend/zend_globals.h:40,
 from /usr/src/php-5.0.1/Zend/zend_list.h:26,
 from /usr/src/php-5.0.1/Zend/zend_API.h:27,
 from /usr/src/php-5.0.1/main/php.h:38,
 from phpext/polylook.cc:6:
/usr/src/php-5.0.1/Zend/zend_multibyte.h:45: error: ISO C++ forbids
zero-size array `aliases'

2) use system-declared 64bit integer types instead of hacking some own
types. where you have stdint.h use [u]int(8|16|32|64)_t instead of messing
with (long )* int. these types are provided for using them. include
stdint.h, and use int64_t and uin64_t instead of long long [int]
/usr/src/php-5.0.1/main/snprintf.h:116: error: ISO C++ does not support
`long long'
/usr/src/php-5.0.1/main/snprintf.h:117: error: ISO C++ does not support
`long long'

3) just remove the trailing coma
/usr/src/php-5.0.1/main/streams/php_stream_filter_api.h:66: error: comma
at end of enumerator list


-- 
Edit bug report at http://bugs.php.net/?id=30155&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30155&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30155&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30155&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=30155&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=30155&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=30155&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=30155&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=30155&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30155&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=30155&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30155&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30155&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=30155&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30155&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=30155&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=30155&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30155&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30155&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30155&r=mysqlcfg


#39522 [Fbk->Opn]: PHP's header files are unusable for C++ extensions

2006-11-15 Thread phoemix at harmless dot hu
 ID:   39522
 User updated by:  phoemix at harmless dot hu
 Reported By:  phoemix at harmless dot hu
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: freebsd6, linux (but irrelevant)
 PHP Version:  5.2.0
 New Comment:

i have this in my header file:
extern "C" {
#include "php.h"
#include "php_ini.h"
#include "SAPI.h"
#include "ext/standard/info.h"
#include "ext/standard/head.h"
}

and when i compile it i have these errors:
g++ -c -O2 -march=pentium4 -ggdb -W -Wall -pedantic -pipe
-I/usr/local/include -fpic -DCOMPILE_DL_POLYLOOK=1 -Idbapi/ -Iinclude/
`/var/jails/httpdtest/usr/local/bin/php-config --includes` -o
phpext/obj/phpfuncs.o phpext/phpfuncs.cc
In file included from /usr/local/include/php/main/php.h:242,
 from phpext/phpfuncs.cc:7:
/usr/local/include/php/main/snprintf.h:138: error: expected `,' or
`...' before "num"
/usr/local/include/php/main/snprintf.h:139: error: ISO C++ forbids
declaration of `wide_int' with no type
/usr/local/include/php/main/snprintf.h:144: error: expected `,' or
`...' before "num"
/usr/local/include/php/main/snprintf.h:145: error: ISO C++ forbids
declaration of `u_wide_int' with no type
gmake: *** [phpext/obj/phpfuncs.o] Error 1


and:
g++ -c -O2 -march=pentium4 -ggdb -W -Wall -pedantic -pipe
-I/usr/local/include -fpic -DCOMPILE_DL_POLYLOOK=1 -Idbapi/ -Iinclude/
`/var/jails/httpdtest/usr/local/bin/php-config --includes` -o
phpext/obj/phpfuncs.o phpext/phpfuncs.cc
In file included from /usr/local/include/php/main/php_streams.h:104,
 from /usr/local/include/php/main/php.h:408,
 from phpext/phpfuncs.cc:7:
/usr/local/include/php/main/streams/php_stream_filter_api.h:66: error:
comma at end of enumerator list
gmake: *** [phpext/obj/phpfuncs.o] Error 1


Previous Comments:


[2006-11-15 09:46:17] [EMAIL PROTECTED]

We have several C++ extensions in PECL and I'm happen to be the author
of one. And I didn't/don't see any problems with C++ and PHP headers,
even on FreeBSD.
Please elaborate and show what exactly is wrong before posting a patch
for a bug which is not reproducible.



[2006-11-15 07:35:47] phoemix at harmless dot hu

Description:

(the php version is irrelevant, i just couldn't pick that for the
"compile failure" type. i had it on 4.x and on 5.x both"

create a new extensions, have a C++ source file, and include some php
headers. it will fail on two points.

1) C++ doesn't support "long long". lot's of architectures has stdint.h
(i think it's C99). that should be used instead of "long long"-ing
manually.

2) C++ prohobits havint a trailing coma at the end of an enum's last
member.

i have created a patch for the FreeBSD ports system. the errors are in
snprintf.h and in php_stream_filter_api.h/.

--- patch follows ---
diff -ur php-5.2.0-orig/main/snprintf.h php-5.2.0/main/snprintf.h
--- php-5.2.0-orig/main/snprintf.h  Sun Jan  1 13:50:17 2006
+++ php-5.2.0/main/snprintf.h   Tue Nov 14 14:23:31 2006
@@ -120,8 +120,14 @@
 #else
 # define WIDE_INT  long
 #endif
+#ifdef __FreeBSD__
+#include 
+typedef int64_t wide_int;
+typedef uint64_t u_wide_int;
+#else
 typedef WIDE_INT wide_int;
 typedef unsigned WIDE_INT u_wide_int;
+#endif

 typedef int bool_int;

diff -ur php-5.2.0-orig/main/streams/php_stream_filter_api.h
php-5.2.0/main/streams/php_stream_filter_api.h
--- php-5.2.0-orig/main/streams/php_stream_filter_api.h Sun Jan  1
13:50:18 2006
+++ php-5.2.0/main/streams/php_stream_filter_api.h  Tue Nov 14
14:24:33 2006
@@ -62,7 +62,7 @@
 typedef enum {
PSFS_ERR_FATAL, /* error in data stream */
PSFS_FEED_ME,   /* filter needs more data; stop processing
chain until more is available */
-   PSFS_PASS_ON,   /* filter generated output buckets; pass them
on to next in chain */
+   PSFS_PASS_ON/* filter generated output buckets; pass them
on to next in chain */
 } php_stream_filter_status_t;

 /* Buckets API. */


Reproduce code:
---
create a new extensions, have a C++ source file, and include some php
headers. it will fail on two points.

Expected result:

a clean compilation.

Actual result:
--
i don't have the error output yet, since my local version is fixed
manually.





-- 
Edit this bug report at http://bugs.php.net/?id=39522&edit=1


#39522 [Fbk->Opn]: PHP's header files are unusable for C++ extensions

2006-11-15 Thread phoemix at harmless dot hu
 ID:   39522
 User updated by:  phoemix at harmless dot hu
 Reported By:  phoemix at harmless dot hu
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: freebsd6, linux (but irrelevant)
 PHP Version:  5.2.0
 New Comment:

no, sorry, that's a source file.
it includes that headers from php


Previous Comments:


[2006-11-15 09:57:59] [EMAIL PROTECTED]

>i have this in my header file

>In file included from /usr/local/include/php/main/php.h:242,
is this the header file? ->   from phpext/phpfuncs.cc



[2006-11-15 09:53:25] phoemix at harmless dot hu

i have this in my header file:
extern "C" {
#include "php.h"
#include "php_ini.h"
#include "SAPI.h"
#include "ext/standard/info.h"
#include "ext/standard/head.h"
}

and when i compile it i have these errors:
g++ -c -O2 -march=pentium4 -ggdb -W -Wall -pedantic -pipe
-I/usr/local/include -fpic -DCOMPILE_DL_POLYLOOK=1 -Idbapi/ -Iinclude/
`/var/jails/httpdtest/usr/local/bin/php-config --includes` -o
phpext/obj/phpfuncs.o phpext/phpfuncs.cc
In file included from /usr/local/include/php/main/php.h:242,
 from phpext/phpfuncs.cc:7:
/usr/local/include/php/main/snprintf.h:138: error: expected `,' or
`...' before "num"
/usr/local/include/php/main/snprintf.h:139: error: ISO C++ forbids
declaration of `wide_int' with no type
/usr/local/include/php/main/snprintf.h:144: error: expected `,' or
`...' before "num"
/usr/local/include/php/main/snprintf.h:145: error: ISO C++ forbids
declaration of `u_wide_int' with no type
gmake: *** [phpext/obj/phpfuncs.o] Error 1


and:
g++ -c -O2 -march=pentium4 -ggdb -W -Wall -pedantic -pipe
-I/usr/local/include -fpic -DCOMPILE_DL_POLYLOOK=1 -Idbapi/ -Iinclude/
`/var/jails/httpdtest/usr/local/bin/php-config --includes` -o
phpext/obj/phpfuncs.o phpext/phpfuncs.cc
In file included from /usr/local/include/php/main/php_streams.h:104,
 from /usr/local/include/php/main/php.h:408,
 from phpext/phpfuncs.cc:7:
/usr/local/include/php/main/streams/php_stream_filter_api.h:66: error:
comma at end of enumerator list
gmake: *** [phpext/obj/phpfuncs.o] Error 1



[2006-11-15 09:46:17] [EMAIL PROTECTED]

We have several C++ extensions in PECL and I'm happen to be the author
of one. And I didn't/don't see any problems with C++ and PHP headers,
even on FreeBSD.
Please elaborate and show what exactly is wrong before posting a patch
for a bug which is not reproducible.



[2006-11-15 07:35:47] phoemix at harmless dot hu

Description:

(the php version is irrelevant, i just couldn't pick that for the
"compile failure" type. i had it on 4.x and on 5.x both"

create a new extensions, have a C++ source file, and include some php
headers. it will fail on two points.

1) C++ doesn't support "long long". lot's of architectures has stdint.h
(i think it's C99). that should be used instead of "long long"-ing
manually.

2) C++ prohobits havint a trailing coma at the end of an enum's last
member.

i have created a patch for the FreeBSD ports system. the errors are in
snprintf.h and in php_stream_filter_api.h/.

--- patch follows ---
diff -ur php-5.2.0-orig/main/snprintf.h php-5.2.0/main/snprintf.h
--- php-5.2.0-orig/main/snprintf.h  Sun Jan  1 13:50:17 2006
+++ php-5.2.0/main/snprintf.h   Tue Nov 14 14:23:31 2006
@@ -120,8 +120,14 @@
 #else
 # define WIDE_INT  long
 #endif
+#ifdef __FreeBSD__
+#include 
+typedef int64_t wide_int;
+typedef uint64_t u_wide_int;
+#else
 typedef WIDE_INT wide_int;
 typedef unsigned WIDE_INT u_wide_int;
+#endif

 typedef int bool_int;

diff -ur php-5.2.0-orig/main/streams/php_stream_filter_api.h
php-5.2.0/main/streams/php_stream_filter_api.h
--- php-5.2.0-orig/main/streams/php_stream_filter_api.h Sun Jan  1
13:50:18 2006
+++ php-5.2.0/main/streams/php_stream_filter_api.h  Tue Nov 14
14:24:33 2006
@@ -62,7 +62,7 @@
 typedef enum {
PSFS_ERR_FATAL, /* error in data stream */
PSFS_FEED_ME,   /* filter needs more data; stop processing
chain until more is available */
-   PSFS_PASS_ON,   /* filter generated output buckets; pass them
on to next in chain */
+   PSFS_PASS_ON/* filter generated output buckets; pass them
on to next in chain */
 } php_stream_filter_status_t;

 /* Buckets API. */


Reproduce code:
---
create a new extensions, have a C++ source file, and include some php
headers. it will fail on two points.

Expected result:

a clean compilation.

Actual resul

#39522 [Bgs]: PHP's header files are unusable for C++ extensions

2006-11-15 Thread phoemix at harmless dot hu
 ID:   39522
 User updated by:  phoemix at harmless dot hu
 Reported By:  phoemix at harmless dot hu
 Status:   Bogus
 Bug Type: Compile Failure
 Operating System: freebsd6, linux (but irrelevant)
 PHP Version:  5.2.0
 New Comment:

it _do_ has the extern "C". read my previous post please. i have pasted
the way i include it, it's in an extern "C" block.

let me quote my previous post:
[2006-11-15 09:53:25] phoemix at harmless dot hu
--- chop with axe here ---
i have this in my header file:
extern "C" {
#include "php.h"
#include "php_ini.h"
#include "SAPI.h"
#include "ext/standard/info.h"
#include "ext/standard/head.h"
}
--- chop with axe here ---
now, where is the extern "C" missing? i see it there.
please double-check my previous post


Previous Comments:


[2006-11-15 10:01:11] [EMAIL PROTECTED]

.. and it's apparently missing extern "C" { } block.
No bug -> bogus.



[2006-11-15 09:59:33] phoemix at harmless dot hu

no, sorry, that's a source file.
it includes that headers from php



[2006-11-15 09:57:59] [EMAIL PROTECTED]

>i have this in my header file

>In file included from /usr/local/include/php/main/php.h:242,
is this the header file? ->   from phpext/phpfuncs.cc



[2006-11-15 09:53:25] phoemix at harmless dot hu

i have this in my header file:
extern "C" {
#include "php.h"
#include "php_ini.h"
#include "SAPI.h"
#include "ext/standard/info.h"
#include "ext/standard/head.h"
}

and when i compile it i have these errors:
g++ -c -O2 -march=pentium4 -ggdb -W -Wall -pedantic -pipe
-I/usr/local/include -fpic -DCOMPILE_DL_POLYLOOK=1 -Idbapi/ -Iinclude/
`/var/jails/httpdtest/usr/local/bin/php-config --includes` -o
phpext/obj/phpfuncs.o phpext/phpfuncs.cc
In file included from /usr/local/include/php/main/php.h:242,
 from phpext/phpfuncs.cc:7:
/usr/local/include/php/main/snprintf.h:138: error: expected `,' or
`...' before "num"
/usr/local/include/php/main/snprintf.h:139: error: ISO C++ forbids
declaration of `wide_int' with no type
/usr/local/include/php/main/snprintf.h:144: error: expected `,' or
`...' before "num"
/usr/local/include/php/main/snprintf.h:145: error: ISO C++ forbids
declaration of `u_wide_int' with no type
gmake: *** [phpext/obj/phpfuncs.o] Error 1


and:
g++ -c -O2 -march=pentium4 -ggdb -W -Wall -pedantic -pipe
-I/usr/local/include -fpic -DCOMPILE_DL_POLYLOOK=1 -Idbapi/ -Iinclude/
`/var/jails/httpdtest/usr/local/bin/php-config --includes` -o
phpext/obj/phpfuncs.o phpext/phpfuncs.cc
In file included from /usr/local/include/php/main/php_streams.h:104,
 from /usr/local/include/php/main/php.h:408,
 from phpext/phpfuncs.cc:7:
/usr/local/include/php/main/streams/php_stream_filter_api.h:66: error:
comma at end of enumerator list
gmake: *** [phpext/obj/phpfuncs.o] Error 1



[2006-11-15 09:46:17] [EMAIL PROTECTED]

We have several C++ extensions in PECL and I'm happen to be the author
of one. And I didn't/don't see any problems with C++ and PHP headers,
even on FreeBSD.
Please elaborate and show what exactly is wrong before posting a patch
for a bug which is not reproducible.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/39522

-- 
Edit this bug report at http://bugs.php.net/?id=39522&edit=1


#39522 [Bgs]: PHP's header files are unusable for C++ extensions

2006-11-15 Thread phoemix at harmless dot hu
 ID:   39522
 User updated by:  phoemix at harmless dot hu
 Reported By:  phoemix at harmless dot hu
 Status:   Bogus
 Bug Type: Compile Failure
 Operating System: freebsd6, linux (but irrelevant)
 PHP Version:  5.2.0
 New Comment:

yes, it was a typo. it's a source file. as i have corrected myself, and
as it seems from the g++ command line, the way it is being ran.

yes, you do know what is in my .cc file, as i had posted it. for your
sake it is here again:


extern "C" {
#include "php.h"
#include "php_ini.h"
#include "SAPI.h"
#include "ext/standard/info.h"
#include "ext/standard/head.h"
}

#include 
#include 
#include 

#include "debug.hh"
#include "logger.hh"
#include "phpfuncs.hh"
#include "skin.hh"
#include "phpdb.hh"

#include 
#include 


namespace phpfuncs {


this much shoud be enough.
i only show the relevant lines.

i'm here to report a bug, and not to ask questions. so, please don't
make this bug reporting place a support center, because it's simply not
that. thanks.


Previous Comments:


[2006-11-15 10:10:57] [EMAIL PROTECTED]

I your previous post you were talking about *header*, while this is not
what GCC says. I don't know what is in your .cc file and what is in your
header, as you didn't show me anything except for a few lines.
Please ask any questions related to custom module development in
[EMAIL PROTECTED], this is not a support forum, but a bug tracking
system.



[2006-11-15 10:03:01] phoemix at harmless dot hu

it _do_ has the extern "C". read my previous post please. i have pasted
the way i include it, it's in an extern "C" block.

let me quote my previous post:
[2006-11-15 09:53:25] phoemix at harmless dot hu
--- chop with axe here ---
i have this in my header file:
extern "C" {
#include "php.h"
#include "php_ini.h"
#include "SAPI.h"
#include "ext/standard/info.h"
#include "ext/standard/head.h"
}
--- chop with axe here ---
now, where is the extern "C" missing? i see it there.
please double-check my previous post

--------

[2006-11-15 10:01:11] [EMAIL PROTECTED]

.. and it's apparently missing extern "C" { } block.
No bug -> bogus.



[2006-11-15 09:59:33] phoemix at harmless dot hu

no, sorry, that's a source file.
it includes that headers from php



[2006-11-15 09:57:59] [EMAIL PROTECTED]

>i have this in my header file

>In file included from /usr/local/include/php/main/php.h:242,
is this the header file? ->   from phpext/phpfuncs.cc



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/39522

-- 
Edit this bug report at http://bugs.php.net/?id=39522&edit=1


#39522 [NEW]: PHP's header files are unusable for C++ extensions

2006-11-15 Thread phoemix at harmless dot hu
From: phoemix at harmless dot hu
Operating system: freebsd6, linux (but irrelevant)
PHP version:  5.2.0
PHP Bug Type: Compile Failure
Bug description:  PHP's header files are unusable for C++ extensions

Description:

(the php version is irrelevant, i just couldn't pick that for the "compile
failure" type. i had it on 4.x and on 5.x both"

create a new extensions, have a C++ source file, and include some php
headers. it will fail on two points.

1) C++ doesn't support "long long". lot's of architectures has stdint.h (i
think it's C99). that should be used instead of "long long"-ing manually.

2) C++ prohobits havint a trailing coma at the end of an enum's last
member.

i have created a patch for the FreeBSD ports system. the errors are in
snprintf.h and in php_stream_filter_api.h/.

--- patch follows ---
diff -ur php-5.2.0-orig/main/snprintf.h php-5.2.0/main/snprintf.h
--- php-5.2.0-orig/main/snprintf.h  Sun Jan  1 13:50:17 2006
+++ php-5.2.0/main/snprintf.h   Tue Nov 14 14:23:31 2006
@@ -120,8 +120,14 @@
 #else
 # define WIDE_INT  long
 #endif
+#ifdef __FreeBSD__
+#include 
+typedef int64_t wide_int;
+typedef uint64_t u_wide_int;
+#else
 typedef WIDE_INT wide_int;
 typedef unsigned WIDE_INT u_wide_int;
+#endif

 typedef int bool_int;

diff -ur php-5.2.0-orig/main/streams/php_stream_filter_api.h
php-5.2.0/main/streams/php_stream_filter_api.h
--- php-5.2.0-orig/main/streams/php_stream_filter_api.h Sun Jan  1
13:50:18 2006
+++ php-5.2.0/main/streams/php_stream_filter_api.h  Tue Nov 14
14:24:33 2006
@@ -62,7 +62,7 @@
 typedef enum {
PSFS_ERR_FATAL, /* error in data stream */
PSFS_FEED_ME,   /* filter needs more data; stop processing chain
until more is available */
-   PSFS_PASS_ON,   /* filter generated output buckets; pass them on
to next in chain */
+   PSFS_PASS_ON/* filter generated output buckets; pass them on
to next in chain */
 } php_stream_filter_status_t;

 /* Buckets API. */


Reproduce code:
---
create a new extensions, have a C++ source file, and include some php
headers. it will fail on two points.

Expected result:

a clean compilation.

Actual result:
--
i don't have the error output yet, since my local version is fixed
manually.

-- 
Edit bug report at http://bugs.php.net/?id=39522&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39522&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39522&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39522&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39522&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=39522&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=39522&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=39522&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=39522&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=39522&r=support
Expected behavior:http://bugs.php.net/fix.php?id=39522&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=39522&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=39522&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39522&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39522&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39522&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=39522&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=39522&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39522&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=39522&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=39522&r=mysqlcfg