Changeset d6c98451 in mainline


Ignore:
Timestamp:
2015-09-20T11:12:33Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fbf4dc1
Parents:
8a45707d
Message:

Move (u)intmax_t to libc. Some stdint.h work.

Location:
uspace/lib
Files:
10 added
14 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/abs32le/include/libarch/types.h

    r8a45707d rd6c98451  
    3636#define LIBC_abs32le_TYPES_H_
    3737
     38#include <libarch/common.h>
     39#include <libarch/stdint.h>
     40
    3841#define __32_BITS__
    39 
    40 #include <libarch/common.h>
    41 
    42 #define SIZE_MIN  UINT32_MIN
    43 #define SIZE_MAX  UINT32_MAX
    4442
    4543#define SSIZE_MIN  INT32_MIN
     
    5048
    5149typedef int32_t ssize_t;
    52 typedef uint32_t size_t;
    5350
    54 typedef uint32_t uintptr_t;
    55 typedef int32_t intptr_t;
    5651typedef uint32_t atomic_count_t;
    5752typedef int32_t atomic_signed_t;
  • uspace/lib/c/arch/amd64/include/libarch/types.h

    r8a45707d rd6c98451  
    3636#define LIBC_amd64_TYPES_H_
    3737
     38#include <libarch/common.h>
     39#include <libarch/stdint.h>
     40
    3841#define __64_BITS__
    39 
    40 #include <libarch/common.h>
    41 
    42 #define SIZE_MIN  UINT64_MIN
    43 #define SIZE_MAX  UINT64_MAX
    4442
    4543#define SSIZE_MIN  INT64_MIN
     
    5048
    5149typedef int64_t ssize_t;
    52 typedef uint64_t size_t;
    5350
    54 typedef uint64_t uintptr_t;
    55 typedef int64_t intptr_t;
    5651typedef uint64_t atomic_count_t;
    5752typedef int64_t atomic_signed_t;
  • uspace/lib/c/arch/arm32/include/libarch/types.h

    r8a45707d rd6c98451  
    3737#define LIBC_arm32_TYPES_H_
    3838
     39#include <libarch/common.h>
     40#include <libarch/stdint.h>
     41
    3942#define __32_BITS__
    40 
    41 #include <libarch/common.h>
    42 
    43 #define SIZE_MIN  UINT32_MIN
    44 #define SIZE_MAX  UINT32_MAX
    4543
    4644#define SSIZE_MIN  INT32_MIN
     
    5149
    5250typedef int32_t ssize_t;
    53 typedef uint32_t size_t;
    5451
    55 typedef uint32_t uintptr_t;
    56 typedef int32_t intptr_t;
    5752typedef uint32_t atomic_count_t;
    5853typedef int32_t atomic_signed_t;
  • uspace/lib/c/arch/ia32/include/libarch/types.h

    r8a45707d rd6c98451  
    3636#define LIBC_ia32_TYPES_H_
    3737
     38#include <libarch/common.h>
     39#include <libarch/stdint.h>
     40
    3841#define __32_BITS__
    39 
    40 #include <libarch/common.h>
    41 
    42 #define SIZE_MIN  UINT32_MIN
    43 #define SIZE_MAX  UINT32_MAX
    4442
    4543#define SSIZE_MIN  INT32_MIN
     
    5250typedef uint32_t size_t;
    5351
    54 typedef uint32_t uintptr_t;
    55 typedef int32_t intptr_t;
    5652typedef uint32_t atomic_count_t;
    5753typedef int32_t atomic_signed_t;
  • uspace/lib/c/arch/ia64/include/libarch/types.h

    r8a45707d rd6c98451  
    3636#define LIBC_ia64_TYPES_H_
    3737
     38#include <libarch/common.h>
     39#include <libarch/stdint.h>
     40
    3841#define __64_BITS__
    39 
    40 #include <libarch/common.h>
    41 
    42 #define SIZE_MIN  UINT64_MIN
    43 #define SIZE_MAX  UINT64_MAX
    4442
    4543#define SSIZE_MIN  INT64_MIN
     
    5048
    5149typedef int64_t ssize_t;
    52 typedef uint64_t size_t;
    5350
    54 typedef uint64_t uintptr_t;
    55 typedef int64_t intptr_t;
    5651typedef uint64_t atomic_count_t;
    5752typedef int64_t atomic_signed_t;
  • uspace/lib/c/arch/mips32/include/libarch/types.h

    r8a45707d rd6c98451  
    3737#define LIBC_mips32_TYPES_H_
    3838
     39#include <libarch/common.h>
     40#include <libarch/stdint.h>
     41
    3942#define __32_BITS__
    40 
    41 #include <libarch/common.h>
    42 
    43 #define SIZE_MIN  UINT32_MIN
    44 #define SIZE_MAX  UINT32_MAX
    4543
    4644#define SSIZE_MIN  INT32_MIN
     
    5149
    5250typedef int32_t ssize_t;
    53 typedef uint32_t size_t;
    5451
    55 typedef uint32_t uintptr_t;
    56 typedef int32_t intptr_t;
    5752typedef uint32_t atomic_count_t;
    5853typedef int32_t atomic_signed_t;
  • uspace/lib/c/arch/ppc32/include/libarch/types.h

    r8a45707d rd6c98451  
    3636#define LIBC_ppc32_TYPES_H_
    3737
     38#include <libarch/common.h>
     39#include <libarch/stdint.h>
     40
    3841#define __32_BITS__
    39 
    40 #include <libarch/common.h>
    41 
    42 #define SIZE_MIN  UINT32_MIN
    43 #define SIZE_MAX  UINT32_MAX
    4442
    4543#define SSIZE_MIN  INT32_MIN
     
    5048
    5149typedef int32_t ssize_t;
    52 typedef uint32_t size_t;
    5350
    54 typedef uint32_t uintptr_t;
    55 typedef int32_t intptr_t;
    5651typedef uint32_t atomic_count_t;
    5752typedef int32_t atomic_signed_t;
  • uspace/lib/c/arch/sparc32/include/libarch/types.h

    r8a45707d rd6c98451  
    3636#define LIBC_sparc32_TYPES_H_
    3737
     38#include <libarch/common.h>
     39#include <libarch/stdint.h>
     40
    3841#define __32_BITS__
    39 
    40 #include <libarch/common.h>
    41 
    42 #define SIZE_MIN  UINT32_MIN
    43 #define SIZE_MAX  UINT32_MAX
    4442
    4543#define SSIZE_MIN  INT32_MIN
     
    5048
    5149typedef int32_t ssize_t;
    52 typedef uint32_t size_t;
    5350
    54 typedef uint32_t uintptr_t;
    55 typedef int32_t intptr_t;
    5651typedef uint32_t atomic_count_t;
    5752typedef int32_t atomic_signed_t;
  • uspace/lib/c/arch/sparc64/include/libarch/types.h

    r8a45707d rd6c98451  
    3636#define LIBC_sparc64_TYPES_H_
    3737
     38#include <libarch/common.h>
     39#include <libarch/stdint.h>
     40
    3841#define __64_BITS__
    39 
    40 #include <libarch/common.h>
    41 
    42 #define SIZE_MIN  UINT64_MIN
    43 #define SIZE_MAX  UINT64_MAX
    4442
    4543#define SSIZE_MIN  INT64_MIN
     
    5048
    5149typedef int64_t ssize_t;
    52 typedef uint64_t size_t;
    5350
    54 typedef uint64_t uintptr_t;
    55 typedef int64_t intptr_t;
    5651typedef uint64_t atomic_count_t;
    5752typedef int64_t atomic_signed_t;
  • uspace/lib/c/include/stdint.h

    r8a45707d rd6c98451  
    6060#define UINT64_MAX  UINT64_C(0xFFFFFFFFFFFFFFFF)
    6161
    62 #include <libarch/types.h>
     62#include <libarch/stdint.h>
    6363
    6464/* off64_t */
  • uspace/lib/posix/include/posix/inttypes.h

    r8a45707d rd6c98451  
    4343#include "libc/inttypes.h"
    4444
    45 extern __POSIX_DEF__(intmax_t) __POSIX_DEF__(strtoimax)(const char *restrict nptr,
     45extern intmax_t __POSIX_DEF__(strtoimax)(const char *restrict nptr,
    4646    char **restrict endptr, int base);
    47 extern __POSIX_DEF__(uintmax_t) __POSIX_DEF__(strtoumax)(const char *restrict nptr,
     47extern uintmax_t __POSIX_DEF__(strtoumax)(const char *restrict nptr,
    4848    char **restrict endptr, int base);
    4949
  • uspace/lib/posix/include/posix/stdint.h

    r8a45707d rd6c98451  
    104104#include "libc/sys/types.h"
    105105
    106 typedef int64_t __POSIX_DEF__(intmax_t);
    107 typedef uint64_t __POSIX_DEF__(uintmax_t);
    108 
    109 
    110106/*
    111107 * Fast* and least* integer types.
    112108 *
    113  * The definitions below are definitely safe if not the best.
     109 * The definitions below are correct as long as uint8/16/32/64_t are defined.
     110 * Considering the entire rest of the system would break down if they were not,
     111 * these definitions are just fine.
    114112 */
    115113typedef uint8_t uint_least8_t;
  • uspace/lib/posix/source/stdio/scanf.c

    r8a45707d rd6c98451  
    698698                                                        break;
    699699                                                case LMOD_j: ;
    700                                                         posix_uintmax_t *pj = va_arg(arg, posix_uintmax_t *);
    701                                                         *pj = (posix_uintmax_t) ures;
     700                                                        uintmax_t *pj = va_arg(arg, uintmax_t *);
     701                                                        *pj = (uintmax_t) ures;
    702702                                                        break;
    703703                                                case LMOD_z: ;
     
    740740                                                        break;
    741741                                                case LMOD_j: ;
    742                                                         posix_intmax_t *pj = va_arg(arg, posix_intmax_t *);
    743                                                         *pj = (posix_intmax_t) sres;
     742                                                        intmax_t *pj = va_arg(arg, intmax_t *);
     743                                                        *pj = (intmax_t) sres;
    744744                                                        break;
    745745                                                case LMOD_z: ;
  • uspace/lib/posix/source/stdlib/strtol.c

    r8a45707d rd6c98451  
    4343#include "posix/inttypes.h"
    4444#include "posix/limits.h"
    45 
    46 #define intmax_t posix_intmax_t
    47 #define uintmax_t posix_uintmax_t
    4845
    4946/**
Note: See TracChangeset for help on using the changeset viewer.