1Bionic ChangeLog: 2----------------- 3 4Differences between current and Android 2.2: 5 6- <pthread.h>: Add reader/writer locks implementation. Add sanity 7 checking to pthread_mutex_destroy() (e.g. a locked mutex will return 8 EBUSY). 9 10- <semaphore.h>: Use private futexes for semaphore implementation, 11 unless your set 'pshared' to non-0 when calling sem_init(). 12 13 Also fixed a bug in sem_post() to make it wake up all waiting 14 threads, instead of one. As a consequence, the maximum semaphore 15 value is now reduced to 0x3fffffff. 16 17- <math.h>: Added sincos(), sincosf() and sincosl() (GLibc compatibility). 18 19- <sys/sysinfo.h>: Added missing sysinfo() system call implementation 20 (the function was already declared in the header though). 21 22- sysconf() didn't work for some arguments due to a small bug in the 23 /proc line parser. 24 25- <termio.h>: added missing header (just includes <termios.h>) 26 27- <unistd.h>: add missing declaration for truncate(). The implementation 28 was already here since Android 1.5. 29 30 modify implementation of alarm() to return 0 in case of error (i.e. 31 if a value larger than 0x7fffffff seconds is passed to it). This 32 makes the implementation compliant with the GLibc behaviour. 33 34- <wchar.h>: small fixes to really support wchar_t in Bionic (not there yet). 35 36 the size of wchar_t is still 32-bit (decided by the compiler) 37 38 WCHAR_MIN: changed from 0 to INT_MIN 39 WCHAR_MAX: changed from 255 to INT_MAX 40 41 wcpcpy(), wcpncpy(), wcscat(), wcschr(), wcscmp(), 42 wcscpy(), wcscspn(), wcsdup(), wcslcat(), wcslcpy(), 43 wcslen(), wcsncat(), wcsncmp(), wcsncpy(), wcsnlen(), 44 wcspbrk(), wcsrchr(), wcsrchr(), wcsspn(), wcsstr(), 45 wcstok(), wcswidth(), wmemchr(), wmemcmp(), wmemcpy(), 46 wmemmove(), wmemset(): Added proper implementations. 47 48 wcscasecmp(), wcsncasecmp(): Added implementation limited 49 to ASCII codes for lower/upper. 50 51 wcscoll(): added dummy implementation that calls wcscmp() 52 wcsxfrm(): added dummy implementation that calls wcsncpy() 53 54 NOTE: Technically, this breaks the ABI, but we never claimed to support 55 wchar_t anyway. The wchar_t support is still *NOT* official at this 56 point. We need better multi-byte support code, and wprintf/wscanf 57 stuff too. 58 59- <inttypes.h>: add missing declarations for strntoimax abd strntoumax. 60 61- <stdlib.h>: add missing declarations for drand48() and erand48(). 62 63- clearerr(): fix broken implementation. 64 65- Feature test macros like _POSIX_C_SOURCE / _XOPEN_SOURCE / _C99_SOURCE 66 are now handled correctly by our C library headers (see <sys/cdefs.h>) 67 68- <sys/select.h>: add missing declaration for pselect() 69 70- <sys/vfs.h>: fixed implementation of fstatfs() (also fixes fpathconf() 71 which uses it). 72 73- <dlfcn.h>: fixed dlopen() implementation to support dlopen(NULL, ...). 74 This allows one to look at the dynamic symbols exported by an executable. 75 76- <private/bionic_tls.h>: use kernel helper functions for static versions 77 of the C library. This is necessary because we don't know where the corresponding 78 machine code is going to run, and the optimization for __get_tls() might 79 not match the features of the target device where we run a static executable 80 linked to the C library. This fixes one of the bug that explains why gdbserver 81 didn't work well with threads. 82 83------------------------------------------------------------------------------- 84Differences between Android 2.2. and Android 2.1: 85 86- Support FP register save/load in setjmp()/longjmp() on ARMv7 builds. 87 88- Add support for SH-4 CPU architecture ! 89 90- __atomic_swap(): use LDREX/STREX CPU instructions on ARMv6 and higher. 91 92- <arpa/telnet.h>: New header (declarations only, no implementation). 93 94- <err.h>: New header + implementation. GLibc compatibility. 95 96- <warn.h>: New header + implementation. GLibc compatibility. 97 98- <fts.h>: New header + implementation. 99 100- <mntent.h>: Add missing <stdio.h> include. 101 102- <regex.h>: New header + implementation. 103 104- <signal.h>: Added killpg() 105 106- <stdint.h>: Allow 64-bit type declarations on C99 builds. 107 108- <stdio.h>: Add fdprintf() and vfdprintf(). Note that GLibc provides 109 the confusing 'dprintf' and 'vdprintf()' functions instead. 110 111- <stdlib.h>: Fix ptsname_r(): the return type is int instead of char*. 112 The mistake comes from a GLibc man page bug (the man page listed a return 113 type of char*, while the implementation used int. Fixed in late 2009 only). 114 The Bionic implementation was incorrect. Technically, this is an ABI 115 breakage, but code that used this function probably never worked or 116 compiled properly anyway. 117 118- <strings.h>: Add missing <sys/types.h> include. 119 120- <sys/queue.h>: Added new header (no implementation - macro templates). 121 122- <sys/resource.h>: Add rlim_t proper definition. 123 124- <time64.h>: Add missing C++ header inclusion guards. 125 126- <unistd.h>: Add getusershell(), setusershell() and endusershell(), though 127 implementation are bogus. GLibc compatibility. 128 129- <wchar.h>: Add mbstowcs() and wcstombs() 130 131- add clone() implementation for ARM (x86 and SH-4 not working yet). 132 133- <sys/epoll.h>: <sys/system_properties.h>: Add missing C++ inclusion guards 134 135- fix getpwnam() and getpwgrp() to accept "app_0" as a valid user name. 136 137- fix sem_trywait() to return -1 and set errno to EAGAIN, instead of 138 returning EAGAIN directly. 139 140- fix sem_post() to wake up multiple threads when called rapidly in 141 succession. 142 143- DNS: partial implementation of RFC3484 (rule 1, 2, 5, 6, 8, 10 and 144 modified rule 9), for better address selection/sorting. 145 In the process, removed code that was previously used for "sortlist" 146 in /etc/resolv.conf. (resolv.conf is already ignored, so the latter 147 is a no-op for actual functionality.) 148 149- fix pthread_sigmask() to properly return an error code without touching 150 errno. Previous implementation returned -1 on error, setting errno, which 151 is not Posix compliant. 152 153- add sigaltstack() implementation for ARM. 154 155- <time.h>: Properly implement the 'timezone' and 'daylight' global variables 156 (they were not defined previously, though declared in the header). 157 158- <time.h>: Fix timezone management implementation to properly update 159 'tm_gmtoff' field in 'struct tm' structure. 160 161- DNS: get rid of spurious random DNS queries when trying to resolve 162 an unknown domain name. Due to an initialization bug, a random DNS search 163 list was generated for each thread if net.dns.search is not defined. 164 165- <pthread.h>: Add pthread_condattr_init/destroy/setpshared/getpshared functions 166 to enable proper shared conditional variable initialization. 167 168 Modify the pthread_mutex_t and pthread_cond_t implementation to use private 169 futexes for performance reasons. Mutexes and Condvars are no longer shareable 170 between processes by default anymore, unless you use PTHREAD_PROCESS_SHARED 171 with pthread_mutexattr_setpshared() and/or pthread_condattr_setpshared(). 172 173------------------------------------------------------------------------------- 174Differences between Android 2.1 and 2.0.1: 175 176- zoneinfo: updated data tables to version 2009s 177 178 179------------------------------------------------------------------------------- 180Differences between Android 2.0.1 and 2.0: 181 182- abort(): ARM-specific hack to preserve the 'lr' register when abort() 183 is called (GCC does not preserve it by default since it thinks that 184 abort() never returns). This improves stack traces considerably. 185 186 187------------------------------------------------------------------------------- 188Differences between Android 2.0 and 1.6: 189 190- memcmp(), memcpy(): ARMv7 optimized versions. 191 192- pthread_mutexattr_setpshared(): implementation will not return ENOTSUP 193 if PTHREAD_PROCESS_SHARED is used, because our Mutex implementation can 194 work across multiple processes. 195 196 *HOWEVER* it does not use "robust futexes" which means that held mutexes 197 *are not* automatically released by the kernel when the owner process 198 crashes or exits. This is only done to simplify communication between 199 two always-live system processes, DO NOT USE THIS IN APPLICATIONS ! 200 201- pthread_mutex_lock_timeout_np(): New Android-specific function to 202 perform a timed lock (). In case of timeout, it returns EBUSY. 203 204- pthread_cond_timedwait_monotonic_np(): Same as pthread_cond_timedwait() 205 but uses the monotonic clock(). Android-specific. 206 207- pthread_cond_timedwait_relative_np(): Same as pthread_cond_timedwait() 208 but uses a relative timeout instead. Android-specific. 209 210- <netinet/in.h>: Now includes <netinet/in6.h>. 211 212- <netinet/in6.h>: Added IPV6_JOIN_GROUP, IPV6_LEAVE_GROUP, IN6ADDR_ANY_INIT 213 and ipv6mr_interface definitions. 214 215- <time.h>: 216 * Add missing tzset() declaration. 217 * Add Android-specific strftime_tz(). 218 219- getaddrinfo(): 220 Only perform IPv6 lookup for AF_UNSPEC if we have IPv6 connectivity. 221 This saves one DNS query per lookup on non-IPv6 systems. 222 223- mktime(): Fix an infinite loop problen that appeared when switching to 224 GCC 4.4.0. 225 226- strftime(): fix incorrect handling of dates > 2038 due to 64-bit issue 227 in original code. 228 229------------------------------------------------------------------------------- 230Differences between Android 1.6 and 1.5: 231 232- C runtime: Fix runtime initialization to be called before any static C++ 233 constructors. This allows these to use pthread functions properly. 234 235- __aeabi_atexit(): Fix implementation to properly call C++ static destructors 236 when the program exits (or when a shared library is unloaded). 237 238- <sys/stat.h>: added GLibc compatibility macros definitions: 239 240 #define st_atimensec st_atime_nsec 241 #define st_mtimensec st_mtime_nsec 242 #define st_ctimensec st_ctime_nsec 243 244- getaddrinfo(): implementation will now allow numeric ports if ai_socktype is 245 set to ANY. This is to match the GLibc behaviour. 246 247- getservent(): and getservent_r() incorrectly returned the port in host-endian 248 order in the s_port field. It now returns it in big-endian order. 249 250- DNS: Allow underscore in the middle of DNS labels. While not really 251 standard, this extension is needed for some VPN configurations and is 252 supported by other operating systems. 253 254- DNS: Support for DNS domain search lists through the new net.dns.search 255 system property. The corresponding value must be a space-separated list of 256 domain suffixes. 257