[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/main/php_ini.c branches/PHP_5_3/sapi/cgi/cgi_main.c trunk/main/php_ini.c trunk/sapi/cgi/cgi_main.c

2009-10-09 Thread Garrett Serack
garretts Fri, 09 Oct 2009 19:43:00 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=289445

Log:
- changed ini file directives [PATH=](on Win32) and [HOST=](on all) to be case 
insensitive (garretts)

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/main/php_ini.c
U   php/php-src/branches/PHP_5_3/sapi/cgi/cgi_main.c
U   php/php-src/trunk/main/php_ini.c
U   php/php-src/trunk/sapi/cgi/cgi_main.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-10-09 19:13:33 UTC (rev 289444)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-10-09 19:43:00 UTC (rev 289445)
@@ -1,6 +1,8 @@
 PHPNEWS
 |||
 ?? ??? 20??, PHP 5.3.2
+- changed ini file directives [PATH=](on Win32) and [HOST=](on all) to be case
+  insensitive (garretts)
 - Added ReflectionMethod::setAccessible() for invoking non-public methods
   through the Reflection API. (Sebastian)


Modified: php/php-src/branches/PHP_5_3/main/php_ini.c
===
--- php/php-src/branches/PHP_5_3/main/php_ini.c 2009-10-09 19:13:33 UTC (rev 
289444)
+++ php/php-src/branches/PHP_5_3/main/php_ini.c 2009-10-09 19:43:00 UTC (rev 
289445)
@@ -41,6 +41,20 @@
 #define S_ISREG(mode)   (((mode)  S_IFMT) == S_IFREG)
 #endif

+#ifdef PHP_WIN32
+#define TRANSLATE_SLASHES(path) \
+   { \
+   char *tmp = path; \
+   while (*tmp) { \
+   if (*tmp == '\\') *tmp = '/'; \
+   tmp++; \
+   } \
+   }
+#else
+#define TRANSLATE_SLASHES(path)
+#endif
+
+
 typedef struct _php_extension_lists {
zend_llist engine;
zend_llist functions;
@@ -273,7 +287,13 @@
key_len = Z_STRLEN_P(arg1) - 
sizeof(PATH) + 1;
is_special_section = 1;
has_per_dir_config = 1;
+#ifdef PHP_WIN32
+   // make the path lowercase on Windows, 
for case insensitivty.
+   strlwr(key);

+   TRANSLATE_SLASHES(key);
+#endif
+
/* HOST sections */
} else if (!strncasecmp(Z_STRVAL_P(arg1), 
HOST, sizeof(HOST) - 1)) {
key = Z_STRVAL_P(arg1);
@@ -281,6 +301,7 @@
key_len = Z_STRLEN_P(arg1) - 
sizeof(HOST) + 1;
is_special_section = 1;
has_per_host_config = 1;
+   strlwr(key); // host names are 
case-insensitive.

} else {
is_special_section = 0;

Modified: php/php-src/branches/PHP_5_3/sapi/cgi/cgi_main.c
===
--- php/php-src/branches/PHP_5_3/sapi/cgi/cgi_main.c2009-10-09 19:13:33 UTC 
(rev 289444)
+++ php/php-src/branches/PHP_5_3/sapi/cgi/cgi_main.c2009-10-09 19:43:00 UTC 
(rev 289445)
@@ -754,7 +754,11 @@
  if it is inside the docroot, we scan the tree up to the 
docroot
to find more user.ini, if not we only scan the current 
path.
  */
+#ifdef PHP_WIN32
+   if (strnicmp(s1, s2, s_len) == 0) {
+#else
if (strncmp(s1, s2, s_len) == 0) {
+#endif
ptr = s2 + start;  /* start is the point where doc_root 
ends! */
while ((ptr = strchr(ptr, DEFAULT_SLASH)) != NULL) {
*ptr = 0;
@@ -777,7 +781,7 @@
 static int sapi_cgi_activate(TSRMLS_D)
 {
char *path, *doc_root, *server_name;
-   uint path_len, doc_root_len;
+   uint path_len, doc_root_len, server_name_len;

/* PATH_TRANSLATED should be defined at this stage but better safe than 
sorry :) */
if (!SG(request_info).path_translated) {
@@ -789,7 +793,11 @@
server_name = sapi_cgibin_getenv(SERVER_NAME, 
sizeof(SERVER_NAME) - 1 TSRMLS_CC);
/* SERVER_NAME should also be defined at this stage..but better 
check it anyway */
if (server_name) {
-   php_ini_activate_per_host_config(server_name, 
strlen(server_name) + 1 TSRMLS_CC);
+   server_name_len = strlen(server_name);
+   server_name = estrndup(server_name, strlen(server_name) 
);
+   strlwr(server_name);
+   php_ini_activate_per_host_config(server_name, 
server_name_len + 1 TSRMLS_CC);
+   

RE: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/win32/sendmail.c branches/PHP_5_3/NEWS branches/PHP_5_3/win32/sendmail.c trunk/win32/sendmail.c

2009-08-19 Thread Garrett Serack
I, uh... had a distracting day yesterday. :)

G

-Original Message-
From: Jani Taskinen [mailto:jani.taski...@iki.fi]
Sent: Wednesday, August 19, 2009 4:29 AM
To: Garrett Serack
Cc: php-cvs@lists.php.net
Subject: Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS 
branches/PHP_5_2/win32/sendmail.c branches/PHP_5_3/NEWS 
branches/PHP_5_3/win32/sendmail.c trunk/win32/sendmail.c

On 08/18/2009 09:58 PM, Garrett Serack wrote:
 garretts Tue, 18 Aug 2009 18:58:33 +

 Revision: http://svn.php.net/viewvc?view=revisionrevision=287462

 Log:
 - Fixed bug #28038 (Sent incorrect RCPT TO commands to SMTP server)

 Bug: http://bugs.php.net/28038 (Closed) Sent incorrect RCPT TO commands to 
 SMTP server

heh, why did you mention in the bug report that you fixed it in
5.3.1-dev when you did fix it in all branches..? :)

--Jani


 Changed paths:
  U   php/php-src/branches/PHP_5_2/NEWS
  U   php/php-src/branches/PHP_5_2/win32/sendmail.c
  U   php/php-src/branches/PHP_5_3/NEWS
  U   php/php-src/branches/PHP_5_3/win32/sendmail.c
  U   php/php-src/trunk/win32/sendmail.c






Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/TSRM/tsrm_win32.c trunk/TSRM/tsrm_win32.c

2009-08-19 Thread Garrett Serack
Howdy,

There are a couple of issues with making all child processes go thru cmd.exe.

Initially, this prevents popen_ex from failing when the actual executable 
doesn't exist, since cmd.exe /c c:\foo\bar\xxx.exe will *always* successfully 
start a process. This can be seen in bug #43327.

Second, is that by having the intermediate process, I'm pretty sure there's 
some extra-buffering of the input/output streams going on (once for the child 
proc, and once for the cmd.exe). This (probably along with a too-small pipe 
buffer) contributes to the behavior found in #44994.

Finally, I can't for the life of me see what benefit this brings to the table.  
Other languages don't need to put cmd.exe in the middle of their children. The 
only case may be where someone wants to use built-in cmd.exe commands like 
'dir' on popen_ex() , which would not be right anyway, and they should 
explicitly include the command processor in their command line.

If fixing this causes a problem elsewhere, we're better off fixing that 
appropriately, rather than dragging around a redundant copy of the command 
processor for every child process.

Hi!

- cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof( /c )+2);
- sprintf(cmd, %s /c \%s\, TWG(comspec), command);
- if (!CreateProcess(NULL, cmd, security, security, security.bInheritHandle, 
dwCreateFlags, env, cwd, startup, process)) {
+ if (!CreateProcess(NULL, command, security, security, 
security.bInheritHandle, dwCreateFlags, env, cwd, startup, process)) { return 
NULL;


Could you explain this change? It seems to change the semantics of popen in a 
significant way...
--


Garrett Serack | Open Source Software Developer | Microsoft Corporation
Office:(425)706-7939
email/messenger: garre...@microsoft.com
blog: http://fearthecowboy.com


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS

2009-08-18 Thread Garrett Serack
garretts Tue, 18 Aug 2009 14:38:41 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=287455

Log:
added missing NEWS entry for bug #49223

Bug: http://bugs.php.net/49223 (Closed) Inconsistency using 
get_defined_constants(true)
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-08-18 14:08:03 UTC (rev 287454)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-08-18 14:38:41 UTC (rev 287455)
@@ -1,6 +1,9 @@
 PHPNEWS
 |||
 ?? ??? 2009, PHP 5.3.1
+
+- Fix for bug #49223 Inconsistency using get_defined_constants (Garrett)
+
 - Upgraded bundled sqlite to version 3.6.17. (Scott)

 - Added missing sanity checks around exif processing. (Ilia)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/win32/sendmail.c branches/PHP_5_3/NEWS branches/PHP_5_3/win32/sendmail.c trunk/win32/sendmail.c

2009-08-18 Thread Garrett Serack
garretts Tue, 18 Aug 2009 18:58:33 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=287462

Log:
- Fixed bug #28038 (Sent incorrect RCPT TO commands to SMTP server)

Bug: http://bugs.php.net/28038 (Closed) Sent incorrect RCPT TO commands to SMTP 
server
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/win32/sendmail.c
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/win32/sendmail.c
U   php/php-src/trunk/win32/sendmail.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS	2009-08-18 18:28:59 UTC (rev 287461)
+++ php/php-src/branches/PHP_5_2/NEWS	2009-08-18 18:58:33 UTC (rev 287462)
@@ -8,6 +8,7 @@
 - Fixed bug #49236 (Missing PHP_SUBST(PDO_MYSQL_SHARED_LIBADD)). (Jani)
 - Fixed bug #49144 (Import of schema from different host transmits original
   authentication details). (Dmitry)
+- Fixed bug #28038  (Sent incorrect RCPT TO commands to SMTP server) (Garrett)


 13 Aug 2009, PHP 5.2.11RC1

Modified: php/php-src/branches/PHP_5_2/win32/sendmail.c
===
--- php/php-src/branches/PHP_5_2/win32/sendmail.c	2009-08-18 18:28:59 UTC (rev 287461)
+++ php/php-src/branches/PHP_5_2/win32/sendmail.c	2009-08-18 18:58:33 UTC (rev 287462)
@@ -421,7 +421,7 @@
 	}

 	SMTP_SKIP_SPACE(RPath);
-	snprintf(Buffer, MAIL_BUFFER_SIZE, MAIL FROM:%s\r\n, RPath);
+	FormatEmailAddress(Buffer, RPath, MAIL FROM:%s\r\n);
 	if ((res = Post(Buffer)) != SUCCESS) {
 		return (res);
 	}
@@ -436,7 +436,7 @@
 	while (token != NULL)
 	{
 		SMTP_SKIP_SPACE(token);
-		snprintf(Buffer, MAIL_BUFFER_SIZE, RCPT TO:%s\r\n, token);
+		FormatEmailAddress(Buffer, token, RCPT TO:%s\r\n);
 		if ((res = Post(Buffer)) != SUCCESS) {
 			efree(tempMailTo);
 			return (res);
@@ -457,7 +457,7 @@
 		while (token != NULL)
 		{
 			SMTP_SKIP_SPACE(token);
-			snprintf(Buffer, MAIL_BUFFER_SIZE, RCPT TO:%s\r\n, token);
+			FormatEmailAddress(Buffer, token, RCPT TO:%s\r\n);
 			if ((res = Post(Buffer)) != SUCCESS) {
 efree(tempMailTo);
 return (res);
@@ -487,7 +487,7 @@
 		while (token != NULL)
 		{
 			SMTP_SKIP_SPACE(token);
-			snprintf(Buffer, MAIL_BUFFER_SIZE, RCPT TO:%s\r\n, token);
+			FormatEmailAddress(Buffer, token, RCPT TO:%s\r\n);
 			if ((res = Post(Buffer)) != SUCCESS) {
 efree(tempMailTo);
 return (res);
@@ -512,7 +512,7 @@
 		while (token != NULL)
 		{
 			SMTP_SKIP_SPACE(token);
-			snprintf(Buffer, MAIL_BUFFER_SIZE, RCPT TO:%s\r\n, token);
+			FormatEmailAddress(Buffer, token, RCPT TO:%s\r\n);
 			if ((res = Post(Buffer)) != SUCCESS) {
 efree(tempMailTo);
 return (res);
@@ -545,7 +545,7 @@
 			while (token != NULL)
 			{
 SMTP_SKIP_SPACE(token);
-snprintf(Buffer, MAIL_BUFFER_SIZE, RCPT TO:%s\r\n, token);
+FormatEmailAddress(Buffer, token, RCPT TO:%s\r\n);
 if ((res = Post(Buffer)) != SUCCESS) {
 	efree(tempMailTo);
 	return (res);
@@ -922,3 +922,30 @@
 	}
 	return (lAddr);
 } /* end GetAddr() */
+
+
+/*
+// Name:  int FormatEmailAddress
+// Input:
+// Output:
+// Description: Formats the email address to remove any content ouside
+//   of the angle brackets   as per RFC 2821.
+//
+//   Returns the invalidly formatted mail address if the   are
+//   unbalanced (the SMTP server should reject it if it's out of spec.)
+//
+// Author/Date:  garretts 08/18/2009
+// History:
+///
+int FormatEmailAddress(char* Buffer, char* EmailAddress, char* FormatString )  {
+	char *tmpAddress1, *tmpAddress2;
+	int result;
+
+	if( (tmpAddress1 = strchr(EmailAddress, ''))  (tmpAddress2 = strchr(tmpAddress1, ''))  ) {
+		*tmpAddress2 = 0; // terminate the string temporarily.
+		result = snprintf(Buffer, MAIL_BUFFER_SIZE, FormatString , tmpAddress1+1);
+		*tmpAddress2 = ''; // put it back the way it was.
+		return result;
+	}
+	return snprintf(Buffer, MAIL_BUFFER_SIZE , FormatString , EmailAddress );
+} /* end FormatEmailAddress() */

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS	2009-08-18 18:28:59 UTC (rev 287461)
+++ php/php-src/branches/PHP_5_3/NEWS	2009-08-18 18:58:33 UTC (rev 287462)
@@ -146,6 +146,7 @@
   com, Kalle)
 - Fixed bug #38091 (Mail() does not use FQDN when sending SMTP helo).
   (Kalle, Rick Yorgason)
+- Fixed bug #28038  (Sent incorrect RCPT TO commands to SMTP server) (Garrett)

 30 Jun 2009, PHP 5.3.0
 - Upgraded bundled PCRE to version 7.9. (Nuno)

Modified: php/php-src/branches/PHP_5_3/win32/sendmail.c
===
--- php/php-src/branches/PHP_5_3/win32/sendmail.c	2009-08-18 18:28:59 UTC (rev 287461)
+++ 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/hash/hash.c trunk/ext/hash/hash.c

2009-08-17 Thread Garrett Serack
garretts Mon, 17 Aug 2009 21:28:22 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=287429

Log:
- Fix for bug #49223 Inconsistency using get_defined_constants(true)

Bug: http://bugs.php.net/49223 (Open) Inconsistency using 
get_defined_constants(true)
  
Changed paths:
U   php/php-src/branches/PHP_5_3/ext/hash/hash.c
U   php/php-src/trunk/ext/hash/hash.c

Modified: php/php-src/branches/PHP_5_3/ext/hash/hash.c
===
--- php/php-src/branches/PHP_5_3/ext/hash/hash.c2009-08-17 20:38:54 UTC 
(rev 287428)
+++ php/php-src/branches/PHP_5_3/ext/hash/hash.c2009-08-17 21:28:22 UTC 
(rev 287429)
@@ -643,8 +643,7 @@
len = slprintf(buf, 127, MHASH_%s, algorithm.mhash_name, 
strlen(algorithm.mhash_name));
zend_register_long_constant(buf, len + 1, algorithm.value, 
CONST_CS | CONST_PERSISTENT, module_number TSRMLS_CC);
}
-
-   zend_register_module_ex(mhash_module_entry TSRMLS_CC);
+   zend_register_internal_module(mhash_module_entry TSRMLS_CC);
 }

 /* {{{ proto string mhash(int hash, string data [, string key])

Modified: php/php-src/trunk/ext/hash/hash.c
===
--- php/php-src/trunk/ext/hash/hash.c   2009-08-17 20:38:54 UTC (rev 287428)
+++ php/php-src/trunk/ext/hash/hash.c   2009-08-17 21:28:22 UTC (rev 287429)
@@ -812,8 +812,7 @@
len = slprintf(buf, 127, MHASH_%s, algorithm.mhash_name, 
strlen(algorithm.mhash_name));
zend_register_long_constant(buf, len + 1, algorithm.value, 
CONST_CS | CONST_PERSISTENT, module_number TSRMLS_CC);
}
-
-   zend_register_module_ex(mhash_module_entry TSRMLS_CC);
+   zend_register_internal_module(mhash_module_entry TSRMLS_CC);
 }

 /* {{{ proto binary mhash(int hash, binary data [, binary key]) U

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/sapi/embed/php_embed.c branches/PHP_5_2/sapi/embed/php_embed.h branches/PHP_5_3/sapi/embed/php_embed.c branches/PHP_5_3/sapi/embed/php_embed.h trunk/sapi/

2009-07-30 Thread Garrett Serack
garretts Thu, 30 Jul 2009 20:20:56 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286569

Log:
- Updated fix for bug #48911 (embed sapi misses SAPI_API)
#- Windows didn't need SAPI_API

Bug: http://bugs.php.net/48911 (Closed) embed sapi misses SAPI_API
  
Changed paths:
U   php/php-src/branches/PHP_5_2/sapi/embed/php_embed.c
U   php/php-src/branches/PHP_5_2/sapi/embed/php_embed.h
U   php/php-src/branches/PHP_5_3/sapi/embed/php_embed.c
U   php/php-src/branches/PHP_5_3/sapi/embed/php_embed.h
U   php/php-src/trunk/sapi/embed/php_embed.c
U   php/php-src/trunk/sapi/embed/php_embed.h

Modified: php/php-src/branches/PHP_5_2/sapi/embed/php_embed.c
===
--- php/php-src/branches/PHP_5_2/sapi/embed/php_embed.c 2009-07-30 18:02:20 UTC 
(rev 286568)
+++ php/php-src/branches/PHP_5_2/sapi/embed/php_embed.c 2009-07-30 20:20:56 UTC 
(rev 286569)
@@ -107,7 +107,7 @@
return SUCCESS;
 }

-extern SAPI_API sapi_module_struct php_embed_module = {
+extern EMBED_SAPI_API sapi_module_struct php_embed_module = {
embed,   /* name */
PHP Embedded Library,/* pretty name */

@@ -139,7 +139,7 @@
 };
 /* }}} */

-SAPI_API int php_embed_init(int argc, char **argv PTSRMLS_DC)
+EMBED_SAPI_API int php_embed_init(int argc, char **argv PTSRMLS_DC)
 {
zend_llist global_vars;
 #ifdef ZTS
@@ -202,7 +202,7 @@
   return SUCCESS;
 }

-SAPI_API void php_embed_shutdown(TSRMLS_D)
+EMBED_SAPI_API void php_embed_shutdown(TSRMLS_D)
 {
php_request_shutdown((void *) 0);
php_module_shutdown(TSRMLS_C);

Modified: php/php-src/branches/PHP_5_2/sapi/embed/php_embed.h
===
--- php/php-src/branches/PHP_5_2/sapi/embed/php_embed.h 2009-07-30 18:02:20 UTC 
(rev 286568)
+++ php/php-src/branches/PHP_5_2/sapi/embed/php_embed.h 2009-07-30 20:20:56 UTC 
(rev 286569)
@@ -57,10 +57,16 @@
   php_embed_shutdown(TSRMLS_C); \
 }

+#ifndef PHP_WIN32
+#define EMBED_SAPI_API SAPI_API
+#else
+#define EMBED_SAPI_API
+#endif
+
 BEGIN_EXTERN_C()
-SAPI_API int php_embed_init(int argc, char **argv PTSRMLS_DC);
-SAPI_API void php_embed_shutdown(TSRMLS_D);
-extern SAPI_API sapi_module_struct php_embed_module;
+EMBED_SAPI_API int php_embed_init(int argc, char **argv PTSRMLS_DC);
+EMBED_SAPI_API void php_embed_shutdown(TSRMLS_D);
+extern EMBED_SAPI_API sapi_module_struct php_embed_module;
 END_EXTERN_C()



Modified: php/php-src/branches/PHP_5_3/sapi/embed/php_embed.c
===
--- php/php-src/branches/PHP_5_3/sapi/embed/php_embed.c 2009-07-30 18:02:20 UTC 
(rev 286568)
+++ php/php-src/branches/PHP_5_3/sapi/embed/php_embed.c 2009-07-30 20:20:56 UTC 
(rev 286569)
@@ -108,7 +108,7 @@
return SUCCESS;
 }

-extern SAPI_API sapi_module_struct php_embed_module = {
+extern EMBED_SAPI_API sapi_module_struct php_embed_module = {
embed,   /* name */
PHP Embedded Library,/* pretty name */

@@ -152,7 +152,7 @@
{NULL, NULL, NULL}
 };

-SAPI_API int php_embed_init(int argc, char **argv PTSRMLS_DC)
+EMBED_SAPI_API int php_embed_init(int argc, char **argv PTSRMLS_DC)
 {
zend_llist global_vars;
 #ifdef ZTS
@@ -217,7 +217,7 @@
   return SUCCESS;
 }

-SAPI_API void php_embed_shutdown(TSRMLS_D)
+EMBED_SAPI_API void php_embed_shutdown(TSRMLS_D)
 {
php_request_shutdown((void *) 0);
php_module_shutdown(TSRMLS_C);

Modified: php/php-src/branches/PHP_5_3/sapi/embed/php_embed.h
===
--- php/php-src/branches/PHP_5_3/sapi/embed/php_embed.h 2009-07-30 18:02:20 UTC 
(rev 286568)
+++ php/php-src/branches/PHP_5_3/sapi/embed/php_embed.h 2009-07-30 20:20:56 UTC 
(rev 286569)
@@ -57,10 +57,16 @@
   php_embed_shutdown(TSRMLS_C); \
 }

+#ifndef PHP_WIN32
+#define EMBED_SAPI_API SAPI_API
+#else
+#define EMBED_SAPI_API
+#endif
+
 BEGIN_EXTERN_C()
-SAPI_API int php_embed_init(int argc, char **argv PTSRMLS_DC);
-SAPI_API void php_embed_shutdown(TSRMLS_D);
-extern SAPI_API sapi_module_struct php_embed_module;
+EMBED_SAPI_API int php_embed_init(int argc, char **argv PTSRMLS_DC);
+EMBED_SAPI_API void php_embed_shutdown(TSRMLS_D);
+extern EMBED_SAPI_API sapi_module_struct php_embed_module;
 END_EXTERN_C()



Modified: php/php-src/trunk/sapi/embed/php_embed.c
===
--- php/php-src/trunk/sapi/embed/php_embed.c2009-07-30 18:02:20 UTC (rev 
286568)
+++ php/php-src/trunk/sapi/embed/php_embed.c2009-07-30 20:20:56 UTC (rev 
286569)
@@ -108,7 +108,7 @@
return SUCCESS;
 }

-extern SAPI_API sapi_module_struct php_embed_module = {
+extern EMBED_SAPI_API sapi_module_struct php_embed_module = {
embed,   /* name */
PHP Embedded Library,/*