This allows static builds under win32 despite the fact that tidyOptGetDoc()
doesn't exist in the libtidy.lib we're linking against.
It needs applying to php_tidy.def everywhere libtidy v 2 is used - that is,
ext/tidy in CVS HEAD and PHP_5_1, and CVS HEAD pecl/tidy.
In all three cases there is the same #ifdef clause for the matching
tidy_get_opt_doc() function in the header file.
- Steph
Oops, forget it. The problem with having both PECL and src on board is I
assumed I was building against the one with this change in it. I wasn't - I
was building against the one that didn't have tidyOptGetDoc in the export
list AT ALL.
Just ran a test and found this is illegal syntax :( so back to the drawing
board.
(Edin: is there some way you know of to do an #ifdef equivalent in these
export lists?)
- Steph
----- Original Message -----
From: "Steph Fox" steph@zend.com
To: "internals" internals@lists.php.net
Sent: Wednesday, April 19, 2006 12:34 PM
Subject: [PHP-DEV] tiny patch for Tidy
This allows static builds under win32 despite the fact that
tidyOptGetDoc()
doesn't exist in the libtidy.lib we're linking against.It needs applying to php_tidy.def everywhere libtidy v 2 is used - that
is,
ext/tidy in CVS HEAD and PHP_5_1, and CVS HEAD pecl/tidy.In all three cases there is the same #ifdef clause for the matching
tidy_get_opt_doc() function in the header file.
- Steph
__________ NOD32 1.1380 (20060125) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
--
__________ NOD32 1.1380 (20060125) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
BTW, the libtidy could be updated :) It had a major optimization a few time
ago (it decreased my bechmark running time by ~30%).
Nuno
----- Original Message -----
From: "Steph Fox" steph@zend.com
To: "internals" internals@lists.php.net
Cc: "Edin" edink@emini.dk
Sent: Wednesday, April 19, 2006 12:00 PM
Subject: Re: [PHP-DEV] tiny patch for Tidy
Oops, forget it. The problem with having both PECL and src on board is I
assumed I was building against the one with this change in it. I wasn't -
I was building against the one that didn't have tidyOptGetDoc in the
export list AT ALL.Just ran a test and found this is illegal syntax :( so back to the drawing
board.(Edin: is there some way you know of to do an #ifdef equivalent in these
export lists?)
- Steph
----- Original Message -----
From: "Steph Fox" steph@zend.com
To: "internals" internals@lists.php.net
Sent: Wednesday, April 19, 2006 12:34 PM
Subject: [PHP-DEV] tiny patch for TidyThis allows static builds under win32 despite the fact that
tidyOptGetDoc()
doesn't exist in the libtidy.lib we're linking against.It needs applying to php_tidy.def everywhere libtidy v 2 is used - that
is,
ext/tidy in CVS HEAD and PHP_5_1, and CVS HEAD pecl/tidy.In all three cases there is the same #ifdef clause for the matching
tidy_get_opt_doc() function in the header file.
- Steph
I updated my copy from Edin's collection last week. It's newer than last
year's, but I'm struggling to find any form of 'version' in there to know
exactly what I have in front of me. So what are you talking about? Update
from what, to what, and for which PHP build?
BTW, the libtidy could be updated :) It had a major optimization a few
time ago (it decreased my bechmark running time by ~30%).Nuno
----- Original Message -----
From: "Steph Fox" steph@zend.com
To: "internals" internals@lists.php.net
Cc: "Edin" edink@emini.dk
Sent: Wednesday, April 19, 2006 12:00 PM
Subject: Re: [PHP-DEV] tiny patch for TidyOops, forget it. The problem with having both PECL and src on board is I
assumed I was building against the one with this change in it. I wasn't -
I was building against the one that didn't have tidyOptGetDoc in the
export list AT ALL.Just ran a test and found this is illegal syntax :( so back to the
drawing board.(Edin: is there some way you know of to do an #ifdef equivalent in these
export lists?)
- Steph
----- Original Message -----
From: "Steph Fox" steph@zend.com
To: "internals" internals@lists.php.net
Sent: Wednesday, April 19, 2006 12:34 PM
Subject: [PHP-DEV] tiny patch for TidyThis allows static builds under win32 despite the fact that
tidyOptGetDoc()
doesn't exist in the libtidy.lib we're linking against.It needs applying to php_tidy.def everywhere libtidy v 2 is used - that
is,
ext/tidy in CVS HEAD and PHP_5_1, and CVS HEAD pecl/tidy.In all three cases there is the same #ifdef clause for the matching
tidy_get_opt_doc() function in the header file.
- Steph
__________ NOD32 1.1380 (20060125) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
I updated my copy from Edin's collection last week. It's newer than last
year's, but I'm struggling to find any form of 'version' in there to know
exactly what I have in front of me. So what are you talking about? Update
from what, to what, and for which PHP build?
I'm talking about the libtidy version:
php -r "echo tidy_get_release();"
or
php -i | grep libTidy
the official php build's libtidy version is '1st July 2004', which is almost
two years old, and thus doesn't have the tidyOptGetDoc() function.
Nuno
I updated my copy from Edin's collection last week. It's newer than last
year's, but I'm struggling to find any form of 'version' in there to know
exactly what I have in front of me. So what are you talking about? Update
from what, to what, and for which PHP build?I'm talking about the libtidy version:
php -r "echo tidy_get_release();"
or
php -i | grep libTidythe official php build's libtidy version is '1st July 2004', which is
almost two years old, and thus doesn't have the tidyOptGetDoc() function.
Heh, I never thought of that - I was looking through the source for an
actual version number, y'know, some API no or whatever. Something normal...
Really this is down to John Coggeshall (as maintainer) - unless someone else
feels like going and finding a newer version of libtidy and testing it with
the existing extension(s) - e.g. would a newer version also bring other new
functions that aren't wrapped in the extension(s) currently?
In the meantime, we're building against this July 1st 2004 version - and as
I wrote earlier, that export file is only used with the static win32
build. Surely we can allow that build to work with the lib used in the
official distro while we're waiting for whatever needs to be done for the
upgrade?
- Steph
I updated my copy from Edin's collection last week. It's newer than last
year's, but I'm struggling to find any form of 'version' in there to
know exactly what I have in front of me. So what are you talking about?
Update from what, to what, and for which PHP build?I'm talking about the libtidy version:
php -r "echo tidy_get_release();"
or
php -i | grep libTidythe official php build's libtidy version is '1st July 2004', which is
almost two years old, and thus doesn't have the tidyOptGetDoc() function.Heh, I never thought of that - I was looking through the source for an
actual version number, y'know, some API no or whatever. Something
normal...Really this is down to John Coggeshall (as maintainer) - unless someone
else feels like going and finding a newer version of libtidy and testing
it with the existing extension(s) - e.g. would a newer version also bring
other new functions that aren't wrapped in the extension(s) currently?
I do really follow the libtidy development closely. I have the latest cvs
version installed on my pc and it runs correctly. All libtidy's tests run
fine and my own tests/benchmarks also run correctly.
And I don't remember any other function beeing added to libtidy lately. The
last one was that tidyOptGetDoc(), which is already exported.
In the meantime, we're building against this July 1st 2004 version - and
as I wrote earlier, that export file is only used with the static win32
build. Surely we can allow that build to work with the lib used in the
official distro while we're waiting for whatever needs to be done for the
upgrade?
- Steph
Upgrading libtidy is five minutes (including download time..). Edin? :)
Nuno
Nuno, which version of libtidy do you think we should use for bundiling
with the windows distribution?
Edin
answering both e-mails:
Nuno, which version of libtidy do you think we should use for bundiling
with the windows distribution?
latest CVS. It is stable ATM (but checkout with a developer account, because
sourceforge's anonymous cvs servers are currently broken).
Nuno, will this also work for 4_3 branch?
Yep, the libtidy API hasn't changed.
Nuno
Latest CVS (SF anon CVS worked for me) doesn't compile with error:
ext\tidy\tidy.c(586) : error C2152: 'function' : pointers to functions
with different attributes
Edin
Nuno Lopes wrote:
answering both e-mails:
Nuno, which version of libtidy do you think we should use for bundiling
with the windows distribution?latest CVS. It is stable ATM (but checkout with a developer account,
because sourceforge's anonymous cvs servers are currently broken).Nuno, will this also work for 4_3 branch?
Yep, the libtidy API hasn't changed.
Nuno
I mean ext/tidy from 5.1 doesn't compile with this latest version of
libtidy. Libtidy itself compiles fine on windows.
Edin
Edin Kadribasic wrote:
Latest CVS (SF anon CVS worked for me) doesn't compile with error:
ext\tidy\tidy.c(586) : error C2152: 'function' : pointers to functions
with different attributesEdin
Nuno Lopes wrote:
answering both e-mails:
Nuno, which version of libtidy do you think we should use for bundiling
with the windows distribution?latest CVS. It is stable ATM (but checkout with a developer account,
because sourceforge's anonymous cvs servers are currently broken).Nuno, will this also work for 4_3 branch?
Yep, the libtidy API hasn't changed.
Nuno
Ah Sorry. I haven't compiled PHP on windows for some time now.
Attached is a patch thats fixes the problem.
Nuno
Latest CVS (SF anon CVS worked for me) doesn't compile with error:
ext\tidy\tidy.c(586) : error C2152: 'function' : pointers to functions
with different attributesEdin
Nuno Lopes wrote:
answering both e-mails:
Nuno, which version of libtidy do you think we should use for bundiling
with the windows distribution?latest CVS. It is stable ATM (but checkout with a developer account,
because sourceforge's anonymous cvs servers are currently broken).Nuno, will this also work for 4_3 branch?
Yep, the libtidy API hasn't changed.
Nuno
Nuno, will this also work for 4_3 branch?
Yep, the libtidy API hasn't changed.
Something's odd in the manual then:
Note: Tidy 1.0 is just for PHP 4.3.x, while Tidy 2.0 is just for PHP 5.
Steph Fox wrote:
Something's odd in the manual then:
Note: Tidy 1.0 is just for PHP 4.3.x, while Tidy 2.0 is just for PHP 5.
Which refers to ext/tidy version (AFAICT).
Regards,
Michael - <mike(@)php.net> http://dev.iworks.at/ext-http/http-functions.html.gz
Steph Fox wrote:
Something's odd in the manual then:
Note: Tidy 1.0 is just for PHP 4.3.x, while Tidy 2.0 is just for PHP 5.
Which refers to ext/tidy version (AFAICT).
exactly. The PECL tidy extension version 2.0 doesn't work with PHP 4 because
it uses some zend engine 2 specific stuff (OO).
Nuno
There isn't a PECL tidy version 2.0...!
Steph Fox wrote:
Something's odd in the manual then:
Note: Tidy 1.0 is just for PHP 4.3.x, while Tidy 2.0 is just for PHP 5.
Which refers to ext/tidy version (AFAICT).
exactly. The PECL tidy extension version 2.0 doesn't work with PHP 4
because it uses some zend engine 2 specific stuff (OO).Nuno
__________ NOD32 1.1380 (20060125) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
It seems very odd to me there can't just be a one-line fix for something
that's broken in 5_1 win32 static build without a whole hoo-ha going down.
The extension doesn't build against the new library without fiddling, and
nor does it build against the library we actually use. The difference is
that if the new library is used in the distro builds it may affect the PHP
4.* version (did anyone test to prove it won't, yet?), and will
(definitively) affect anyone attempting to build the extension against an
older copy of the library, thanks to a minor API change in Tidy.
On the other hand, if the extension is fixed in PHP 5.1 and up to build with
the existing library, it will only affect win32 users attempting to build
the extension statically against a newer edition of the library - which they
can't currently do anyway.
So what's the issue?
- Steph
Something's odd in the manual then:
Note: Tidy 1.0 is just for PHP 4.3.x, while Tidy 2.0 is just for PHP 5.
Which refers to ext/tidy version (AFAICT).
Regards,
Michael - <mike(@)php.net>
http://dev.iworks.at/ext-http/http-functions.html.gz
Steph Fox wrote:
<shrug />It seems very odd to me there can't just be a one-line fix for something
that's broken in 5_1 win32 static build without a whole hoo-ha going down.The extension doesn't build against the new library without fiddling,
and nor does it build against the library we actually use. The
difference is that if the new library is used in the distro builds it
may affect the PHP 4.* version (did anyone test to prove it won't,
yet?), and will (definitively) affect anyone attempting to build the
extension against an older copy of the library, thanks to a minor API
change in Tidy.On the other hand, if the extension is fixed in PHP 5.1 and up to build
with the existing library, it will only affect win32 users attempting
to build the extension statically against a newer edition of the library
- which they can't currently do anyway.
So what's the issue?
I just thought that since we're looking at tidy we might as well update
the libs on win32 build boxes :)
Edin
I just thought that since we're looking at tidy we might as well update
the libs on win32 build boxes :)
Mm but actually what's more likely to happen, now that it's turned into a
discussion on upgrading, is precisely nothing. AKA the static build won't be
fixed because 'there's going to be an upgrade soon so there's no point' and
the new functions won't be wrapped because John will need to make time to
look into them, and has none.
:(
Nuno:
Do you know when the BC break was with libtidy? I'll need to add a
config.m4 check at the very least.
John
I just thought that since we're looking at tidy we might as well update
the libs on win32 build boxes :)Mm but actually what's more likely to happen, now that it's turned into a
discussion on upgrading, is precisely nothing. AKA the static build won't be
fixed because 'there's going to be an upgrade soon so there's no point' and
the new functions won't be wrapped because John will need to make time to
look into them, and has none.:(
Nuno, will this also work for 4_3 branch?
I updated my copy from Edin's collection last week. It's newer than
last year's, but I'm struggling to find any form of 'version' in there
to know exactly what I have in front of me. So what are you talking
about? Update from what, to what, and for which PHP build?I'm talking about the libtidy version:
php -r "echo tidy_get_release();"
or
php -i | grep libTidythe official php build's libtidy version is '1st July 2004', which is
almost two years old, and thus doesn't have the tidyOptGetDoc()
function.Heh, I never thought of that - I was looking through the source for an
actual version number, y'know, some API no or whatever. Something
normal...Really this is down to John Coggeshall (as maintainer) - unless someone
else feels like going and finding a newer version of libtidy and testing
it with the existing extension(s) - e.g. would a newer version also bring
other new functions that aren't wrapped in the extension(s) currently?I do really follow the libtidy development closely. I have the latest cvs
version installed on my pc and it runs correctly. All libtidy's tests run
fine and my own tests/benchmarks also run correctly.
And I don't remember any other function beeing added to libtidy lately.
The last one was that tidyOptGetDoc(), which is already exported.In the meantime, we're building against this July 1st 2004 version - and
as I wrote earlier, that export file is only used with the static win32
build. Surely we can allow that build to work with the lib used in the
official distro while we're waiting for whatever needs to be done for the
upgrade?
- Steph
Upgrading libtidy is five minutes (including download time..). Edin? :)
Nuno
__________ NOD32 1.1380 (20060125) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
Really this is down to John Coggeshall (as maintainer) - unless someone else
feels like going and finding a newer version of libtidy and testing it with
the existing extension(s) - e.g. would a newer version also bring other new
functions that aren't wrapped in the extension(s) currently?
I can try to find some time and take a look at what is in the most up to
date libtidy and add the functionality to the extension if it makes
sense. However, even then I never was the one to get it working in
Windows :)
John
Hi John,
Being older and wiser than I was this morning:
tidySetInCharEncoding
tidySetOutCharEncoding
tidyOptGetDoc
tidyOptGetDocLinksList
tidyOptGetNextDocLinks
tidyAttrGetById
are the only newly introduced functions between the two library versions.
The only problem with the current static doze build is it includes one of
those new functions in its export list, and libtidy does not.
As Nuno noted, the API change between versions consists of declaring every
Tidy substitution as a 'TIDY_CALL' type, but that only affects the four
memory settings.
- Steph
Really this is down to John Coggeshall (as maintainer) - unless someone
else
feels like going and finding a newer version of libtidy and testing it
with
the existing extension(s) - e.g. would a newer version also bring other
new
functions that aren't wrapped in the extension(s) currently?I can try to find some time and take a look at what is in the most up to
date libtidy and add the functionality to the extension if it makes
sense. However, even then I never was the one to get it working in
Windows :)John
OK. I've just found that that .defs file is only used by the static win32
build. It doesn't affect anything else, on any other platform.
That makes fixing it even easier :) one line instead of three, you just
don't export the function that doesn't exist. If/when we ever get that
function in libtidy.lib, the ext/tidy (or PECL/tidy) static build will
complain that it's missing - but for now they throw a fatal error anyway.
I do realize I'm the only person in the entire universe to build extensions
statically under win32 in the first place, but since we apparently have this
entire defs/exports system set up to allow precisely that - what about
having it working too? :)
- Steph
Oops, forget it. The problem with having both PECL and src on board is I
assumed I was building against the one with this change in it. I wasn't -
I was building against the one that didn't have tidyOptGetDoc in the
export list AT ALL.Just ran a test and found this is illegal syntax :( so back to the drawing
board.(Edin: is there some way you know of to do an #ifdef equivalent in these
export lists?)
- Steph
----- Original Message -----
From: "Steph Fox" steph@zend.com
To: "internals" internals@lists.php.net
Sent: Wednesday, April 19, 2006 12:34 PM
Subject: [PHP-DEV] tiny patch for TidyThis allows static builds under win32 despite the fact that
tidyOptGetDoc()
doesn't exist in the libtidy.lib we're linking against.It needs applying to php_tidy.def everywhere libtidy v 2 is used - that
is,
ext/tidy in CVS HEAD and PHP_5_1, and CVS HEAD pecl/tidy.In all three cases there is the same #ifdef clause for the matching
tidy_get_opt_doc() function in the header file.
- Steph
__________ NOD32 1.1380 (20060125) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
--
__________ NOD32 1.1380 (20060125) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com--
__________ NOD32 1.1380 (20060125) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com