[PATCH 00/11] predefined macros for intmax_t/intptr_t/...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some types have already their TYPE/SIZEOF/MAX macros.
These patches add them for the missing types: ptrdiff,
int{ptr,max,64,32,16,8}_t and their unsigned version.

Note: some of the types vary a lot depending on the
      architecture, OS & exact ABI used. This is
      specially the case for for int32_t.
      The definition in these patches should be correct
      for the most common archs & ABI used for the kernel
      but it can't possibly be correct for all cases.

Luc Van Oostenryck (11):
  testsuite: test predef macros on LP32/LP64/LLP64
  fix '__SIZE_TYPE__' for LLP64
  allow optional "_T" suffix to __SIZEOF_XXX__
  add builtin_type_suffix()
  make predefined_type_size() more generic
  give a type to wchar
  add predefined macros for [u]intptr & ptrdiff
  add predefined macros for [u]int_max
  add predefined macros for [u]int{8,16}_t
  add predefined macros for [u]int64_t
  add predefined macros for [u]int32_t

 char.c                                    |   4 +-
 lib.c                                     | 121 +++++++++++++++-------
 show-parse.c                              |  73 +++++++------
 symbol.h                                  |   1 +
 target.c                                  |   9 +-
 target.h                                  |   9 +-
 validation/preprocessor/predef-char-bit.c |  16 ---
 validation/preprocessor/predef-llp64.c    |   9 ++
 validation/preprocessor/predef-lp32.c     |   9 ++
 validation/preprocessor/predef-lp64.c     |   9 ++
 validation/preprocessor/predef-max.c      |  18 ----
 validation/preprocessor/predef-sizeof.c   |  25 -----
 validation/preprocessor/predef.c          |  45 ++++++++
 13 files changed, 212 insertions(+), 136 deletions(-)
 delete mode 100644 validation/preprocessor/predef-char-bit.c
 create mode 100644 validation/preprocessor/predef-llp64.c
 create mode 100644 validation/preprocessor/predef-lp32.c
 create mode 100644 validation/preprocessor/predef-lp64.c
 delete mode 100644 validation/preprocessor/predef-max.c
 delete mode 100644 validation/preprocessor/predef-sizeof.c
 create mode 100644 validation/preprocessor/predef.c

-- 
2.19.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux