Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73570 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70005 invoked from network); 3 Apr 2014 12:40:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Apr 2014 12:40:03 -0000 Authentication-Results: pb1.pair.com smtp.mail=oneil@saxonica.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=oneil@saxonica.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain saxonica.com from 217.69.47.236 cause and error) X-PHP-List-Original-Sender: oneil@saxonica.com X-Host-Fingerprint: 217.69.47.236 uk1rly2283.eechost.net Linux 2.6 Received: from [217.69.47.236] ([217.69.47.236:55174] helo=uk1rly2283.eechost.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 41/51-62638-F965D335 for ; Thu, 03 Apr 2014 07:40:01 -0500 Received: from [82.152.109.199] (helo=[192.168.0.112]) by uk1rly2283.eechost.net with esmtpa (Exim 4.72) (envelope-from ) id 1WVgx7-0006qr-LD; Thu, 03 Apr 2014 13:41:06 +0100 Content-Type: multipart/alternative; boundary="Apple-Mail=_CB1F2511-91AA-478A-AA99-6D185B38F8A1" Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) In-Reply-To: <57711604dc923c34412021350230d52e.squirrel@webmail.klapt.com> Date: Thu, 3 Apr 2014 13:39:54 +0100 Cc: internals@lists.php.net Message-ID: <92562119-D2D8-4FA2-B5AF-43D676B8E0C0@saxonica.com> References: <42E6A56D-0FF1-4408-BCF5-DFBCEDA735EB@saxonica.com> <1396445137.2982.291.camel@guybrush> <2EF10AD3-FC2C-4F34-9639-8BC798DB0917@saxonica.com> <1396449767.2982.294.camel@guybrush> <40B86AC1-3057-4016-95E2-EB8E754A70E1@saxonica.com> <57711604dc923c34412021350230d52e.squirrel@webmail.klapt.com> To: Anatol Belski X-Mailer: Apple Mail (2.1874) X-Auth-Info: oneil@saxonica.com (plain) Subject: Re: [PHP-DEV] PHP C++ extension on Windows: setting the working directory the same as PHP From: oneil@saxonica.com (O'Neil Delpratt) --Apple-Mail=_CB1F2511-91AA-478A-AA99-6D185B38F8A1 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Thanks very much for your help. I will let you know how it goes On 3 Apr 2014, at 12:55, Anatol Belski wrote: > Yes, first of all you need to extern "C" all the PHP headers, as they are > all C. The php.h is needed on any platform. Then the header include order > seems odd, please take a look at the following: > > http://svn.php.net/viewvc/pecl/xmldiff/trunk/php_xmldiff.h?view=markup > http://svn.php.net/viewvc/pecl/ktaglib/trunk/php_ktaglib.h?view=markup > > those are the headers of some C++ extensions. Also it might be interesting > for you to look at their config.w32 . > > With the VCWD_GETCWD usage - that's only what you need. It's not necessary > to use GetCurrentDirectory or getcwd, VCWD_GETCWD will do the job and care > about TS/NTS portable way. > > Please also take a look at this wiki page > https://wiki.php.net/internals/review_comments with some useful hints, > like that there should be no PHP_FUNCTION definitions in php_myext.h but > rather in the .cpp file. > > Regards > > Anatol ------------------------------- O'Neil Delpratt Software Developer, Saxonica Limited Email: oneil@saxonica.com Tel: +44 118 946 5894 Web: http://www.saxonica.com Saxonica Community site: http://dev.saxonica.com Bug tracking site: https://saxonica.plan.io/ --Apple-Mail=_CB1F2511-91AA-478A-AA99-6D185B38F8A1--