1 
2 extern float strtof(const char *__restrict__ ptr, char **__restrict__ endptr);
3 extern double strtod(const char *__restrict ptr, char **__restrict endptr);
4 /* restrict: -std=c99 or -std=gnu99 or -std=c11 */
5 extern long double strtold(const char *restrict ptr, char **restrict endptr);
6 
7 extern int (*funcs[])(void);
8 
9 /* typeof: no -std or -std=gnu90 or -std=gnu99 or -std=gnu11 */
10 extern typeof (funcs[0]) f0;
11 extern __typeof (funcs[1]) f1;
12 extern __typeof__(funcs[2]) f2;
13 
14 typedef unsigned short uint16_t;
15 typedef unsigned int uint32_t;
16 typedef unsigned long long uint64_t;
17 
swap16(uint16_t val)18 static __inline__ uint16_t swap16(uint16_t val)
19 {
20 	return ((((uint16_t)(val) & (uint16_t)0x00ffU) << 8) |
21 		(((uint16_t)(val) & (uint16_t)0xff00U) >> 8));
22 }
23 
swap32(uint32_t val)24 static __inline uint32_t swap32(uint32_t val)
25 {
26 	return ((((uint32_t)(val) & (uint32_t)0x000000ffUL) << 24) |
27 		(((uint32_t)(val) & (uint32_t)0x0000ff00UL) <<  8) |
28 		(((uint32_t)(val) & (uint32_t)0x00ff0000UL) >>  8) |
29 		(((uint32_t)(val) & (uint32_t)0xff000000UL) >> 24));
30 }
31 
32 /* inline: no -std or -std=gnu90 or -std=c99 or -std=c11 */
swap64(uint64_t val)33 static inline uint64_t swap64(uint64_t val)
34 {
35 	return ((((uint64_t)(val) & (uint64_t)0x00000000000000ffULL) << 56) |
36 		(((uint64_t)(val) & (uint64_t)0x000000000000ff00ULL) << 40) |
37 		(((uint64_t)(val) & (uint64_t)0x0000000000ff0000ULL) << 24) |
38 		(((uint64_t)(val) & (uint64_t)0x00000000ff000000ULL) <<  8) |
39 		(((uint64_t)(val) & (uint64_t)0x000000ff00000000ULL) >>  8) |
40 		(((uint64_t)(val) & (uint64_t)0x0000ff0000000000ULL) >> 24) |
41 		(((uint64_t)(val) & (uint64_t)0x00ff000000000000ULL) >> 40) |
42 		(((uint64_t)(val) & (uint64_t)0xff00000000000000ULL) >> 56));
43 }
44 /*
45  * check-name: alternate keywords
46  */
47