Changeset 387 for asp3_tinet_ecnl_rx/trunk/musl-1.1.18
- Timestamp:
- May 22, 2019, 4:09:18 PM (5 years ago)
- Location:
- asp3_tinet_ecnl_rx/trunk/musl-1.1.18
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/include/bits/alltypes.h
r374 r387 1 #if defined(_MSC_VER) || defined(__c2__)2 #define asctime musl_asctime3 #define calloc musl_calloc4 #define clock musl_clock5 #define close musl_close6 #define execvp musl_execvp7 #define exit musl_exit8 #define fclose musl_fclose9 #define fdopen musl_fdopen10 #define fflush musl_fflush11 #define fma _musl_fma12 #define fgetc musl_fgetc13 #define fopen musl_fopen14 #define fprintf musl_fprintf15 #define fputc musl_fputc16 #define free musl_free17 #define fwrite musl_fwrite18 #define getcwd musl_getcwd19 #define localtime musl_localtime20 #define lseek musl_lseek21 #define malloc musl_malloc22 #define memmove musl_memmove23 #define open musl_open24 #define perror musl_perror25 #define printf musl_printf26 #define read musl_read27 #define realloc musl_realloc28 #define strftime musl_strftime29 #define strnlen musl_strnlen30 #define strtoul musl_strtoul31 #define time musl_time32 #define tzset musl_tzset33 #define unlink musl_unlink34 #define strncmp musl_strncmp35 #define strtol musl_strtol36 #define strchr musl_strchr37 #endif38 1 #ifdef _MSC_VER 39 2 #define __builtin_va_list char * -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/include/math.h
r364 r387 15 15 #define NAN __builtin_nanf("") 16 16 #define INFINITY __builtin_inff() 17 #el if !defined(_MSC_VER)17 #else 18 18 #define NAN (0.0f/0.0f) 19 19 #define INFINITY 1e5000f 20 #else21 #define _HUGE_ENUF 1e+30022 #define INFINITY ((float)(_HUGE_ENUF * _HUGE_ENUF))23 #define NAN ((float)(INFINITY * 0.0F))24 20 #endif 25 21 -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/include/stddef.h
r337 r387 11 11 #define __NEED_size_t 12 12 #define __NEED_wchar_t 13 #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L13 #if __STDC_VERSION__ >= 201112L || (defined(__cplusplus) && __cplusplus >= 201103L) 14 14 #define __NEED_max_align_t 15 15 #endif -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/locale/__lctrans.c
r337 r387 8 8 } 9 9 10 #ifndef __c2__11 10 weak_alias(dummy, __lctrans_impl); 12 #endif13 11 14 12 const char *__lctrans(const char *msg, const struct __locale_map *lm) -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/locale/__mo_lookup.c
r337 r387 4 4 static inline uint32_t swapc(uint32_t x, int c) 5 5 { 6 return c ? x>>24 | x>>8&0xff00 | x<<8&0xff0000 | x<<24: x;6 return c ? (x>>24) | (x>>8&0xff00) | (x<<8&0xff0000) | (x<<24) : x; 7 7 } 8 8 -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/locale/iconv.c
r337 r387 136 136 { 137 137 e &= 3; 138 return s[e]+0U<<24 | s[e^1]<<16 | s[e^2]<<8 | s[e^3];138 return (s[e]+0U)<<24 | s[e^1]<<16 | s[e^2]<<8 | s[e^3]; 139 139 } 140 140 … … 156 156 unsigned x = c - 128 - map[-1]; 157 157 x = legacy_chars[ map[x*5/4]>>2*x%8 | 158 map[x*5/4+1]<<8-2*x%8 & 1023];158 (map[x*5/4+1]<<(8-2*x%8) & 1023) ]; 159 159 return x ? x : c; 160 160 } … … 348 348 c += (0xa1-0x81); 349 349 d += 0xa1; 350 if (c >= 93 || c>=0xc6-0x81 && d>0x52)350 if (c >= 93 || (c>=0xc6-0x81 && d>0x52)) 351 351 goto ilseq; 352 352 if (d-'A'<26) d = d-'A'; -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/locale/locale_map.c
r337 r387 36 36 37 37 if (!*val) { 38 ( val = getenv("LC_ALL")) && *val||39 ( val = getenv(envvars[cat])) && *val||40 ( val = getenv("LANG")) && *val||38 ((val = getenv("LC_ALL")) && *val) || 39 ((val = getenv(envvars[cat])) && *val) || 40 ((val = getenv("LANG")) && *val) || 41 41 (val = "C.UTF-8"); 42 42 } -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/malloc/memalign.c
r337 r387 46 46 footer = ((size_t *)end)[-2]; 47 47 48 ((size_t *)mem)[-1] = header&7| new-mem;49 ((size_t *)new)[-2] = footer&7| new-mem;50 ((size_t *)new)[-1] = header&7| end-new;51 ((size_t *)end)[-2] = footer&7| end-new;48 ((size_t *)mem)[-1] = (header&7) | new-mem; 49 ((size_t *)new)[-2] = (footer&7) | new-mem; 50 ((size_t *)new)[-1] = (header&7) | end-new; 51 ((size_t *)end)[-2] = (footer&7) | end-new; 52 52 53 53 free(mem); -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/math/fma.c
r337 r387 70 70 if (d < 64) { 71 71 zlo = nz.m<<d; 72 zhi = nz.m>> 64-d;72 zhi = nz.m>>(64-d); 73 73 } else { 74 74 zlo = 0; … … 78 78 if (d == 0) { 79 79 } else if (d < 64) { 80 rlo = rhi<< 64-d | rlo>>d | !!(rlo<<64-d);80 rlo = rhi<<(64-d) | rlo>>d | !!(rlo<<(64-d)); 81 81 rhi = rhi>>d; 82 82 } else { … … 91 91 zlo = nz.m; 92 92 } else if (d < 64) { 93 zlo = nz.m>>d | !!(nz.m<< 64-d);93 zlo = nz.m>>d | !!(nz.m<<(64-d)); 94 94 } else { 95 95 zlo = 1; … … 123 123 d = a_clz_64(rhi)-1; 124 124 /* note: d > 0 */ 125 rhi = rhi<<d | rlo>> 64-d| !!(rlo<<d);125 rhi = rhi<<d | rlo>>(64-d) | !!(rlo<<d); 126 126 } else if (rlo) { 127 127 d = a_clz_64(rlo)-1; … … 174 174 /* only round once when scaled */ 175 175 d = 10; 176 i = ( rhi>>d | !!(rhi<< 64-d) ) << d;176 i = ( rhi>>d | !!(rhi<<(64-d)) ) << d; 177 177 if (sign) 178 178 i = -i; -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/network/lookup_name.c
r337 r387 11 11 #include <pthread.h> 12 12 #include <errno.h> 13 #include <resolv.h> 13 14 #include "lookup.h" 14 15 #include "stdio_impl.h" … … 185 186 if (dots >= conf.ndots || name[l-1]=='.') *search = 0; 186 187 188 /* Strip final dot for canon, fail if multiple trailing dots. */ 189 if (name[l-1]=='.') l--; 190 if (!l || name[l-1]=='.') return EAI_NONAME; 191 187 192 /* This can never happen; the caller already checked length. */ 188 193 if (l >= 256) return EAI_NONAME; … … 311 316 if (!cnt && !(flags & AI_NUMERICHOST)) { 312 317 cnt = name_from_hosts(buf, canon, name, family); 313 if ( !cnt) cnt = name_from_dns_search(buf, canon, name, family);318 if (cnt<=0) cnt = name_from_dns_search(buf, canon, name, family); 314 319 } 315 320 if (cnt<=0) return cnt ? cnt : EAI_NONAME; … … 352 357 * So far the label/precedence table cannot be customized. */ 353 358 for (i=0; i<cnt; i++) { 359 int family = buf[i].family; 354 360 int key = 0; 355 struct sockaddr_in6 sa , da= {361 struct sockaddr_in6 sa6 = { 0 }, da6 = { 356 362 .sin6_family = AF_INET6, 357 363 .sin6_scope_id = buf[i].scopeid, 358 364 .sin6_port = 65535 359 365 }; 360 if (buf[i].family == AF_INET6) { 361 memcpy(da.sin6_addr.s6_addr, buf[i].addr, 16); 366 struct sockaddr_in sa4 = { 0 }, da4 = { 367 .sin_family = AF_INET, 368 .sin_port = 65535 369 }; 370 void *sa, *da; 371 socklen_t salen, dalen; 372 if (family == AF_INET6) { 373 memcpy(da6.sin6_addr.s6_addr, buf[i].addr, 16); 374 da = &da6; dalen = sizeof da6; 375 sa = &sa6; salen = sizeof sa6; 362 376 } else { 363 memcpy( da.sin6_addr.s6_addr,377 memcpy(sa6.sin6_addr.s6_addr, 364 378 "\0\0\0\0\0\0\0\0\0\0\xff\xff", 12); 365 memcpy(da.sin6_addr.s6_addr+12, buf[i].addr, 4); 366 } 367 const struct policy *dpolicy = policyof(&da.sin6_addr); 368 int dscope = scopeof(&da.sin6_addr); 379 memcpy(da6.sin6_addr.s6_addr+12, buf[i].addr, 4); 380 memcpy(da6.sin6_addr.s6_addr, 381 "\0\0\0\0\0\0\0\0\0\0\xff\xff", 12); 382 memcpy(da6.sin6_addr.s6_addr+12, buf[i].addr, 4); 383 memcpy(&da4.sin_addr, buf[i].addr, 4); 384 da = &da4; dalen = sizeof da4; 385 sa = &sa4; salen = sizeof sa4; 386 } 387 const struct policy *dpolicy = policyof(&da6.sin6_addr); 388 int dscope = scopeof(&da6.sin6_addr); 369 389 int dlabel = dpolicy->label; 370 390 int dprec = dpolicy->prec; 371 391 int prefixlen = 0; 372 int fd = socket( AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_UDP);392 int fd = socket(family, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_UDP); 373 393 if (fd >= 0) { 374 if (!connect(fd, (void *)&da, sizeof da)) {394 if (!connect(fd, da, dalen)) { 375 395 key |= DAS_USABLE; 376 if (!getsockname(fd, (void *)&sa, 377 &(socklen_t){sizeof sa})) { 378 if (dscope == scopeof(&sa.sin6_addr)) 396 if (!getsockname(fd, sa, &salen)) { 397 if (family == AF_INET) memcpy( 398 sa6.sin6_addr.s6_addr+12, 399 &sa4.sin_addr, 4); 400 if (dscope == scopeof(&sa6.sin6_addr)) 379 401 key |= DAS_MATCHINGSCOPE; 380 if (dlabel == labelof(&sa .sin6_addr))402 if (dlabel == labelof(&sa6.sin6_addr)) 381 403 key |= DAS_MATCHINGLABEL; 382 prefixlen = prefixmatch(&sa .sin6_addr,383 &da .sin6_addr);404 prefixlen = prefixmatch(&sa6.sin6_addr, 405 &da6.sin6_addr); 384 406 } 385 407 } -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/process/vfork.c
r374 r387 15 15 } 16 16 17 #ifndef __c2__18 17 weak_alias(__vfork, vfork); 19 #else20 pid_t vfork(void)21 {22 return __vfork();23 }24 #endif -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/signal/sigaction.c
r374 r387 61 61 } 62 62 63 #ifndef __c2__64 63 weak_alias(__sigaction, sigaction); 65 #else66 int sigaction(int sig, const struct sigaction *restrict sa, struct sigaction *restrict old)67 {68 return __sigaction(sig, sa, old);69 }70 #endif -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/stdio/__stdio_write.c
r337 r387 32 32 iov[0].iov_len -= cnt; 33 33 } 34 return -1; 34 35 } -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/stdlib/strtol.c
r374 r387 57 57 } 58 58 59 #if defined(_MSC_VER) || defined(__c2__)60 weak_alias(musl_strtol, __strtol_internal);61 weak_alias(musl_strtoul, __strtoul_internal);62 #else63 59 weak_alias(strtol, __strtol_internal); 64 60 weak_alias(strtoul, __strtoul_internal); 65 #endif66 61 weak_alias(strtoll, __strtoll_internal); 67 62 weak_alias(strtoull, __strtoull_internal); -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/string/memrchr.c
r374 r387 10 10 } 11 11 12 #ifndef __c2__13 12 weak_alias(__memrchr, memrchr); 14 #else15 void *memrchr(const void *m, int c, size_t n)16 {17 return __memrchr(m, c, n);18 }19 #endif -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/string/strchrnul.c
r374 r387 24 24 } 25 25 26 #ifndef __c2__27 26 weak_alias(__strchrnul, strchrnul); 28 #else29 char *strchrnul(const char *s, int c)30 {31 return __strchrnul(s, c);32 }33 #endif
Note:
See TracChangeset
for help on using the changeset viewer.