Changeset f9d0a86 in mainline for uspace/lib/c
- Timestamp:
- 2017-11-14T12:24:42Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6cad776
- Parents:
- 887c9de (diff), d2d142a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Aearsis <Hlavaty.Ondrej@…> (2017-11-14 01:04:19)
- git-committer:
- Aearsis <Hlavaty.Ondrej@…> (2017-11-14 12:24:42)
- Location:
- uspace/lib/c
- Files:
-
- 1 added
- 30 deleted
- 45 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/Makefile
r887c9de rf9d0a86 32 32 33 33 CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config 34 COMMON_HEADER_ARCH = arch/$(UARCH)/include/libarch/common.h35 34 36 35 LINKER_SCRIPTS = \ … … 40 39 $(LIBC_PREFIX)/arch/$(UARCH)/_link-dlexe.ld 41 40 42 PRE_DEPEND = $(COMMON_HEADER_ARCH)41 PRE_DEPEND = 43 42 EXTRA_OUTPUT = $(LINKER_SCRIPTS) 44 EXTRA_CLEAN = $( COMMON_HEADER_ARCH) $(LINKER_SCRIPTS)43 EXTRA_CLEAN = $(LINKER_SCRIPTS) 45 44 LIBRARY = libc 46 SLIBRARY = libc.so.0.0 47 LSONAME = libc.so.0 45 SOVERSION = 0.0 48 46 49 47 -include $(CONFIG_MAKEFILE) … … 208 206 $(LIBC_PREFIX)/arch/$(UARCH)/_link-dlexe.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in 209 207 $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DDLEXE -E -x c $< | grep -v "^\#" > $@ 210 211 $(COMMON_HEADER_ARCH): $(COMMON_HEADER)212 ln -sfn ../../../../$< $@ -
uspace/lib/c/arch/abs32le/Makefile.inc
r887c9de rf9d0a86 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry.c \31 30 arch/$(UARCH)/src/entryjmp.c \ 32 31 arch/$(UARCH)/src/thread_entry.c \ … … 36 35 arch/$(UARCH)/src/stacktrace.c 37 36 38 .PRECIOUS:arch/$(UARCH)/src/entry.o37 EXTRA_OUTPUT += arch/$(UARCH)/src/entry.o -
uspace/lib/c/arch/abs32le/include/libarch/ddi.h
r887c9de rf9d0a86 50 50 } 51 51 52 static inline void arch_pio_write_64(ioport64_t *port, uint64_t v) 53 { 54 *port = v; 55 } 56 52 57 static inline uint8_t arch_pio_read_8(const ioport8_t *port) 53 58 { … … 65 70 } 66 71 72 static inline uint64_t arch_pio_read_64(const ioport64_t *port) 73 { 74 return *port; 75 } 76 67 77 #endif -
uspace/lib/c/arch/amd64/Makefile.inc
r887c9de rf9d0a86 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry.S \31 30 arch/$(UARCH)/src/entryjmp.S \ 32 31 arch/$(UARCH)/src/thread_entry.S \ … … 41 40 arch/$(UARCH)/include/libarch/fibril_context.ag 42 41 43 .PRECIOUS:arch/$(UARCH)/src/entry.o42 EXTRA_OUTPUT += arch/$(UARCH)/src/entry.o 44 43 -
uspace/lib/c/arch/arm32/Makefile.common
r887c9de rf9d0a86 35 35 ifeq ($(CONFIG_FPU),y) 36 36 COMMON_CFLAGS += -mfloat-abi=hard 37 else38 BASE_LIBS += $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a39 37 endif 40 38 -
uspace/lib/c/arch/arm32/Makefile.inc
r887c9de rf9d0a86 29 29 30 30 ARCH_SOURCES = \ 31 arch/$(UARCH)/src/entry.S \32 31 arch/$(UARCH)/src/entryjmp.S \ 33 32 arch/$(UARCH)/src/thread_entry.S \ … … 43 42 arch/$(UARCH)/include/libarch/fibril_context.ag 44 43 45 .PRECIOUS:arch/$(UARCH)/src/entry.o44 EXTRA_OUTPUT += arch/$(UARCH)/src/entry.o 46 45 -
uspace/lib/c/arch/arm32/include/libarch/ddi.h
r887c9de rf9d0a86 51 51 } 52 52 53 static inline void arch_pio_write_64(ioport64_t *port, uint64_t v) 54 { 55 *port = v; 56 } 57 53 58 static inline uint8_t arch_pio_read_8(const ioport8_t *port) 54 59 { … … 66 71 } 67 72 73 static inline uint64_t arch_pio_read_64(const ioport64_t *port) 74 { 75 return *port; 76 } 77 68 78 #endif -
uspace/lib/c/arch/ia32/Makefile.inc
r887c9de rf9d0a86 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry.S \31 30 arch/$(UARCH)/src/entryjmp.S \ 32 31 arch/$(UARCH)/src/thread_entry.S \ … … 43 42 arch/$(UARCH)/include/libarch/fibril_context.ag 44 43 45 .PRECIOUS:arch/$(UARCH)/src/entry.o44 EXTRA_OUTPUT += arch/$(UARCH)/src/entry.o -
uspace/lib/c/arch/ia32/include/libarch/ddi.h
r887c9de rf9d0a86 86 86 } 87 87 88 static inline uint64_t arch_pio_read_64(const ioport64_t *port) 89 { 90 return (uint64_t) *port; 91 } 92 88 93 static inline void arch_pio_write_8(ioport8_t *port, uint8_t val) 89 94 { … … 119 124 } 120 125 126 static inline void arch_pio_write_64(ioport64_t *port, uint64_t val) 127 { 128 *port = val; 129 } 130 121 131 #endif -
uspace/lib/c/arch/ia64/Makefile.inc
r887c9de rf9d0a86 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry.S \31 30 arch/$(UARCH)/src/entryjmp.S \ 32 31 arch/$(UARCH)/src/thread_entry.S \ … … 42 41 arch/$(UARCH)/include/libarch/fibril_context.ag 43 42 44 .PRECIOUS:arch/$(UARCH)/src/entry.o43 EXTRA_OUTPUT += arch/$(UARCH)/src/entry.o -
uspace/lib/c/arch/ia64/include/libarch/ddi.h
r887c9de rf9d0a86 94 94 } 95 95 96 static inline void arch_pio_write_64(ioport64_t *port, uint64_t v) 97 { 98 *port = v; 99 100 asm volatile ("mf\n" ::: "memory"); 101 asm volatile ("mf.a\n" ::: "memory"); 102 } 103 96 104 static inline uint8_t arch_pio_read_8(const ioport8_t *port) 97 105 { … … 154 162 } 155 163 164 static inline uint64_t arch_pio_read_64(const ioport64_t *port) 165 { 166 uint64_t v; 167 168 asm volatile ("mf\n" ::: "memory"); 169 170 v = *port; 171 172 asm volatile ("mf.a\n" ::: "memory"); 173 174 return v; 175 } 176 156 177 #endif 157 178 -
uspace/lib/c/arch/ia64/include/libarch/faddr.h
r887c9de rf9d0a86 38 38 #include <types/common.h> 39 39 40 typedef struct { 41 uintptr_t fnc; 42 uintptr_t gp; 43 } __attribute__((may_alias)) fncptr_t; 44 40 45 /** 41 46 * -
uspace/lib/c/arch/ia64/src/entry.S
r887c9de rf9d0a86 42 42 43 43 # Pass PCB pointer as the first argument to __main 44 mov out0 = r2 44 mov out0 = r2 ;; 45 45 br.call.sptk.many b0 = __main 46 46 -
uspace/lib/c/arch/ia64/src/thread_entry.S
r887c9de rf9d0a86 43 43 # 44 44 45 mov out0 = r8 45 mov out0 = r8 ;; 46 46 br.call.sptk.many b0 = __thread_main 47 47 -
uspace/lib/c/arch/mips32/Makefile.common
r887c9de rf9d0a86 28 28 29 29 COMMON_CFLAGS += -msoft-float -mabi=32 30 BASE_LIBS += $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a31 30 AS_PROLOG = .module softfloat;.abicalls; 32 31 LFLAGS += --gc-sections -
uspace/lib/c/arch/mips32/Makefile.inc
r887c9de rf9d0a86 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry.S \31 30 arch/$(UARCH)/src/entryjmp.S \ 32 31 arch/$(UARCH)/src/thread_entry.S \ … … 41 40 arch/$(UARCH)/include/libarch/fibril_context.ag 42 41 43 .PRECIOUS:arch/$(UARCH)/src/entry.o42 EXTRA_OUTPUT += arch/$(UARCH)/src/entry.o -
uspace/lib/c/arch/mips32/include/libarch/ddi.h
r887c9de rf9d0a86 51 51 } 52 52 53 static inline void arch_pio_write_64(ioport64_t *port, uint64_t v) 54 { 55 *port = v; 56 } 57 53 58 static inline uint8_t arch_pio_read_8(const ioport8_t *port) 54 59 { … … 66 71 } 67 72 73 static inline uint64_t arch_pio_read_64(const ioport64_t *port) 74 { 75 return *port; 76 } 77 68 78 #endif -
uspace/lib/c/arch/mips32/src/entry.S
r887c9de rf9d0a86 62 62 # 63 63 addiu $sp, ABI_STACK_FRAME 64 .end __entry 64 65 FUNCTION_END(__entry) -
uspace/lib/c/arch/mips32/src/thread_entry.S
r887c9de rf9d0a86 62 62 # 63 63 addiu $sp, ABI_STACK_FRAME 64 .end __thread_entry -
uspace/lib/c/arch/mips32eb/Makefile.common
r887c9de rf9d0a86 28 28 29 29 COMMON_CFLAGS += -msoft-float -mabi=32 30 BASE_LIBS += $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a31 30 AS_PROLOG = .module softfloat;.abicalls; 32 31 LFLAGS += --gc-sections -
uspace/lib/c/arch/mips32eb/Makefile.inc
r887c9de rf9d0a86 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry.S \31 30 arch/$(UARCH)/src/entryjmp.S \ 32 31 arch/$(UARCH)/src/thread_entry.S \ … … 41 40 arch/$(UARCH)/include/libarch/fibril_context.ag 42 41 43 .PRECIOUS:arch/$(UARCH)/src/entry.o42 EXTRA_OUTPUT += arch/$(UARCH)/src/entry.o -
uspace/lib/c/arch/ppc32/Makefile.common
r887c9de rf9d0a86 34 34 35 35 COMMON_CFLAGS += -mcpu=powerpc -m$(FLOATS)-float -m32 36 BASE_LIBS += $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a37 36 AFLAGS += -a32 38 37 LFLAGS += --gc-sections -
uspace/lib/c/arch/ppc32/Makefile.inc
r887c9de rf9d0a86 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry.S \31 30 arch/$(UARCH)/src/entryjmp.S \ 32 31 arch/$(UARCH)/src/thread_entry.S \ … … 41 40 arch/$(UARCH)/include/libarch/fibril_context.ag 42 41 43 .PRECIOUS:arch/$(UARCH)/src/entry.o42 EXTRA_OUTPUT += arch/$(UARCH)/src/entry.o -
uspace/lib/c/arch/ppc32/include/libarch/ddi.h
r887c9de rf9d0a86 51 51 } 52 52 53 static inline void arch_pio_write_64(ioport64_t *port, uint64_t v) 54 { 55 *port = v; 56 } 57 53 58 static inline uint8_t arch_pio_read_8(const ioport8_t *port) 54 59 { … … 66 71 } 67 72 73 static inline uint64_t arch_pio_read_64(const ioport64_t *port) 74 { 75 return *port; 76 } 77 68 78 #endif -
uspace/lib/c/arch/riscv64/Makefile.common
r887c9de rf9d0a86 27 27 # 28 28 29 BASE_LIBS += $(LIBSOFTFLOAT_PREFIX)/libsoftfloat.a30 31 29 ENDIANESS = LE 32 30 -
uspace/lib/c/arch/riscv64/Makefile.inc
r887c9de rf9d0a86 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry.c \31 30 arch/$(UARCH)/src/entryjmp.c \ 32 31 arch/$(UARCH)/src/thread_entry.c \ … … 40 39 arch/$(UARCH)/include/libarch/fibril_context.ag 41 40 42 .PRECIOUS:arch/$(UARCH)/src/entry.o41 EXTRA_OUTPUT += arch/$(UARCH)/src/entry.o -
uspace/lib/c/arch/riscv64/include/libarch/ddi.h
r887c9de rf9d0a86 50 50 } 51 51 52 static inline void arch_pio_write_64(ioport64_t *port, uint64_t v) 53 { 54 *port = v; 55 } 56 52 57 static inline uint8_t arch_pio_read_8(const ioport8_t *port) 53 58 { … … 65 70 } 66 71 72 static inline uint64_t arch_pio_read_64(const ioport64_t *port) 73 { 74 return *port; 75 } 76 67 77 #endif -
uspace/lib/c/arch/sparc64/Makefile.inc
r887c9de rf9d0a86 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry.S \31 30 arch/$(UARCH)/src/entryjmp.S \ 32 31 arch/$(UARCH)/src/thread_entry.S \ … … 40 39 arch/$(UARCH)/include/libarch/fibril_context.ag 41 40 42 .PRECIOUS:arch/$(UARCH)/src/entry.o41 EXTRA_OUTPUT += arch/$(UARCH)/src/entry.o -
uspace/lib/c/arch/sparc64/include/libarch/ddi.h
r887c9de rf9d0a86 62 62 } 63 63 64 static inline void arch_pio_write_64(ioport64_t *port, uint64_t v) 65 { 66 *port = v; 67 memory_barrier(); 68 } 69 70 64 71 static inline uint8_t arch_pio_read_8(const ioport8_t *port) 65 72 { … … 92 99 } 93 100 101 static inline uint64_t arch_pio_read_64(const ioport64_t *port) 102 { 103 uint64_t rv; 104 105 rv = *port; 106 memory_barrier(); 107 108 return rv; 109 } 110 94 111 #endif -
uspace/lib/c/generic/ddi.c
r887c9de rf9d0a86 338 338 } 339 339 340 void pio_write_64(ioport64_t *reg, uint64_t val) 341 { 342 pio_trace_log(reg, val, true); 343 arch_pio_write_64(reg, val); 344 } 345 340 346 uint8_t pio_read_8(const ioport8_t *reg) 341 347 { … … 359 365 } 360 366 367 uint64_t pio_read_64(const ioport64_t *reg) 368 { 369 const uint64_t val = arch_pio_read_64(reg); 370 pio_trace_log(reg, val, false); 371 return val; 372 } 373 361 374 /** @} 362 375 */ -
uspace/lib/c/generic/double_to_str.c
r887c9de rf9d0a86 32 32 #include <ieee_double.h> 33 33 34 #include <limits.h> 34 35 #include <stdint.h> 35 36 #include <stdbool.h> -
uspace/lib/c/generic/gsort.c
r887c9de rf9d0a86 41 41 42 42 #include <gsort.h> 43 #include <inttypes.h> 43 44 #include <mem.h> 44 45 #include <malloc.h> -
uspace/lib/c/generic/inet/addr.c
r887c9de rf9d0a86 41 41 #include <malloc.h> 42 42 #include <bitops.h> 43 #include <inttypes.h> 43 44 44 45 #define INET_PREFIXSTRSIZE 5 -
uspace/lib/c/generic/io/printf_core.c
r887c9de rf9d0a86 46 46 #include <assert.h> 47 47 #include <macros.h> 48 #include <wchar.h> 48 49 49 50 … … 114 115 PrintfQualifierLongLong, 115 116 PrintfQualifierPointer, 116 PrintfQualifierSize 117 PrintfQualifierSize, 118 PrintfQualifierMax 117 119 } qualifier_t; 118 120 … … 1484 1486 uc = str_decode(fmt, &nxt, STR_NO_LIMIT); 1485 1487 break; 1488 case 'j': 1489 qualifier = PrintfQualifierMax; 1490 i = nxt; 1491 uc = str_decode(fmt, &nxt, STR_NO_LIMIT); 1492 break; 1486 1493 default: 1487 1494 /* Default type */ … … 1629 1636 number = (uint64_t) va_arg(ap, size_t); 1630 1637 break; 1638 case PrintfQualifierMax: 1639 size = sizeof(uintmax_t); 1640 number = (uint64_t) va_arg(ap, uintmax_t); 1641 break; 1631 1642 default: 1632 1643 /* Unknown qualifier */ -
uspace/lib/c/generic/ipc.c
r887c9de rf9d0a86 148 148 } 149 149 150 if (callid == (ipc_callid_t) IPC_CALLRET_TEMPORARY) {151 futex_unlock(&ipc_futex);152 153 call->u.msg.phoneid = phoneid;154 155 futex_down(&async_futex);156 list_append(&call->list, &queued_calls);157 158 call->fid = fibril_get_id();159 fibril_switch(FIBRIL_TO_MANAGER);160 /* Async futex unlocked by previous call */161 162 return;163 }164 165 150 call->u.callid = callid; 166 151 … … 210 195 ipc_callid_t callid = __SYSCALL6(SYS_IPC_CALL_ASYNC_FAST, phoneid, 211 196 imethod, arg1, arg2, arg3, arg4); 212 213 if (callid == (ipc_callid_t) IPC_CALLRET_TEMPORARY) {214 if (!call) {215 call = ipc_prepare_async(private, callback);216 if (!call) {217 futex_unlock(&ipc_futex);218 return;219 }220 }221 222 IPC_SET_IMETHOD(call->u.msg.data, imethod);223 IPC_SET_ARG1(call->u.msg.data, arg1);224 IPC_SET_ARG2(call->u.msg.data, arg2);225 IPC_SET_ARG3(call->u.msg.data, arg3);226 IPC_SET_ARG4(call->u.msg.data, arg4);227 228 /*229 * To achieve deterministic behavior, we always zero out the230 * arguments that are beyond the limits of the fast version.231 */232 233 IPC_SET_ARG5(call->u.msg.data, 0);234 }235 197 236 198 ipc_finish_async(callid, phoneid, call); … … 351 313 ipc_callid_t callid = 352 314 ipc_call_async_internal(call->u.msg.phoneid, &call->u.msg.data); 353 354 if (callid == (ipc_callid_t) IPC_CALLRET_TEMPORARY)355 break;356 315 357 316 list_remove(&call->list); -
uspace/lib/c/generic/loc.c
r887c9de rf9d0a86 247 247 sysarg_t retval = async_data_write_start(exch, name, str_size(name)); 248 248 249 loc_exchange_end(exch);250 251 249 if (retval != EOK) { 252 250 async_forget(req); 253 return retval;254 }255 256 exch = loc_exchange_begin(INTERFACE_LOC_SUPPLIER);251 loc_exchange_end(exch); 252 return retval; 253 } 254 257 255 async_connect_to_me(exch, 0, 0, 0); 258 loc_exchange_end(exch); 259 256 257 /* 258 * First wait for the answer and then end the exchange. The opposite 259 * order is generally wrong because it may lead to a deadlock under 260 * certain circumstances. 261 */ 260 262 async_wait_for(req, &retval); 263 loc_exchange_end(exch); 264 261 265 return retval; 262 266 } … … 276 280 sysarg_t retval = async_data_write_start(exch, fqsn, str_size(fqsn)); 277 281 278 279 282 if (retval != EOK) { 280 283 async_forget(req); … … 283 286 } 284 287 288 /* 289 * First wait for the answer and then end the exchange. The opposite 290 * order is generally wrong because it may lead to a deadlock under 291 * certain circumstances. 292 */ 285 293 async_wait_for(req, &retval); 286 294 loc_exchange_end(exch); -
uspace/lib/c/generic/pio_trace.c
r887c9de rf9d0a86 91 91 92 92 93 void pio_trace_log(const volatile void *r, uint 32_t val, bool write)93 void pio_trace_log(const volatile void *r, uint64_t val, bool write) 94 94 { 95 95 pio_regions_t *regions = get_regions(); -
uspace/lib/c/generic/str.c
r887c9de rf9d0a86 46 46 #include <align.h> 47 47 #include <mem.h> 48 #include <limits.h> 48 49 49 50 /** Check the condition if wchar_t is signed */ 50 #ifdef WCHAR_IS_UNSIGNED51 #ifdef __WCHAR_UNSIGNED__ 51 52 #define WCHAR_SIGNED_CHECK(cond) (true) 52 53 #else -
uspace/lib/c/include/ddi.h
r887c9de rf9d0a86 52 52 typedef volatile uint16_t ioport16_t; 53 53 typedef volatile uint32_t ioport32_t; 54 55 extern int device_assign_devno(void); 54 typedef volatile uint64_t ioport64_t; 56 55 57 56 extern int physmem_map(uintptr_t, size_t, unsigned int, void **); … … 69 68 extern int pio_disable(void *, size_t); 70 69 71 typedef void (*trace_fnc)(const volatile void *place, uint 32_t val,70 typedef void (*trace_fnc)(const volatile void *place, uint64_t val, 72 71 volatile void* base, size_t size, void *data, bool write); 73 72 74 73 extern int pio_trace_enable(void *, size_t, trace_fnc, void *); 75 extern void pio_trace_log(const volatile void *, uint 32_t val, bool write);74 extern void pio_trace_log(const volatile void *, uint64_t val, bool write); 76 75 extern void pio_trace_disable(void *); 77 76 … … 79 78 extern void pio_write_16(ioport16_t *, uint16_t); 80 79 extern void pio_write_32(ioport32_t *, uint32_t); 80 extern void pio_write_64(ioport64_t *, uint64_t); 81 81 82 82 extern uint8_t pio_read_8(const ioport8_t *); 83 83 extern uint16_t pio_read_16(const ioport16_t *); 84 84 extern uint32_t pio_read_32(const ioport32_t *); 85 extern uint64_t pio_read_64(const ioport64_t *); 85 86 86 87 static inline uint8_t pio_change_8(ioport8_t *reg, uint8_t val, uint8_t mask, … … 111 112 } 112 113 114 static inline uint64_t pio_change_64(ioport64_t *reg, uint64_t val, 115 uint64_t mask, useconds_t delay) 116 { 117 uint64_t v = pio_read_64(reg); 118 udelay(delay); 119 pio_write_64(reg, (v & ~mask) | val); 120 return v; 121 } 122 113 123 static inline uint8_t pio_set_8(ioport8_t *r, uint8_t v, useconds_t d) 114 124 { … … 122 132 { 123 133 return pio_change_32(r, v, 0, d); 134 } 135 static inline uint64_t pio_set_64(ioport64_t *r, uint64_t v, useconds_t d) 136 { 137 return pio_change_64(r, v, 0, d); 124 138 } 125 139 … … 136 150 return pio_change_32(r, 0, v, d); 137 151 } 152 static inline uint64_t pio_clear_64(ioport64_t *r, uint64_t v, useconds_t d) 153 { 154 return pio_change_64(r, 0, v, d); 155 } 138 156 139 157 #endif -
uspace/lib/c/include/inttypes.h
r887c9de rf9d0a86 36 36 #define LIBC_INTTYPES_H_ 37 37 38 #include < libarch/inttypes.h>38 #include <_bits/inttypes.h> 39 39 40 40 #endif -
uspace/lib/c/include/io/charfield.h
r887c9de rf9d0a86 38 38 39 39 #include <stdbool.h> 40 #include <wchar.h> 40 41 #include <io/color.h> 41 42 #include <io/style.h> -
uspace/lib/c/include/limits.h
r887c9de rf9d0a86 36 36 #define LIBC_LIMITS_H_ 37 37 38 /* XXX Make this more accurate */ 39 #include <stdint.h> 40 #include <libarch/stdint.h> 38 #include <_bits/limits.h> 41 39 42 40 #endif -
uspace/lib/c/include/stddef.h
r887c9de rf9d0a86 36 36 #define LIBC_STDDEF_H_ 37 37 38 #include <libarch/stddef.h> 38 #include <_bits/size_t.h> 39 #include <_bits/ptrdiff_t.h> 40 #include <_bits/wchar_t.h> 39 41 40 #ifndef NULL 41 #define NULL ((void *) 0) 42 #endif 42 #include <_bits/NULL.h> 43 43 44 44 #define offsetof(type, member) \ -
uspace/lib/c/include/stdint.h
r887c9de rf9d0a86 36 36 #define LIBC_STDINT_H_ 37 37 38 #define INT8_MIN INT8_C(0x80) 39 #define INT8_MAX INT8_C(0x7F) 40 41 #define UINT8_MIN UINT8_C(0) 42 #define UINT8_MAX UINT8_C(0xFF) 43 44 #define INT16_MIN INT16_C(0x8000) 45 #define INT16_MAX INT16_C(0x7FFF) 46 47 #define UINT16_MIN UINT16_C(0) 48 #define UINT16_MAX UINT16_C(0xFFFF) 49 50 #define INT32_MIN INT32_C(0x80000000) 51 #define INT32_MAX INT32_C(0x7FFFFFFF) 52 53 #define UINT32_MIN UINT32_C(0) 54 #define UINT32_MAX UINT32_C(0xFFFFFFFF) 55 56 #define INT64_MIN INT64_C(0x8000000000000000) 57 #define INT64_MAX INT64_C(0x7FFFFFFFFFFFFFFF) 58 59 #define UINT64_MIN UINT64_C(0) 60 #define UINT64_MAX UINT64_C(0xFFFFFFFFFFFFFFFF) 61 62 #include <libarch/stdint.h> 38 #include <_bits/stdint.h> 63 39 64 40 #endif -
uspace/lib/c/include/types/common.h
r887c9de rf9d0a86 36 36 #define LIBC_TYPES_COMMON_H_ 37 37 38 #include <libarch/types.h> 38 #if __SIZEOF_POINTER__ == 4 39 #define __32_BITS__ 40 #elif __SIZEOF_POINTER__ == 8 41 #define __64_BITS__ 42 #else 43 #error __SIZEOF_POINTER__ is not defined. 44 #endif 45 46 #include <_bits/all.h> 39 47 40 48 #endif
Note:
See TracChangeset
for help on using the changeset viewer.