Changeset 4056ad0 in mainline for uspace/app/bithenge/linux/os.h


Ignore:
Timestamp:
2012-07-28T01:57:31Z (12 years ago)
Author:
Sean Bartell <wingedtachikoma@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
32eb01b
Parents:
03cad47
Message:

Bithenge: basic parameter passing (integer literals only)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bithenge/linux/os.h

    r03cad47 r4056ad0  
    3232#include <endian.h>
    3333#include <errno.h>
     34#include <inttypes.h>
    3435#include <memory.h>
    3536#include <stdbool.h>
    36 #include <stdint.h>
     37#include <stdlib.h>
    3738#include <string.h>
    3839#include <wchar.h>
     
    4445#define ELIMIT EINVAL
    4546
     47typedef intmax_t bithenge_int_t;
     48#define BITHENGE_PRId PRIdMAX
    4649typedef uint64_t aoff64_t;
    47 
    4850typedef const char *string_iterator_t;
    4951
     
    130132}
    131133
     134static inline int bithenge_parse_int(const char *start, bithenge_int_t *result)
     135{
     136        errno = 0;
     137        *result = strtoll(start, NULL, 10);
     138        return errno;
     139}
     140
    132141#endif
Note: See TracChangeset for help on using the changeset viewer.