php-5.5.1-android.patch.v3
https://github.com/kitech/android-nmp/blob/master/php-5.5.1-android.patch.v3
[root@localhost php-5.6.14]# man res_init
[root@localhost php-5.6.14]# find /opt/android-on-linux/android-ndk-r10d/platforms/android-14/arch-arm/usr/include -name nameser.h
/opt/android-on-linux/android-ndk-r10d/platforms/android-14/arch-arm/usr/include/arpa/nameser.h
[root@localhost php-5.6.14]# find /opt/android-on-linux/android-ndk-r10d/platforms/android-14/arch-arm/usr/include -name in.h
/opt/android-on-linux/android-ndk-r10d/platforms/android-14/arch-arm/usr/include/linux/in.h
/opt/android-on-linux/android-ndk-r10d/platforms/android-14/arch-arm/usr/include/netinet/in.h
[root@localhost php-5.6.14]# find /opt/android-on-linux/android-ndk-r10d/platforms/android-14/arch-arm/usr/include -name resolv.h
/opt/android-on-linux/android-ndk-r10d/platforms/android-14/arch-arm/usr/include/resolv.h
------------------------------------------------------------------------------------
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/mysqlnd/mysqlnd_portability.h b/ext/mysqlnd/mysqlnd_portability.h
index b947915..b274160 100644
--- a/ext/mysqlnd/mysqlnd_portability.h
+++ b/ext/mysqlnd/mysqlnd_portability.h
@@ -37,7 +37,7 @@ This file is public domain and comes with NO WARRANTY of any kind */
#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32)
# include "ext/mysqlnd/config-win.h"
#else
-# include
+# include
#endif /* _WIN32... */
#if __STDC_VERSION__ < 199901L && !defined(atoll)
diff --git a/ext/sqlite3/libsqlite/sqlite3.c b/ext/sqlite3/libsqlite/sqlite3.c
index ccd1277..86ea06b 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/basic_functions.c b/ext/standard/basic_functions.c
index 9c91404..e182745 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -1861,6 +1861,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_getlastmod, 0)
ZEND_END_ARG_INFO()
/* }}} */
/* {{{ password.c */
+/*
ZEND_BEGIN_ARG_INFO_EX(arginfo_password_hash, 0, 0, 2)
ZEND_ARG_INFO(0, password)
ZEND_ARG_INFO(0, algo)
@@ -1878,6 +1879,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_password_verify, 0, 0, 2)
ZEND_ARG_INFO(0, password)
ZEND_ARG_INFO(0, hash)
ZEND_END_ARG_INFO()
+*/
/* }}} */
/* {{{ proc_open.c */
#ifdef PHP_CAN_SUPPORT_PROC_OPEN
@@ -2888,11 +2890,12 @@ const zend_function_entry basic_functions[] = { /* {{{ */
PHP_FE(base64_decode, arginfo_base64_decode)
PHP_FE(base64_encode, arginfo_base64_encode)
-
+ /*
PHP_FE(password_hash, arginfo_password_hash)
PHP_FE(password_get_info, arginfo_password_get_info)
PHP_FE(password_needs_rehash, arginfo_password_needs_rehash)
PHP_FE(password_verify, arginfo_password_verify)
+ */
PHP_FE(convert_uuencode, arginfo_convert_uuencode)
PHP_FE(convert_uudecode, arginfo_convert_uudecode)
@@ -3644,7 +3647,7 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */
BASIC_MINIT_SUBMODULE(browscap)
BASIC_MINIT_SUBMODULE(standard_filters)
BASIC_MINIT_SUBMODULE(user_filters)
- BASIC_MINIT_SUBMODULE(password)
+ // BASIC_MINIT_SUBMODULE(password)
#if defined(HAVE_LOCALECONV) && defined(ZTS)
BASIC_MINIT_SUBMODULE(localeconv)
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 "netinet/in.h"
+#include "arpa/nameser.h"
+#include "resolv.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 90474cd..f12eeca 100644
--- a/main/main.c
+++ b/main/main.c
@@ -50,7 +50,7 @@
#include
#endif
#if HAVE_SETLOCALE
-#include
+// #include
#endif
#include "zend.h"
#include "zend_extensions.h"
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 4c78fca..8c3fc0c 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -52,7 +52,7 @@
#endif
#if HAVE_SETLOCALE
-# include
+//# include
#endif
#if HAVE_SYS_TYPES_H
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 9f3fc4b..a07d50f 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -50,7 +50,7 @@
#include
#endif
#if HAVE_SETLOCALE
-#include
+//#include
#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 a1bae67..5f54b30 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -53,7 +53,7 @@
#include
#endif
#if HAVE_SETLOCALE
-#include
+//#include
#endif
#if HAVE_DLFCN_H
#include
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 043e0e0..47d2e31 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -56,7 +56,7 @@
#endif
#if HAVE_SETLOCALE
-# include
+// # include
#endif
#if HAVE_SYS_TYPES_H
阅读(63) | 评论(0) | 转发(0) |
<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>
[root@localhost php-5.6.14]# man res_init
[root@localhost php-5.6.14]# find /opt/android-on-linux/android-ndk-r10d/platforms/android-14/arch-arm/usr/include -name nameser.h
/opt/android-on-linux/android-ndk-r10d/platforms/android-14/arch-arm/usr/include/arpa/nameser.h
[root@localhost php-5.6.14]# find /opt/android-on-linux/android-ndk-r10d/platforms/android-14/arch-arm/usr/include -name in.h
/opt/android-on-linux/android-ndk-r10d/platforms/android-14/arch-arm/usr/include/linux/in.h
/opt/android-on-linux/android-ndk-r10d/platforms/android-14/arch-arm/usr/include/netinet/in.h
[root@localhost php-5.6.14]# find /opt/android-on-linux/android-ndk-r10d/platforms/android-14/arch-arm/usr/include -name resolv.h
/opt/android-on-linux/android-ndk-r10d/platforms/android-14/arch-arm/usr/include/resolv.h
------------------------------------------------------------------------------------
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/mysqlnd/mysqlnd_portability.h b/ext/mysqlnd/mysqlnd_portability.h
index b947915..b274160 100644
--- a/ext/mysqlnd/mysqlnd_portability.h
+++ b/ext/mysqlnd/mysqlnd_portability.h
@@ -37,7 +37,7 @@ This file is public domain and comes with NO WARRANTY of any kind */
#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32)
# include "ext/mysqlnd/config-win.h"
#else
-# include
+# include
#endif /* _WIN32... */
#if __STDC_VERSION__ < 199901L && !defined(atoll)
diff --git a/ext/sqlite3/libsqlite/sqlite3.c b/ext/sqlite3/libsqlite/sqlite3.c
index ccd1277..86ea06b 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/basic_functions.c b/ext/standard/basic_functions.c
index 9c91404..e182745 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -1861,6 +1861,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_getlastmod, 0)
ZEND_END_ARG_INFO()
/* }}} */
/* {{{ password.c */
+/*
ZEND_BEGIN_ARG_INFO_EX(arginfo_password_hash, 0, 0, 2)
ZEND_ARG_INFO(0, password)
ZEND_ARG_INFO(0, algo)
@@ -1878,6 +1879,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_password_verify, 0, 0, 2)
ZEND_ARG_INFO(0, password)
ZEND_ARG_INFO(0, hash)
ZEND_END_ARG_INFO()
+*/
/* }}} */
/* {{{ proc_open.c */
#ifdef PHP_CAN_SUPPORT_PROC_OPEN
@@ -2888,11 +2890,12 @@ const zend_function_entry basic_functions[] = { /* {{{ */
PHP_FE(base64_decode, arginfo_base64_decode)
PHP_FE(base64_encode, arginfo_base64_encode)
-
+ /*
PHP_FE(password_hash, arginfo_password_hash)
PHP_FE(password_get_info, arginfo_password_get_info)
PHP_FE(password_needs_rehash, arginfo_password_needs_rehash)
PHP_FE(password_verify, arginfo_password_verify)
+ */
PHP_FE(convert_uuencode, arginfo_convert_uuencode)
PHP_FE(convert_uudecode, arginfo_convert_uudecode)
@@ -3644,7 +3647,7 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */
BASIC_MINIT_SUBMODULE(browscap)
BASIC_MINIT_SUBMODULE(standard_filters)
BASIC_MINIT_SUBMODULE(user_filters)
- BASIC_MINIT_SUBMODULE(password)
+ // BASIC_MINIT_SUBMODULE(password)
#if defined(HAVE_LOCALECONV) && defined(ZTS)
BASIC_MINIT_SUBMODULE(localeconv)
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 "netinet/in.h"
+#include "arpa/nameser.h"
+#include "resolv.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 90474cd..f12eeca 100644
--- a/main/main.c
+++ b/main/main.c
@@ -50,7 +50,7 @@
#include
#endif
#if HAVE_SETLOCALE
-#include
+// #include
#endif
#include "zend.h"
#include "zend_extensions.h"
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 4c78fca..8c3fc0c 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -52,7 +52,7 @@
#endif
#if HAVE_SETLOCALE
-# include
+//# include
#endif
#if HAVE_SYS_TYPES_H
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 9f3fc4b..a07d50f 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -50,7 +50,7 @@
#include
#endif
#if HAVE_SETLOCALE
-#include
+//#include
#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 a1bae67..5f54b30 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -53,7 +53,7 @@
#include
#endif
#if HAVE_SETLOCALE
-#include
+//#include
#endif
#if HAVE_DLFCN_H
#include
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 043e0e0..47d2e31 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -56,7 +56,7 @@
#endif
#if HAVE_SETLOCALE
-# include
+// # include
#endif
#if HAVE_SYS_TYPES_H
相关热门文章
给主人留下些什么吧!~~
评论热议