source:
gs2-extensions/gnome-lib/trunk/src/packages/android-patches/glib-android.patch@
26787
Last change on this file since 26787 was 26787, checked in by , 11 years ago | |
---|---|
File size: 9.9 KB |
-
.28.1/glib/gstrfuncs.c
old new g_ascii_strtod (const gchar *nptr, 442 442 443 443 fail_pos = NULL; 444 444 445 #ifdef __ANDROID__ 446 decimal_point = "."; 447 #else 445 448 locale_data = localeconv (); 446 449 decimal_point = locale_data->decimal_point; 450 #endif 447 451 decimal_point_len = strlen (decimal_point); 448 452 449 453 g_assert (decimal_point_len != 0); … … g_ascii_formatd (gchar *buffer, 656 660 657 661 _g_snprintf (buffer, buf_len, format, d); 658 662 663 #ifdef __ANDROID__ 664 decimal_point = "."; 665 #else 659 666 locale_data = localeconv (); 660 667 decimal_point = locale_data->decimal_point; 668 #endif 661 669 decimal_point_len = strlen (decimal_point); 662 670 663 671 g_assert (decimal_point_len != 0); -
.28.1/glib/gutils.c
old new 29 29 */ 30 30 31 31 #include "config.h" 32 #ifdef __ANDROID__ 33 #undef HAVE_PWD_H 34 #endif 32 35 33 36 #ifdef HAVE_UNISTD_H 34 37 #include <unistd.h> -
.28.1/gio/libasyncns/asyncns.c
old new 18 18 <http://www.gnu.org/licenses/>. 19 19 ***/ 20 20 21 #ifdef __ANDROID__ 22 typedef struct { 23 unsigned id :16; /*%< query identification number */ 24 /* fields in third byte */ 25 unsigned rd :1; /*%< recursion desired */ 26 unsigned tc :1; /*%< truncated message */ 27 unsigned aa :1; /*%< authoritive answer */ 28 unsigned opcode :4; /*%< purpose of message */ 29 unsigned qr :1; /*%< response flag */ 30 /* fields in fourth byte */ 31 unsigned rcode :4; /*%< response code */ 32 unsigned cd: 1; /*%< checking disabled by resolver */ 33 unsigned ad: 1; /*%< authentic data from named */ 34 unsigned unused :1; /*%< unused bits (MBZ as of 4.9.3a3) */ 35 unsigned ra :1; /*%< recursion available */ 36 /* remaining bytes */ 37 unsigned qdcount :16; /*%< number of question entries */ 38 unsigned ancount :16; /*%< number of answer entries */ 39 unsigned nscount :16; /*%< number of authority entries */ 40 unsigned arcount :16; /*%< number of resource entries */ 41 } HEADER; 42 #endif 43 44 21 45 #ifdef HAVE_CONFIG_H 22 46 #include "g-asyncns.h" 23 47 #endif … … 57 81 #include <inttypes.h> 58 82 #endif 59 83 84 #ifdef __ANDROID__ 85 #undef HAVE_SYS_PRCTL_H 86 #endif 87 60 88 #ifdef HAVE_SYS_PRCTL_H 61 89 #include <sys/prctl.h> 62 90 #endif -
.28.1/gio/gresolver.c
old new 20 20 * Boston, MA 02111-1307, USA. 21 21 */ 22 22 23 #ifdef __ANDROID__ 24 /*% 25 * Inline versions of get/put short/long. Pointer is advanced. 26 */ 27 #define NS_INT32SZ 4 /*%< #/bytes of data in a u_int32_t */ 28 #define NS_INT16SZ 2 /*%< #/bytes of data in a u_int16_t */ 29 #define NS_GET16(s, cp) do { \ 30 register const u_char *t_cp = (const u_char *)(cp); \ 31 (s) = ((u_int16_t)t_cp[0] << 8) \ 32 | ((u_int16_t)t_cp[1]) \ 33 ; \ 34 (cp) += NS_INT16SZ; \ 35 } while (0) 36 #define NS_GET32(l, cp) do { \ 37 register const u_char *t_cp = (const u_char *)(cp); \ 38 (l) = ((u_int32_t)t_cp[0] << 24) \ 39 | ((u_int32_t)t_cp[1] << 16) \ 40 | ((u_int32_t)t_cp[2] << 8) \ 41 | ((u_int32_t)t_cp[3]) \ 42 ; \ 43 (cp) += NS_INT32SZ; \ 44 } while (0) 45 46 47 #define GETSHORT NS_GET16 48 #define GETLONG NS_GET32 49 50 #define ns_c_in 1 /*%< Internet. */ 51 #define ns_t_srv 33 /*%< Internet. */ 52 #define C_IN ns_c_in 53 #define T_SRV ns_t_srv 54 55 typedef struct { 56 unsigned id :16; /*%< query identification number */ 57 /* fields in third byte */ 58 unsigned rd :1; /*%< recursion desired */ 59 unsigned tc :1; /*%< truncated message */ 60 unsigned aa :1; /*%< authoritive answer */ 61 unsigned opcode :4; /*%< purpose of message */ 62 unsigned qr :1; /*%< response flag */ 63 /* fields in fourth byte */ 64 unsigned rcode :4; /*%< response code */ 65 unsigned cd: 1; /*%< checking disabled by resolver */ 66 unsigned ad: 1; /*%< authentic data from named */ 67 unsigned unused :1; /*%< unused bits (MBZ as of 4.9.3a3) */ 68 unsigned ra :1; /*%< recursion available */ 69 /* remaining bytes */ 70 unsigned qdcount :16; /*%< number of question entries */ 71 unsigned ancount :16; /*%< number of answer entries */ 72 unsigned nscount :16; /*%< number of authority entries */ 73 unsigned arcount :16; /*%< number of resource entries */ 74 } HEADER; 75 #endif 76 77 23 78 #include "config.h" 24 79 #include <glib.h> 25 80 #include "glibintl.h" -
.28.1/gio/gthreadedresolver.c
old new 20 20 * Boston, MA 02111-1307, USA. 21 21 */ 22 22 23 #ifdef __ANDROID__ 24 /*% 25 * Inline versions of get/put short/long. Pointer is advanced. 26 */ 27 #define NS_INT32SZ 4 /*%< #/bytes of data in a u_int32_t */ 28 #define NS_INT16SZ 2 /*%< #/bytes of data in a u_int16_t */ 29 #define NS_GET16(s, cp) do { \ 30 register const u_char *t_cp = (const u_char *)(cp); \ 31 (s) = ((u_int16_t)t_cp[0] << 8) \ 32 | ((u_int16_t)t_cp[1]) \ 33 ; \ 34 (cp) += NS_INT16SZ; \ 35 } while (0) 36 #define NS_GET32(l, cp) do { \ 37 register const u_char *t_cp = (const u_char *)(cp); \ 38 (l) = ((u_int32_t)t_cp[0] << 24) \ 39 | ((u_int32_t)t_cp[1] << 16) \ 40 | ((u_int32_t)t_cp[2] << 8) \ 41 | ((u_int32_t)t_cp[3]) \ 42 ; \ 43 (cp) += NS_INT32SZ; \ 44 } while (0) 45 46 47 #define GETSHORT NS_GET16 48 #define GETLONG NS_GET32 49 50 #define ns_c_in 1 /*%< Internet. */ 51 #define ns_t_srv 33 /*%< Internet. */ 52 #define C_IN ns_c_in 53 #define T_SRV ns_t_srv 54 55 typedef struct { 56 unsigned id :16; /*%< query identification number */ 57 /* fields in third byte */ 58 unsigned rd :1; /*%< recursion desired */ 59 unsigned tc :1; /*%< truncated message */ 60 unsigned aa :1; /*%< authoritive answer */ 61 unsigned opcode :4; /*%< purpose of message */ 62 unsigned qr :1; /*%< response flag */ 63 /* fields in fourth byte */ 64 unsigned rcode :4; /*%< response code */ 65 unsigned cd: 1; /*%< checking disabled by resolver */ 66 unsigned ad: 1; /*%< authentic data from named */ 67 unsigned unused :1; /*%< unused bits (MBZ as of 4.9.3a3) */ 68 unsigned ra :1; /*%< recursion available */ 69 /* remaining bytes */ 70 unsigned qdcount :16; /*%< number of question entries */ 71 unsigned ancount :16; /*%< number of answer entries */ 72 unsigned nscount :16; /*%< number of authority entries */ 73 unsigned arcount :16; /*%< number of resource entries */ 74 } HEADER; 75 #endif 76 23 77 #include "config.h" 24 78 #include <glib.h> 25 79 #include "glibintl.h" -
.28.1/gio/gunixresolver.c
old new 20 20 * Boston, MA 02111-1307, USA. 21 21 */ 22 22 23 #ifdef __ANDROID__ 24 /*% 25 * Inline versions of get/put short/long. Pointer is advanced. 26 */ 27 #define NS_INT32SZ 4 /*%< #/bytes of data in a u_int32_t */ 28 #define NS_INT16SZ 2 /*%< #/bytes of data in a u_int16_t */ 29 #define NS_GET16(s, cp) do { \ 30 register const u_char *t_cp = (const u_char *)(cp); \ 31 (s) = ((u_int16_t)t_cp[0] << 8) \ 32 | ((u_int16_t)t_cp[1]) \ 33 ; \ 34 (cp) += NS_INT16SZ; \ 35 } while (0) 36 #define NS_GET32(l, cp) do { \ 37 register const u_char *t_cp = (const u_char *)(cp); \ 38 (l) = ((u_int32_t)t_cp[0] << 24) \ 39 | ((u_int32_t)t_cp[1] << 16) \ 40 | ((u_int32_t)t_cp[2] << 8) \ 41 | ((u_int32_t)t_cp[3]) \ 42 ; \ 43 (cp) += NS_INT32SZ; \ 44 } while (0) 45 46 47 #define GETSHORT NS_GET16 48 #define GETLONG NS_GET32 49 50 #define ns_c_in 1 /*%< Internet. */ 51 #define ns_t_srv 33 /*%< Internet. */ 52 #define C_IN ns_c_in 53 #define T_SRV ns_t_srv 54 55 typedef struct { 56 unsigned id :16; /*%< query identification number */ 57 /* fields in third byte */ 58 unsigned rd :1; /*%< recursion desired */ 59 unsigned tc :1; /*%< truncated message */ 60 unsigned aa :1; /*%< authoritive answer */ 61 unsigned opcode :4; /*%< purpose of message */ 62 unsigned qr :1; /*%< response flag */ 63 /* fields in fourth byte */ 64 unsigned rcode :4; /*%< response code */ 65 unsigned cd: 1; /*%< checking disabled by resolver */ 66 unsigned ad: 1; /*%< authentic data from named */ 67 unsigned unused :1; /*%< unused bits (MBZ as of 4.9.3a3) */ 68 unsigned ra :1; /*%< recursion available */ 69 /* remaining bytes */ 70 unsigned qdcount :16; /*%< number of question entries */ 71 unsigned ancount :16; /*%< number of answer entries */ 72 unsigned nscount :16; /*%< number of authority entries */ 73 unsigned arcount :16; /*%< number of resource entries */ 74 } HEADER; 75 #endif 76 77 78 23 79 #include "config.h" 24 80 #include <glib.h> 25 81 #include "glibintl.h" -
.28.1/gio/glocalfileinfo.c
old new lookup_uid_data (uid_t uid) 1096 1096 if (pwbufp->pw_name != NULL && pwbufp->pw_name[0] != 0) 1097 1097 data->user_name = convert_pwd_string_to_utf8 (pwbufp->pw_name); 1098 1098 1099 #ifdef __ANDROID__ 1100 gecos = NULL; 1101 #else 1099 1102 gecos = pwbufp->pw_gecos; 1103 #endif 1100 1104 1101 1105 if (gecos) 1102 1106 { -
.28.1/gio/ginetaddress.c
old new 20 20 * Authors: Christian Kellner <address@hidden> 21 21 * Samuel Cormier-Iijima <address@hidden> 22 22 */ 23 #ifdef __ANDROID__ 24 #define IN6_IS_ADDR_MC_NODELOCAL(a) \ 25 (IN6_IS_ADDR_MULTICAST(a) \ 26 && ((((__const uint8_t *) (a))[1] & 0xf) == 0x1)) 27 28 #define IN6_IS_ADDR_MC_LINKLOCAL(a) \ 29 (IN6_IS_ADDR_MULTICAST(a) \ 30 && ((((__const uint8_t *) (a))[1] & 0xf) == 0x2)) 31 32 #define IN6_IS_ADDR_MC_SITELOCAL(a) \ 33 (IN6_IS_ADDR_MULTICAST(a) \ 34 && ((((__const uint8_t *) (a))[1] & 0xf) == 0x5)) 35 36 #define IN6_IS_ADDR_MC_ORGLOCAL(a) \ 37 (IN6_IS_ADDR_MULTICAST(a) \ 38 && ((((__const uint8_t *) (a))[1] & 0xf) == 0x8)) 39 40 #define IN6_IS_ADDR_MC_GLOBAL(a) \ 41 (IN6_IS_ADDR_MULTICAST(a) \ 42 && ((((__const uint8_t *) (a))[1] & 0xf) == 0xe)) 43 #endif 23 44 24 45 #include <config.h> 25 46
Note:
See TracBrowser
for help on using the repository browser.