php-5.4.15-android.patch.v1

https://github.com/kitech/android-nmp/blob/master/php-5.4.15-android.patch.v1


diff --git a/Zend/zend_strtod.c b/Zend/zend_strtod.c
index d6e5ccf..82a6e7f 100644
--- a/Zend/zend_strtod.c
+++ b/Zend/zend_strtod.c
@@ -183,7 +183,7 @@ typedef unsigned long int uint32_t;
 #ifndef KR_headers
 #include "stdlib.h"
 #include "string.h"
-#include "locale.h"
+//#include "locale.h"
 #else
 #include "malloc.h"
 #include "memory.h"
diff --git a/ext/sqlite3/libsqlite/sqlite3.c b/ext/sqlite3/libsqlite/sqlite3.c
index d96367e..fca2044 100644
--- a/ext/sqlite3/libsqlite/sqlite3.c
+++ b/ext/sqlite3/libsqlite/sqlite3.c
@@ -27609,6 +27609,10 @@ SQLITE_API int sqlite3_fullsync_count = 0;
 # define fdatasync fsync
 #endif
 
+#if !defined(fdatasync) && defined(ANDROID)
+# define fdatasync fsync
+#endif
+
 /*
 ** Define HAVE_FULLFSYNC to 0 or 1 depending on whether or not
 ** the F_FULLFSYNC macro is defined.  F_FULLFSYNC is currently
diff --git a/ext/standard/dns.c b/ext/standard/dns.c
index 3584fc1..fb5fea2 100644
--- a/ext/standard/dns.c
+++ b/ext/standard/dns.c
@@ -120,6 +120,19 @@
 #endif
 /* }}} */
 
+#include "../../../compat/nameser.h"
+#define T_A DNS_T_A
+#define T_ANY DNS_T_ANY
+#define T_MX DNS_T_MX
+#define C_IN 0
+typedef struct HEADER {
+int qdcount;
+int ancount;
+int nscount;
+int arcount;
+} HEADER;
+
+
 static char *php_gethostbyaddr(char *ip);
 static char *php_gethostbyname(char *name);
 
diff --git a/main/main.c b/main/main.c
index 7a253f8..3393eb0 100644
--- a/main/main.c
+++ b/main/main.c
@@ -50,7 +50,7 @@
 #include <signal.h>
 #endif
 #if HAVE_SETLOCALE
-#include <locale.h>
+// #include <locale.h>
 #endif
 #include "zend.h"
 #include "zend_extensions.h"
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index c8dfec0..67cb022 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -52,7 +52,7 @@
 #endif
 
 #if HAVE_SETLOCALE
-# include <locale.h>
+//# include <locale.h>
 #endif
 
 #if HAVE_SYS_TYPES_H
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index c01f370..a47f29a 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -50,7 +50,7 @@
 #include <signal.h>
 #endif
 #if HAVE_SETLOCALE
-#include <locale.h>
+//#include <locale.h>
 #endif
 #include "zend.h"
 #include "zend_extensions.h"
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index 903f042..45aa0f2 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -52,7 +52,7 @@
 #include <signal.h>
 #endif
 #if HAVE_SETLOCALE
-#include <locale.h>
+//#include <locale.h>
 #endif
 #if HAVE_DLFCN_H
 #include <dlfcn.h>
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 61088c4..f1a440d 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -56,7 +56,7 @@
 #endif
 
 #if HAVE_SETLOCALE
-# include <locale.h>
+// # include <locale.h>
 #endif
 
 #if HAVE_SYS_TYPES_H
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
阅读(34) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
评论热议
posted @ 2016-02-01 00:00  张同光  阅读(70)  评论(0编辑  收藏  举报