Changeset bbe7848 in mainline for uspace/lib/c/include
- Timestamp:
- 2010-11-26T14:19:00Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b12d3cc
- Parents:
- 03171de (diff), ffdd2b9 (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. - Location:
- uspace/lib/c/include
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/assert.h
r03171de rbbe7848 51 51 52 52 #ifndef NDEBUG 53 # define assert(expr) \ 54 do { \ 55 if (!(expr)) { \ 56 printf("Assertion failed (%s) at file '%s', " \ 57 "line %d.\n", #expr, __FILE__, __LINE__); \ 58 abort(); \ 59 } \ 60 } while (0) 61 #else 62 # define assert(expr) 63 #endif 53 54 #define assert(expr) \ 55 do { \ 56 if (!(expr)) { \ 57 printf("Assertion failed (%s) at file '%s', " \ 58 "line %d.\n", #expr, __FILE__, __LINE__); \ 59 abort(); \ 60 } \ 61 } while (0) 62 63 #else /* NDEBUG */ 64 65 #define assert(expr) 66 67 #endif /* NDEBUG */ 64 68 65 69 #endif -
uspace/lib/c/include/device/char.h
r03171de rbbe7848 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 28 29 29 /** @addtogroup libc 30 30 * @{ … … 32 32 /** @file 33 33 */ 34 34 35 35 #ifndef LIBC_DEVICE_HW_RES_H_ 36 36 #define LIBC_DEVICE_HW_RES_H_ … … 38 38 typedef enum { 39 39 CHAR_READ_DEV = 0, 40 CHAR_WRITE_DEV 40 CHAR_WRITE_DEV 41 41 } hw_res_funcs_t; 42 42 43 int read_dev(int dev_phone, void *buf, size_t len);44 int write_dev(int dev_phone, void *buf, size_t len);43 ssize_t read_dev(int dev_phone, void *buf, size_t len); 44 ssize_t write_dev(int dev_phone, void *buf, size_t len); 45 45 46 46 #endif -
uspace/lib/c/include/err.h
r03171de rbbe7848 38 38 #include <stdio.h> 39 39 40 #define errx(status, fmt, ...) { \ 41 printf((fmt), ##__VA_ARGS__); \ 42 _exit(status); \ 43 } 40 #define errx(status, fmt, ...) \ 41 { \ 42 printf((fmt), ##__VA_ARGS__); \ 43 _exit(status); \ 44 } 44 45 45 46 #endif … … 47 48 /** @} 48 49 */ 49 -
uspace/lib/c/include/malloc.h
r03171de rbbe7848 41 41 extern uintptr_t get_max_heap_addr(void); 42 42 43 extern void *malloc(const size_t size); 44 extern void *calloc(const size_t nmemb, const size_t size); 45 extern void *memalign(const size_t align, const size_t size); 43 extern void *malloc(const size_t size) 44 __attribute__((malloc)); 45 extern void *calloc(const size_t nmemb, const size_t size) 46 __attribute__((malloc)); 47 extern void *memalign(const size_t align, const size_t size) 48 __attribute__((malloc)); 46 49 extern void *realloc(const void *addr, const size_t size); 47 50 extern void free(const void *addr); -
uspace/lib/c/include/stdint.h
r03171de rbbe7848 36 36 #define LIBC_STDINT_H_ 37 37 38 #define INT8_MIN (0x80)39 #define INT8_MAX (0x7F)38 #define INT8_MIN INT8_C(0x80) 39 #define INT8_MAX INT8_C(0x7F) 40 40 41 #define UINT8_MIN (0u)42 #define UINT8_MAX (0xFFu)41 #define UINT8_MIN UINT8_C(0) 42 #define UINT8_MAX UINT8_C(0xFF) 43 43 44 #define INT16_MIN (0x8000)45 #define INT16_MAX (0x7FFF)44 #define INT16_MIN INT16_C(0x8000) 45 #define INT16_MAX INT16_C(0x7FFF) 46 46 47 #define UINT16_MIN (0u)48 #define UINT16_MAX (0xFFFFu)47 #define UINT16_MIN UINT16_C(0) 48 #define UINT16_MAX UINT16_C(0xFFFF) 49 49 50 #define INT32_MIN (0x80000000l)51 #define INT32_MAX (0x7FFFFFFFl)50 #define INT32_MIN INT32_C(0x80000000) 51 #define INT32_MAX INT32_C(0x7FFFFFFF) 52 52 53 #define UINT32_MIN (0ul)54 #define UINT32_MAX (0xFFFFFFFFul)53 #define UINT32_MIN UINT32_C(0) 54 #define UINT32_MAX UINT32_C(0xFFFFFFFF) 55 55 56 #define INT64_MIN (0x8000000000000000ll)57 #define INT64_MAX (0x7FFFFFFFFFFFFFFFll)56 #define INT64_MIN INT64_C(0x8000000000000000) 57 #define INT64_MAX INT64_C(0x7FFFFFFFFFFFFFFF) 58 58 59 #define UINT64_MIN (0ull)60 #define UINT64_MAX (0xFFFFFFFFFFFFFFFFull)59 #define UINT64_MIN UINT64_C(0) 60 #define UINT64_MAX UINT64_C(0xFFFFFFFFFFFFFFFF) 61 61 62 62 #include <libarch/types.h> -
uspace/lib/c/include/stdio.h
r03171de rbbe7848 41 41 #include <adt/list.h> 42 42 43 #ifndef NVERIFY_PRINTF 44 45 #define PRINTF_ATTRIBUTE(start, end) \ 46 __attribute__((format(gnu_printf, start, end))) 47 48 #else /* NVERIFY_PRINTF */ 49 50 #define PRINTF_ATTRIBUTE(start, end) 51 52 #endif /* NVERIFY_PRINTF */ 53 43 54 #define EOF (-1) 44 55 … … 149 160 150 161 /* Formatted string output functions */ 151 extern int fprintf(FILE *, const char*, ...); 162 extern int fprintf(FILE *, const char*, ...) 163 PRINTF_ATTRIBUTE(2, 3); 152 164 extern int vfprintf(FILE *, const char *, va_list); 153 165 154 extern int printf(const char *, ...); 166 extern int printf(const char *, ...) 167 PRINTF_ATTRIBUTE(1, 2); 155 168 extern int vprintf(const char *, va_list); 156 169 157 extern int snprintf(char *, size_t , const char *, ...); 158 extern int asprintf(char **, const char *, ...); 170 extern int snprintf(char *, size_t , const char *, ...) 171 PRINTF_ATTRIBUTE(3, 4); 172 extern int asprintf(char **, const char *, ...) 173 PRINTF_ATTRIBUTE(2, 3); 159 174 extern int vsnprintf(char *, size_t, const char *, va_list); 160 175 -
uspace/lib/c/include/str.h
r03171de rbbe7848 86 86 extern char *str_ndup(const char *, size_t max_size); 87 87 88 extern int str_uint64(const char *, char **, unsigned int, bool, uint64_t *); 89 extern int str_size_t(const char *, char **, unsigned int, bool, size_t *); 90 88 91 extern void order_suffix(const uint64_t val, uint64_t *rv, char *suffix); 89 92 -
uspace/lib/c/include/sys/typefmt.h
r03171de rbbe7848 39 39 #include <inttypes.h> 40 40 41 /* off64_t */41 /* off64_t, aoff64_t */ 42 42 #define PRIdOFF64 PRId64 43 43 #define PRIuOFF64 PRIu64 … … 45 45 #define PRIXOFF64 PRIX64 46 46 47 /* (s)size_t */48 #define PRIdSIZE PRIdPTR49 #define PRIuSIZE PRIuPTR50 #define PRIxSIZE PRIxPTR51 #define PRIXSIZE PRIXPTR52 53 /* sysarg_t */54 #define PRIdSYSARG PRIdPTR55 #define PRIuSYSARG PRIuPTR56 #define PRIxSYSARG PRIxPTR57 #define PRIXSYSARG PRIxPTR58 59 /* ipcarg_t */60 #define PRIdIPCARG PRIdPTR61 #define PRIuIPCARG PRIuPTR62 #define PRIxIPCARG PRIxPTR63 #define PRIXIPCARG PRIXPTR64 65 /* taskid_t */66 #define PRIdTASKID PRId6467 #define PRIuTASKID PRIu6468 #define PRIxTASKID PRIx6469 #define PRIXTASKID PRIx6470 71 47 #endif 72 48 -
uspace/lib/c/include/sys/types.h
r03171de rbbe7848 46 46 typedef uint64_t aoff64_t; 47 47 48 /** Unicode code point */49 typedef int32_t wchar_t;50 51 48 typedef volatile uint8_t ioport8_t; 52 49 typedef volatile uint16_t ioport16_t;
Note:
See TracChangeset
for help on using the changeset viewer.